<div><font>Hi all,</font></div><div><font><br></font></div><div><font><div>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 (<a href="https://github.com/MITgcm/MITgcm/blob/master/pkg/flt/flt_traj.F#L134">https://github.com/MITgcm/MITgcm/blob/master/pkg/flt/flt_traj.F#L134</a>):</div></font></div><div><font><br></font></div><div><sign signid="0"><div><font><div><b>    CALL FLT_BILINEAR  (ix,jy,uu,uVel,  kp,1,bi,bj,myThid)</b></div><div><b>    CALL FLT_BILINEAR  (ix,jy,vv,vVel,  kp,2,bi,bj,myThid)</b></div><div><b>    CALL FLT_BILINEAR2D(ix,jy,pp,etaN,     0,bi,bj,myThid)</b></div><div><b>    CALL FLT_BILINEAR  (ix,jy,tt,theta, kp,0,bi,bj,myThid)</b></div><div><b>    CALL FLT_BILINEAR  (ix,jy,ss,salt,  kp,0,bi,bj,myThid)</b></div></font><font><div><font><br></font></div>For a 3D linear interpolation, I think <b>FLT_TRILINEAR </b>would be much better, with proper vertical position <b>kp</b>. Here <b>kp </b>is a roundoff of the vertical position (<a href="https://github.com/MITgcm/MITgcm/blob/master/pkg/flt/flt_traj.F#L106">https://github.com/MITgcm/MITgcm/blob/master/pkg/flt/flt_traj.F#L106</a>):<br></font><font><br></font><font><b>    kp = NINT(kpart(ip,bi,bj))</b></font></div><div><font><br></font></div><div><font><div>When I change <b>FLT_BILINEAR(...)</b> to <b>FLT_TRILINEAR(ix,jy,kpart(ip,bi,bj),tt,theta,0,bi,bj,myThid)</b>, I got almost identical results both online and offline. No step-funciton-like behavior.</div><div><br></div><div>Shouldn't it be changed to <b>FLT_TRILINEAR</b>?</div><br></font><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div></div><div style="font-size:14px;font-family:Verdana;color:#000;"><div> <font size="2">Best regards <br> <br>Yu-Kun Qian (Ç®îÚÀ¤) <br>Center for Monsoon and Environment Research</font> </div> <font size="2">Department of Atmospheric Sciences<br>School of Environmental Science and Engineering<font size="2"> <br> </font>Sun Yat-sen University <br>No. 135 Xingang West Road, Haizhu District <br>Guangzhou, 510275, P.R. China <br>Tel; 020-84115227 <br>Email: <a href="mailto:qianyk@mail2.sysu.edu.cn">qianyk@mail3.sysu.edu.cn</a> </font> 
<div> <font size="2"> </font> </div></div></sign></div><div> </div><div><includetail><!--<![endif]--></includetail></div>