[MITgcm-support] [EXTERNAL] Re: Mellor-Yamada in MITgcm

Olivier Marchal omarchal at whoi.edu
Fri Feb 23 09:12:53 EST 2024


Hi Martin,

Thank you very much for the prompt and detailed response.

It looks indeed that GH, GM are in [1/s^2] (both are computed in my82_ri_number.F), so assuming SH,SH are dimensionless then the value returned by

tkesquare = max(0.,b1*(SH(I,J,K)*GH(I,J)+SM(I,J,K)*GM(I,J))

should also be in [1/s^2] (see lines 111-112 in my82_calc.F), as I think b1 is also dimensionless (b1 is set to 16.6 in MY82.h and is one of the calibration constants reported by Mellor-Yamada (1982)). With tkesquare in [1/s^2], MYviscAr and MYdiffKr have the appropriate units (m^2/s).

It is great that you added the equation numbers of M. Satoh in the code (I have just ordered the book to see how the author derived these equations from the 2.5 closure of M-Y).

Thanks for the clarification about M-Y coding and for the details about the diagnostics.

Cheers,

Olivier.


________________________________
From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Martin Losch <Martin.Losch at awi.de>
Sent: Friday, February 23, 2024 5:12 AM
To: MITgcm Support <mitgcm-support at mitgcm.org>
Subject: [EXTERNAL] Re: [MITgcm-support] Mellor-Yamada in MITgcm

You don't often get email from martin.losch at awi.de. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Hi Olivier,

in general, this package is not really maintained. I implemented this almost 20y ago to do some mixing scheme comparisons, but this never went anywhere.

Question 1:
I followed M. Satoh, Atmospheric Circulation Dynamics and General Circulation models, Springer, 2004 and give equation numbers in the code. According to this “l” = MYhbl (in m) and “q" = tkel = sqrt(turbulent kinetic energy) (in m/s), and that would give mixing coefficients in m^2/s. I don’t know if variable tke is really turbulent kinetic energy (even if the name implies it) because it (i.e. tkesquare) is computed from GM and GH, which both have units of 1/s^2 (buoyancy and shear squared).
I cannot remember the details of this and obviously I did not know what I was doing back then, so if you find that this is not correct, it would be best to open an issue on github or even a PR with a suggestion for a fix.

Question 2:
the variable MYdiffKr is defined at the same places as KappaRx, i.e. at W-points,
MYviscAr is defined also at W-Points, and then it’s averaged horizontally to U and V points (but still at the W-interface) to be at the same place as KappaRU/V. The diagnostics are just MYdiffKr/MYviscAr at W-points. (all of this is copied from pkg/kpp), the “diagnostice code” should reflect that (the “L”), but I agree that this is not intuitive, it’s just some code, see https://mitgcm.readthedocs.io/en/latest/outp_pkgs/outp_pkgs.html , table 9.1

Martin

On 22. Feb 2024, at 21:38, Olivier Marchal <omarchal at whoi.edu> wrote:

Hello All,

I would appreciate input on the following two questions which arose when looking at how Mellor-Yamada is implemented in MITgcm:

1. The following statements appear one lines 161-162 of my82_calc.F:

MYviscAr(I,J,K,bi,bj) = MYhbl(I,J,bi,bj)*tkel*SM(I,J,K)
MYdiffKr (I,J,K,bi,bj) = MYbhl(I,J,bi,bj)*tkel*SH(I,J,K)

where tkel is calculated one line 159 from

tkel =  MYhbl(I,J,bi,bj)*tke(I,J,K)

and tke is calculated on line 113 from

tke(I,J,K) = sqrt(tkesquare)

The coded equations for MYviscAr and MYdiffKr can easily be related to equations (32a)-(32b) of Mellor and Yamada (1982). However, assuming MYhbl is in [m], tke = sqrt(tkesquare) is in [m/s] so that tkel is in [m^2/s], and SM and SH are dimensionless, then MYviscAr and MYdiffKr would be in [m^3/s] and so would not have units of viscosities and diffusivities. Shouldn't tkel on line 161-162 be replaced by tke(I,J,K)?

2. At which depths of the C grid do the values in the diagnostic files KPPviscAz.* and KPPdiffKz(T,S).* correspond to? To the depths of the U,V-carrier points, or to the depths of the W-carrier points? Viscosities/diffusivities are often defined at W-carrier points since vertical turbulent flux divergences are often discretized using central-difference schemes, but it is unclear to me whether these are the values in the diagnostic files.

Any input about (1)-(2) would be deeply appreciated.

Thank you!

Olivier.


_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org<mailto: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/20240223/e104827d/attachment-0001.html>


More information about the MITgcm-support mailing list