[MITgcm-support] Sample pTracer using flt package

Martin Losch Martin.Losch at awi.de
Fri Jun 1 07:25:23 EDT 2018


Hi Qian,

I think you can do it that way.
You need to include the ptracer variables at the beginning of the routine like this:
#ifdef ALLOW_PTRACERS
#include "PTRACERS_SIZE.h"
#include “PTRACERS_FIELDS.h"
#endif

and it’s always a good idea to bracket pkg-specific code by CPP-flags:
#ifdef ALLOW_PTRACERS
      … your code ...
#endif

I think you need to say
CALL FLT_BILINEAR  (ix,jy,ss, pTracer(1-Olx,1-Oly,1,1,1, iTracer),  kp,0,bi,bj,myThid)
to pass the approriate pointer to FLT_BILINEAR

Martin
> On 1. Jun 2018, at 12:19, 钱钰坤 <qianyk at mail3.sysu.edu.cn> wrote:
> 
> Hi all,
> 
> I've inserted an passive tracer (using ptracer package) and deployed
> Lagrangian particles (using flt package) simultaneously into a dynamic flow.
> I wanted to sample the tracer value along each Lagrangian float but I only
> found the following five lines of code in flt_traj.F:
> 
> CALL FLT_BILINEAR  (ix,jy,uu,uVel,  kp,1,bi,bj,myThid)
> CALL FLT_BILINEAR  (ix,jy,vv,vVel,  kp,2,bi,bj,myThid)
> CALL FLT_BILINEAR2D(ix,jy,pp,etaN,     0,bi,bj,myThid)
> CALL FLT_BILINEAR  (ix,jy,tt,theta, kp,0,bi,bj,myThid)
> CALL FLT_BILINEAR  (ix,jy,ss,salt,  kp,0,bi,bj,myThid)
> 
> which means the flt can only sample the basic flow states (u, v, eta, theta, and salt).
> 
> I wonder if there is an easy way to achieve this by modifying the code slightly as:
> 
> CALL FLT_BILINEAR  (ix,jy,ss, pTracer(, , , , , iTracer),  kp,0,bi,bj,myThid)
> 
> and using the result to replace the salt which I do not care about?
> 
> If yes, how to modify the #include or variable declarations at the beginning of flt_traj.F?
> 
> Many thanks.
> 
> 
> ------------------
> Best regards 
> 
> Yu-Kun Qian (钱钰坤) 
> Center for Monsoon and Environment Research
> Department of Atmospheric Sciences
> School of Environmental Science and Engineering 
> Sun Yat-sen University 
> No. 135 Xingang West Road, Haizhu District 
> Guangzhou, 510275, P.R. China 
> Tel; 020-84115227 
> Email: qianyk at mail3.sysu.edu.cn
>  
>  
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list