<div dir="ltr">Hello!<div><br></div><div>I think I've found a small bug in the vertical diffusivity calculation. But I'm not sure if it's not just a feature..</div><div><br></div><div>In s/r calc_3d_diffusivity (line 116, MITgcm version 67x) for T and S we have two different assignments:</div><div><br></div><div> IF ( trIdentity.EQ.GAD_TEMPERATURE ) THEN<br> DO k = 1,Nr<br> DO j = 1-OLy,sNy+OLy<br> DO i = 1-OLx,sNx+OLx<br> KappaRTr(i,j,k) = KappaRTr(i,j,k)<br>#ifdef ALLOW_3D_DIFFKR<br> & + diffKr(i,j,k,bi,bj)<br>#else<br> & + diffKrNrT(k)<br>#endif<br> ENDDO<br> ENDDO<br> ENDDO<br> ELSEIF ( trIdentity.EQ.GAD_SALINITY) THEN<br> DO k = 1,Nr<br> DO j = 1-OLy, sNy+OLy<br> DO i = 1-OLx, sNx+OLx<br> KappaRTr(i,j,k) = KappaRTr(i,j,k)<br>#ifdef ALLOW_3D_DIFFKR<br> & + diffKr(i,j,k,bi,bj)<br>#else<br> & + diffKrNrS(k)<br>#endif</div><div><br></div><div>In other words, we assign either diffKrNrT, or diffKrNrS, depending on the 'trIdentity'. But later, and when GGL90 is activated, in the s/r GGL90_CALC_DIFF we always subtract only diffKrNrS (line 52, 63).</div><div><br></div><div> KappaRx(i,j,k) = KappaRx(i,j,k)<br> & +( GGL90diffKr(i,j,k,bi,bj)<br> & - diffKrNrS(k) )<br></div><div><br></div><div>As I understand, if we set diffKrT and diffKrS to different values in the main 'data' file, then we will not be able to flawlessly cancel <span style="font-family:"Times New Roman",serif;font-size:12pt">KappaRx (which is equal to </span>diffKrNrT in the case of temperature<span style="font-family:"Times New Roman",serif;font-size:12pt">) and </span><span style="font-family:"Times New Roman",serif;font-size:12pt">diffKrNrS in the s/r </span><span style="font-family:"Times New Roman",serif;font-size:12pt">GGL90_CALC_DIFF. The same holds for the ptracer case. Of course, it all matters only if we consider different values for temperature, salinity and ptracers' diffusivities set in the 'data' file.</span></div><div><span style="font-family:"Times New Roman",serif;font-size:12pt"><br></span></div><div><span style="font-family:"Times New Roman",serif;font-size:12pt">Best regards,</span></div><div><span style="font-family:"Times New Roman",serif;font-size:12pt">Stanislav Martyanov</span></div><div><br></div><div>
<p class="MsoNormal" style="margin:0cm;text-align:justify;line-height:115%;font-size:11pt;font-family:Calibri,sans-serif"><br></p></div></div>