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

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


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      


 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20200329/9a56069f/attachment.html>


More information about the MITgcm-support mailing list