<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Martin,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you very much for the prompt and detailed response. </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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 </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
tkesquare = max(0.,b1*(SH(I,J,K)*GH(I,J)+SM(I,J,K)*GM(I,J))</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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). </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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).</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for the clarification about M-Y coding and for the details about the diagnostics.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Olivier.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Martin Losch <Martin.Losch@awi.de><br>
<b>Sent:</b> Friday, February 23, 2024 5:12 AM<br>
<b>To:</b> MITgcm Support <mitgcm-support@mitgcm.org><br>
<b>Subject:</b> [EXTERNAL] Re: [MITgcm-support] Mellor-Yamada in MITgcm</span>
<div> </div>
</div>
<table align="left" style="display: table; width: 100%; table-layout: fixed; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td style="background-color: rgb(166, 166, 166); padding: 7px 2px; vertical-align: middle; width: 1px;">
</td>
<td style="text-align: left; background-color: rgb(234, 234, 234); padding: 7px 5px 7px 15px; vertical-align: middle; color: rgb(33, 33, 33); width: 100%;">
<div style="text-align: left;"><span style="font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 12px;">You don't often get email from martin.losch@awi.de.
<a href="https://aka.ms/LearnAboutSenderIdentification" id="OWAa5e1d730-d138-4fcd-bc05-11636a0103d5" class="OWAAutoLink" data-loopstyle="linkonly" data-auth="NotApplicable">
Learn why this is important</a></span></div>
</td>
<td align="left" style="background-color: rgb(234, 234, 234); padding: 7px 5px; vertical-align: middle; color: rgb(33, 33, 33); width: 75px;">
</td>
</tr>
</tbody>
</table>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Hi Olivier,</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">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.</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Question 1:</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">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).</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">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.</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Question 2:</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">the variable MYdiffKr is defined at the same places as KappaRx, i.e. at W-points,</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">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 <a href="https://mitgcm.readthedocs.io/en/latest/outp_pkgs/outp_pkgs.html" id="OWAd41d42a5-39f9-1d5b-f34a-74b1e71bb805" class="OWAAutoLink" data-loopstyle="linkonly" data-auth="Verified">
https://mitgcm.readthedocs.io/en/latest/outp_pkgs/outp_pkgs.html</a> , table 9.1</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Martin</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<blockquote>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">On 22. Feb 2024, at 21:38, Olivier Marchal <omarchal@whoi.edu> wrote:</span></div>
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">Hello All,</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">I would appreciate input on the following two questions which arose when looking at how Mellor-Yamada is implemented in MITgcm:</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">1. The following statements appear one lines 161-162 of my82_calc.F:</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">MYviscAr(I,J,K,bi,bj) = MYhbl(I,J,bi,bj)*tkel*SM(I,J,K)</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">MYdiffKr (I,J,K,bi,bj) = MYbhl(I,J,bi,bj)*tkel*SH(I,J,K)</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">where tkel is calculated one line 159 from</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">tkel = MYhbl(I,J,bi,bj)*tke(I,J,K)</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">and tke is calculated on line 113 from</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">tke(I,J,K) = sqrt(tkesquare) </span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">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)?</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">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.</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);">Any input about (1)-(2) would be deeply appreciated.</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Helvetica; font-size: 12px;">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Thank you!</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Helvetica; font-size: 12px;">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Helvetica; font-size: 12px;">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Olivier.</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="text-align: left; text-indent: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<span style="font-family: Helvetica; font-size: 12px; color: rgb(0, 0, 0);">_______________________________________________</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span><span style="font-family: Helvetica; font-size: 12px; color: rgb(0, 0, 0);">MITgcm-support mailing list</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span><span style="font-family: Helvetica; font-size: 12px; color: rgb(0, 0, 0);"><a href="mailto:MITgcm-support@mitgcm.org" id="OWAa4e2d547-f8c1-0965-4a36-c7617057b93b" class="OWAAutoLink" data-loopstyle="linkonly" style="text-align: left;">MITgcm-support@mitgcm.org</a></span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span><span style="font-family: Helvetica; font-size: 12px; color: rgb(0, 0, 0);"><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" id="OWAa40f3073-2f9c-7109-577a-ad799adf740f" class="OWAAutoLink" data-loopstyle="linkonly" data-auth="Verified" style="text-align: left;">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a></span></blockquote>
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span>
</body>
</html>