<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Paul,<div><br></div><div>I have no experience with the Smag3D code and don’t have any suggestions for setting the coefficients, but this is what I do to find code:</div><div><br></div><div>Compile the experiment that uses the code (here: tutorial_deep_convection), in fact, just the genmake2 and make depend steps are enough, then you have all necessary code in the build directory and you can grep for useSmag3D (or ALLOW_SMAG_3D). This gives me:</div><div><p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">>> grep -i useSmag3D *.F</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">calc_gw.F: IF ( useSmag3D .AND. k.GT.1 ) THEN</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">config_check.F: IF ( useSmag3D ) THEN</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">config_check.F: & 'Cannot set useSmag3D=TRUE when compiled with'</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">config_check.F: & useSmag3D .AND. useCDscheme ) THEN</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">config_check.F: IF ( useSmag3D .AND.</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">config_summary.F: CALL WRITE_0D_L( useSmag3D, INDEX_NONE,</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">config_summary.F: & 'useSmag3D =', ' /* Use isotropic 3-D Smagorinsky viscosity */')</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">config_summary.F: IF ( useSmag3D )</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">dynamics.F: IF ( useSmag3D ) THEN</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">dynamics.F: IF ( useSmag3D ) THEN</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ini_parms.F: & viscC2leith, viscC4leith, smag3D_coeff, useSmag3D,</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ini_parms.F: IF ( smag3D_diffCoeff.NE.zeroRL .AND. .NOT.useSmag3D ) THEN</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ini_parms.F: & 'will not use "smag3D_diffCoeff" without useSmag3D'</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">set_defaults.F: useSmag3D = .FALSE.</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">set_parms.F: useSmag3D = momViscosity .AND. useSmag3D</span></p><div><br></div><div>You can probably figure out yourself, that the files starting with “ini_” or “config_”, “set_defaults/params.F” are only initialisation, and that calc_gw.F and dynamics.F are more interesting to you. In these files you’ll see that with this flag=Ture, specific routines (e.g., MOM_W_SMAG_3D, MOM_CALC_3D_STRAIN, ...) are called which (probably) contain most of the code. Most of the time in MITgcm, a routine lives in a file with the same name (e.g., mom_w_smag_3d.F, if not you’d have to grep for it again). This routine is linked from the source directory (pkg/mom_common).</div><div><br></div><div>Martin</div><div><br><blockquote type="cite"><div>On 30. Nov 2023, at 20:07, Burns, Paul <P.Burns2@exeter.ac.uk> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">Hi,</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">I've only recently come back to some work I started about a year ago about regional modelling in the Arctic ocean, having been distracted by a change of jobs. I received some useful advice from Jean-Michel about the two types of Smagorinsky scheme available in MITgcm. I was advised to look at tutorial_deep_convection for details of the parameters that need setting when using the 3D Smagorinsky scheme (i.e., required with useSmag3D=.TRUE.), however, the documentation in that tutorial is very limited and it isn't clear what values should be chosen for: </div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">smag3D_coeff</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">smag3Ddiff_coeff</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">I would be grateful is someone could give some advice about how to choose values for these parameters. </div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">Also, it might be useful to look at the source code for the 3D Smagorinsky scheme (</span><span style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 16px; font-weight: 400; background-color: rgb(255, 255, 255);">useSmag3D=.TRUE.)</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">, but I am not sure where it is located?</span></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">Many thanks,</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">Paul</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div id="Signature" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div><span style="font-family: Calibri, sans-serif; font-size: 14.6667px; color: rgb(12, 100, 192); background-color: rgb(255, 255, 255);"><u> </u></span></div><div><span style="font-family: Calibri, sans-serif; font-size: 14.6667px; color: rgb(23, 78, 134); background-color: rgb(255, 255, 255);">Dr Paul Burns MInstP FRMetS</span></div><div><span style="font-family: Calibri, sans-serif; font-size: 14.6667px; color: rgb(23, 78, 134);">Associate Research Fellow</span></div><div><span style="font-family: Calibri, sans-serif; font-size: 14.6667px; color: rgb(23, 78, 134);">& </span></div><div><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(23, 78, 134);">Senior Scientist</span></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="font-size: 11pt; color: rgb(23, 78, 134);">Atmospheric Processes and Parametrisation (APP)</span></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="font-size: 11pt; color: rgb(23, 78, 134);">Met Office</span></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="font-size: 11pt; color: rgb(23, 78, 134);">Exeter</span></div></div><div id="appendonsend" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div><hr tabindex="-1" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline-block; width: 429.234375px;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;"></span><div id="divRplyFwdMsg" dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Burns, Paul <<a href="mailto:P.Burns2@exeter.ac.uk">P.Burns2@exeter.ac.uk</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>02 February 2023 11:44<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a><span class="Apple-converted-space"> </span><<a href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a>><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid</font><div> </div></div><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Hi Jean-Michel,</div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Many thanks for your quick and clear response.</div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I agree that I should try option 2), which appears to calculate both the viscosity and diffusivity for the tracers (simply by using a constant Prandtl number)? Yes, the Smagorinsky model essentially parameterises subgrid mixing by using the resolved shear and grid resolution, and so does not explicitly account for stratification. I hope that my very fine vertical grid resolves most buoyancy-driven (and mechanical) mixing. </div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">MITgcm does have a TKE 1.5-order closure scheme (i.e., package ggl90), however, it seems only suitable for hydrostatic simulations, when the mixing length in the scheme doesn't need to be limited to the grid resolution. This at least is my understanding from the paper by Blanke and Delecluse (1993).</div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">My grid is certainly not isotropic, but I have no bottom topography so the grid cells are at least aligned with the horizontal. I am not sure what errors my grid may introduce when using the Smagorinsky scheme? I guess I can test the results using the Smagorinsky scheme against simply specifying a profile of viscosity and diffusivity using the relevant Reynolds number (i.e. setting <span class="x_ContentPasted0" style="font-size: 12pt; background-color: rgb(255, 255, 255); display: inline !important;">viscArNr).</span></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Cheers,</div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Paul</div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="x_elementToProof"><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br></div><div id="x_Signature"><div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><div style="margin: 0px; font-size: 15px; color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);"><div style="margin: 0px; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="color: rgb(12, 100, 192);"><u> </u></span></div><div style="margin: 0px; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="margin: 0px; color: rgb(31, 78, 121);">Dr Paul Burns MInstP FRMetS</span></div><div style="margin: 0px; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="margin: 0px; color: rgb(31, 78, 121);">Research Fellow</span></div><div style="margin: 0px; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="margin: 0px; color: rgb(31, 78, 121);">Geophysical and Astrophysical Fluid Dynamics Group</span></div><div style="margin: 0px; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="margin: 0px; color: rgb(31, 78, 121);">Department of Mathematics</span></div><div style="margin: 0px; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="margin: 0px; color: rgb(31, 78, 121);">Harrison Building</span></div><div style="margin: 0px; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="margin: 0px; color: rgb(31, 78, 121);">University of Exeter</span></div></div><br></div></div></div></div><div id="x_appendonsend"></div><hr tabindex="-1" style="display: inline-block; width: 429.234375px;"><div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>MITgcm-support <<a href="mailto:mitgcm-support-bounces@mitgcm.org">mitgcm-support-bounces@mitgcm.org</a>> on behalf of Jean-Michel Campin <<a href="mailto:jmc@mit.edu">jmc@mit.edu</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>01 February 2023 15:25<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:mitgcm-support@mitgcm.org">mitgcm-support@mitgcm.org</a><span class="Apple-converted-space"> </span><<a href="mailto:mitgcm-support@mitgcm.org">mitgcm-support@mitgcm.org</a>><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid</font><div> </div></div><div class="x_BodyFragment"><font size="2"><span style="font-size: 11pt;"><div class="x_PlainText">CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.<br><br><br>Hi Paul,<br><br>There is some confusion about Smagorinsky in MITgcm since we have 2 implementations:<br>1) a Smagorinsky like horizontal viscosity that is function of horizontal shear,<br> with the choice of harmonic (viscC2smag) or bi-harmonic (viscC4smag) viscosity.<br>2) a simple 3-D Smagorinsky harmonic viscosity that work best when the grid is<br> near isotropic (mostly for Non-Hydrostatic simulation) and does not acount for<br> stratification.<br> Need ALLOW_SMAG_3D_DIFFUSIVITY to be defined and uses run-time parameter:<br> useSmag3D = .TRUE., with smag3D_coeff,<br> see experiment: tutorial_deep_convection, with input.smag3d/data<br><br>You may want to try this second implementation.<br>Alternatively, you could always set a vertical profile of (background)<br>vertical viscosity using Nr values to set vector "viscArNr" in main parameter<br>input file "data" (note that the fist value corresponds to the very top,<br>i.e., surface, vertical index k=1, and has no effect).<br><br>Cheers,<br>Jean-Michel<br><br>On Wed, Feb 01, 2023 at 12:55:22PM +0000, Burns, Paul wrote:<br>> Hi,<br>><br>> I was hoping that someone could give me some advice about the best way to define the vertical viscosity (and diffusivity) in MITgcm for a non-hydrostatic model using a stretched vertical grid. I've used a stretched vertical grid to resolve very small features of interest (~0.2 m) in the upper ocean and to keep the simulation practical.<br>><br>> The viscosity should vary with the grid resolution (e.g., Smagorinsky, 1993), however, the MITgcm documentation says that the Smagorinsky scheme isn't implemented in the vertical. So would a reasonable approach be to compute a vertical profile of viscosities using a vertical Reynolds number and use that to set viscArNr?<br>><br>><br>> Many thanks,<br>> Paul<br>><br>><br>><br>><br>> Dr Paul Burns MInstP FRMetS<br>><br>> Research Fellow<br>><br>> Geophysical and Astrophysical Fluid Dynamics Group<br>><br>> Department of Mathematics<br>><br>> Harrison Building<br>><br>> University of Exeter<br>><br><br>> _______________________________________________<br>> MITgcm-support mailing list<br>><span class="Apple-converted-space"> </span><a href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a><br>><span class="Apple-converted-space"> </span><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support">https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=05%7C01%7Cp.burns2%40exeter.ac.uk%7Cc5f922888565484cca2d08db04689db2%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C638108619586622927%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=lIiEnoR5jjVDjN6nbhJqucfgF1b8zQyyxo0%2F9ryH%2F%2Bw%3D&reserved=0</a><br><br>_______________________________________________<br>MITgcm-support mailing list<br><a href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a><br><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support">https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=05%7C01%7Cp.burns2%40exeter.ac.uk%7Cc5f922888565484cca2d08db04689db2%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C638108619586622927%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=lIiEnoR5jjVDjN6nbhJqucfgF1b8zQyyxo0%2F9ryH%2F%2Bw%3D&reserved=0</a><br></div></span></font></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">MITgcm-support mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="mailto:MITgcm-support@mitgcm.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">MITgcm-support@mitgcm.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a></div></blockquote></div><br></div></body></html>