[MITgcm-support] 3D interpolation of model state by flt floats

钱钰坤 qianyk at mail3.sysu.edu.cn
Sun Mar 29 11:06:11 EDT 2020


Hi Paola,


I understand it better now.  Maybe we need an interpolation function to handle the case of land points.

Thank you very much for your quick reply.

------------------

 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      


 
 
 
------------------ 原始邮件 ------------------
发件人: "Paola Cessi"<pcessi at ucsd.edu>;
发送时间: 2020年3月29日(星期天) 晚上10:53
收件人: "mitgcm-support"<mitgcm-support at mitgcm.org>; 

主题: Re: [MITgcm-support] 3D interpolation of model state by flt floats

 

Hi,

the FLT package as it is now interpolates all fields using neighboring points, including land points. This is OK for velocities which are indeed zero on the boundaries, but not for T,S, tracers and SSH, which are set to zero on the land points, which is not their true value. So for T, S, tracers and SSH it is better not to interpolate at all  and just use the value on the grid at the nearest cell point, i.e. using NINT in all three directions. 


 Paola

----------------------------------------------
Paola Cessi   
Scripps Institution of Oceanography  
9500 Gilman Drive #0213               
La Jolla, CA 92093-0213
USA               
Tel: +1 858 534 0622   Fax: +1 858 534 8045
e-mail: pcessi at ucsd.edu     Web:  http://www-pord.ucsd.edu/~pcessi

Delivery address (Fed-Ex, DHL, UPS, etc.):
Paola Cessi
University of California San Diego
Keck Center - Room 366
8851 Shellback Way
La Jolla, CA 92093-0213
USA

 
 
On Mar 29, 2020, at 7:42 AM, 钱钰坤 <qianyk at mail3.sysu.edu.cn> wrote:

Hi all,


When I tried to sample the model state using 3D floats (flt pkg), I found that the sampled fields are not smooth (like a step funtion in some way) as I expected (I made a comparison with the offline-sampled results). When I looked into flt_traj.F, there are some codes doing the interpolation of model state by floats.  For a 3D type float (not horizontal 2D float), I would expect a trilinear (x, y, z) interpolation of the model state. However, I found the following lines (https://github.com/MITgcm/MITgcm/blob/master/pkg/flt/flt_traj.F#L134):



    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)


For a 3D linear interpolation, I think FLT_TRILINEAR would be much better, with proper vertical position kp. Here kp is a roundoff of the vertical position (https://github.com/MITgcm/MITgcm/blob/master/pkg/flt/flt_traj.F#L106):

    kp = NINT(kpart(ip,bi,bj))


When I change FLT_BILINEAR(...) to FLT_TRILINEAR(ix,jy,kpart(ip,bi,bj),tt,theta,0,bi,bj,myThid), I got almost identical results both online and offline. No step-funciton-like behavior.


Shouldn't it be changed to FLT_TRILINEAR?

------------------

 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20200329/49789cbb/attachment-0001.html>


More information about the MITgcm-support mailing list