[MITgcm-support] vertical diffusivity
Stanislav Martyanov
martyanov.sd at gmail.com
Wed Jan 19 07:32:55 EST 2022
Hello!
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..
In s/r calc_3d_diffusivity (line 116, MITgcm version 67x) for T and S we
have two different assignments:
IF ( trIdentity.EQ.GAD_TEMPERATURE ) THEN
DO k = 1,Nr
DO j = 1-OLy,sNy+OLy
DO i = 1-OLx,sNx+OLx
KappaRTr(i,j,k) = KappaRTr(i,j,k)
#ifdef ALLOW_3D_DIFFKR
& + diffKr(i,j,k,bi,bj)
#else
& + diffKrNrT(k)
#endif
ENDDO
ENDDO
ENDDO
ELSEIF ( trIdentity.EQ.GAD_SALINITY) THEN
DO k = 1,Nr
DO j = 1-OLy, sNy+OLy
DO i = 1-OLx, sNx+OLx
KappaRTr(i,j,k) = KappaRTr(i,j,k)
#ifdef ALLOW_3D_DIFFKR
& + diffKr(i,j,k,bi,bj)
#else
& + diffKrNrS(k)
#endif
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).
KappaRx(i,j,k) = KappaRx(i,j,k)
& +( GGL90diffKr(i,j,k,bi,bj)
& - diffKrNrS(k) )
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 KappaRx
(which is equal to diffKrNrT in the case of temperature) and diffKrNrS in
the s/r 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.
Best regards,
Stanislav Martyanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20220119/4e7d468a/attachment.html>
More information about the MITgcm-support
mailing list