[MITgcm-support] 回复: Sample pTracer using flt package

钱钰坤 qianyk at mail3.sysu.edu.cn
Sat Jun 2 07:12:20 EDT 2018


Hi Martin,


Thanks very much for your suggestions.  I can sample the value of ptracer online now.


However, there are considerable differences between online-sampled and offline-sampled
values.  I've doubted about the results of my offline-sampling program and that is why I
insist to get the online results to verify that.  Since I have to also sample the gradient of
the tracer, there are more questions follow this line.


For a quick solution, I hope to compute the tracer gradient online and then sample the
gradient field exactly the same way as I sample the tracer field (just passing the pointer
of the gradient to the subroutine FLT_BILINEAR).  However, I've no idea how and where
to do this.  I've found many diagnostics in available_diagnostics.log related to the tracer
itself (UTRAC01, ADVrTr01, ...) which could be modified slightly to be the tracer gradient.
I just wonder if this is the best way to do get Lagrangian sampling of tracer gradient.


From a fundamental way, I just want to figure out the differences in the programs.  The
tracer field is output as MDSIO format.  As MITgcm uses C-grid, should the position of the
lower-left-corner value of the tracer be exactly zero, or be DXC (DYC), or be DXC/2 (DYC/2)?
I think this tiny differences in position will cause considerable sampled tracer value if the
gradient is large.


I also set north and east wall boundaries so the domain is closed (the eastmost Nx and
northmost Ny grid points are all set to the undefined value of 0).  Could the Lagrangian
particle get into the cell of these grid points or they just stay within [1 Nx-1]*[1 Ny-1]
grid points?  More specifically, what are the upper and lower bounds of position for a
Lagrangian particle?


Thanks again.



------------------
 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      


 
 
 
------------------ 原始邮件 ------------------
发件人: "Martin Losch"<Martin.Losch at awi.de>;
发送时间: 2018年6月1日(星期五) 晚上7:25
收件人: "MITgcm Support"<mitgcm-support at mitgcm.org>; 

主题: Re: [MITgcm-support] Sample pTracer using flt package

 
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

_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20180602/ec5b1feb/attachment-0001.html>


More information about the MITgcm-support mailing list