[MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
Gregorio Sandy
Sandy.Gregorio at uqar.ca
Sun Dec 10 21:11:52 EST 2023
Hi Paul,
I tested the 3D scheme with the default values for smag3D_coeff and smag3D_diffCoeff, that is smag3D_coeff=1.E-2 and smag3D_diffCoeff=0. I also tried smag3D_coeff=5.E-2. In the end, I decided not to use Smagorinsky for my experiments. Thus I cannot guarantee that these values are suitable for your setup.
Cheers,
Sandy
________________________________
De : MITgcm-support <mitgcm-support-bounces at mitgcm.org> de la part de Burns, Paul <P.Burns2 at exeter.ac.uk>
Envoyé : samedi 9 décembre 2023 07:40
À : MITgcm-support at mitgcm.org <MITgcm-support at mitgcm.org>
Objet : Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
Hi Sandy,
Since you've already used the 3D scheme, can I ask if you also determined values for:
smag3D_coeff
smag3Ddiff_coeff
Many thanks,
Paul
Dr Paul Burns MInstP FRMetS
Associate Research Fellow
&
Senior Scientist
Atmospheric Processes and Parametrisation (APP)
Met Office
Exeter
________________________________
From: Burns, Paul <P.Burns2 at exeter.ac.uk>
Sent: 08 December 2023 13:49
To: mitgcm-support at mitgcm.org <mitgcm-support at mitgcm.org>
Subject: Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
Hi Sandy,
That's a great help!
I will try your code and should our work get published I'll happily include your contribution.
Many thanks,
Paul
Dr Paul Burns MInstP FRMetS
Associate Research Fellow
&
Senior Scientist
Atmospheric Processes and Parametrisation (APP)
Met Office
Exeter
________________________________
From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Gregorio Sandy <Sandy.Gregorio at uqar.ca>
Sent: 08 December 2023 13:37
To: mitgcm-support at mitgcm.org <mitgcm-support at mitgcm.org>
Subject: Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
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.
Hi Paul,
I computed the 3D Smagorinsky coefficient by accounting for the buoyancy last winter. I attach the files mom_calc_smag_3d.F, mom_diagnostics_init.F, MOM_COMMON_OPTIONS.h and CPP_OPTIONS.h. In CPP_OPTIONS.h, I defined a flag to include or not the buoyancy in the calculation of the 3D Smagorinsky coefficient.
I hope it helps.
Cheers,
Sandy
________________________________
De : MITgcm-support <mitgcm-support-bounces at mitgcm.org> de la part de Burns, Paul <P.Burns2 at exeter.ac.uk>
Envoyé : vendredi 8 décembre 2023 08:34
À : mitgcm-support at mitgcm.org <mitgcm-support at mitgcm.org>
Objet : Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
ATTENTION : Ce courriel provient d'une source externe. Assurez-vous que cette dernière est sûre avant d'ouvrir une pièce jointe ou de cliquer sur un lien. Dans le doute, signalez le message.
Hi Martin,
Ok that is great. I'll have a go and get back to you.
Many thanks,
Paul
Dr Paul Burns MInstP FRMetS
Associate Research Fellow
&
Senior Scientist
Atmospheric Processes and Parametrisation (APP)
Met Office
Exeter
________________________________
From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Martin Losch <Martin.Losch at awi.de>
Sent: 08 December 2023 12:46
To: MITgcm Support <mitgcm-support at mitgcm.org>
Subject: Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
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.
Hi Paul,
if you need that functionality, it should be relatively easy for you to add:
- in the header file “DYNVARS.h”, there’s already the global sigmaRfield, just need to change/remove the CPP-flags
- velocities are available via DYNVARS.h, too, so that it should be straightforward to compute N2/dVdz from that, similarly to what’s done in pkg/ggl90/ggl90_calc.F
Martin
On 8. Dec 2023, at 12:55, Burns, Paul <P.Burns2 at exeter.ac.uk> wrote:
Ok that's easier then. I believe the Richardson number function could be added to the code where the Smagorinsky viscosity is computed at some k-level in
mom_calc_smag_3d.F
Many thanks,
Paul
Dr Paul Burns MInstP FRMetS
Associate Research Fellow
&
Senior Scientist
Atmospheric Processes and Parametrisation (APP)
Met Office
Exeter
________________________________
From: MITgcm-support <mitgcm-support-bounces at mitgcm.org<mailto:mitgcm-support-bounces at mitgcm.org>> on behalf of Martin Losch <Martin.Losch at awi.de<mailto:Martin.Losch at awi.de>>
Sent: 08 December 2023 10:49
To: MITgcm Support <mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org>>
Subject: Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
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.
There are plenty of places, where Ri-numbers are computed, e.g. in pkg/ggl90/ggl90_calc.F, or even full routines, e.g. pkg/pp81/pp81_ri_number.F (although when that was written the vertical gradient of density SigmaRw as not availalbe).
In which routine would you need the Ri-number exactly?
Martin
On 8. Dec 2023, at 11:20, Burns, Paul <P.Burns2 at exeter.ac.uk> wrote:
Hi Martin,
A quick message to thank you for your help with this. I've found the fortran file where smag3D_coeff
(and smag3Ddiff_coeff) are used to compute the viscosity (diffusivity), so hopefully I can work through the code and compare that with a relevant paper about using the Smagorinsky-Lilly model in the ocean to figure out what the values of smag3D_coeff and smag3Ddiff_coeff should be in MITgcm.
It might be useful to add a Richardson number function to the existing 3D Smagorinsky model in MITgcm to try and account for buoyancy effects, but not sure how tricky that will be. Mathematically it's straightforward. I'd need to pass relevant variables to calculate a local Richardson number and I'd need to first find a reasonable Richardson number function for the ocean. Not sure if anyone has tried this already?
Cheers,
Paul
Dr Paul Burns MInstP FRMetS
Associate Research Fellow
&
Senior Scientist
Atmospheric Processes and Parametrisation (APP)
Met Office
Exeter
________________________________
From: MITgcm-support <mitgcm-support-bounces at mitgcm.org<mailto:mitgcm-support-bounces at mitgcm.org>> on behalf of Martin Losch <Martin.Losch at awi.de<mailto:Martin.Losch at awi.de>>
Sent: 01 December 2023 06:51
To: MITgcm Support <mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org>>
Subject: Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
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.
Hi Paul,
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:
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:
>> grep -i useSmag3D *.F
calc_gw.F: IF ( useSmag3D .AND. k.GT.1 ) THEN
config_check.F: IF ( useSmag3D ) THEN
config_check.F: & 'Cannot set useSmag3D=TRUE when compiled with'
config_check.F: & useSmag3D .AND. useCDscheme ) THEN
config_check.F: IF ( useSmag3D .AND.
config_summary.F: CALL WRITE_0D_L( useSmag3D, INDEX_NONE,
config_summary.F: & 'useSmag3D =', ' /* Use isotropic 3-D Smagorinsky viscosity */')
config_summary.F: IF ( useSmag3D )
dynamics.F: IF ( useSmag3D ) THEN
dynamics.F: IF ( useSmag3D ) THEN
ini_parms.F: & viscC2leith, viscC4leith, smag3D_coeff, useSmag3D,
ini_parms.F: IF ( smag3D_diffCoeff.NE.zeroRL .AND. .NOT.useSmag3D ) THEN
ini_parms.F: & 'will not use "smag3D_diffCoeff" without useSmag3D'
set_defaults.F: useSmag3D = .FALSE.
set_parms.F: useSmag3D = momViscosity .AND. useSmag3D
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).
Martin
On 30. Nov 2023, at 20:07, Burns, Paul <P.Burns2 at exeter.ac.uk> wrote:
Hi,
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:
smag3D_coeff
smag3Ddiff_coeff
I would be grateful is someone could give some advice about how to choose values for these parameters.
Also, it might be useful to look at the source code for the 3D Smagorinsky scheme (useSmag3D=.TRUE.), but I am not sure where it is located?
Many thanks,
Paul
Dr Paul Burns MInstP FRMetS
Associate Research Fellow
&
Senior Scientist
Atmospheric Processes and Parametrisation (APP)
Met Office
Exeter
________________________________
From: Burns, Paul <P.Burns2 at exeter.ac.uk<mailto:P.Burns2 at exeter.ac.uk>>
Sent: 02 February 2023 11:44
To: MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org> <MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>>
Subject: Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
Hi Jean-Michel,
Many thanks for your quick and clear response.
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.
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).
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 viscArNr).
Cheers,
Paul
Dr Paul Burns MInstP FRMetS
Research Fellow
Geophysical and Astrophysical Fluid Dynamics Group
Department of Mathematics
Harrison Building
University of Exeter
________________________________
From: MITgcm-support <mitgcm-support-bounces at mitgcm.org<mailto:mitgcm-support-bounces at mitgcm.org>> on behalf of Jean-Michel Campin <jmc at mit.edu<mailto:jmc at mit.edu>>
Sent: 01 February 2023 15:25
To: mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org> <mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org>>
Subject: Re: [MITgcm-support] Vertical diffusion for non-hydrostatic ocean model with a stretched grid
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.
Hi Paul,
There is some confusion about Smagorinsky in MITgcm since we have 2 implementations:
1) a Smagorinsky like horizontal viscosity that is function of horizontal shear,
with the choice of harmonic (viscC2smag) or bi-harmonic (viscC4smag) viscosity.
2) a simple 3-D Smagorinsky harmonic viscosity that work best when the grid is
near isotropic (mostly for Non-Hydrostatic simulation) and does not acount for
stratification.
Need ALLOW_SMAG_3D_DIFFUSIVITY to be defined and uses run-time parameter:
useSmag3D = .TRUE., with smag3D_coeff,
see experiment: tutorial_deep_convection, with input.smag3d/data
You may want to try this second implementation.
Alternatively, you could always set a vertical profile of (background)
vertical viscosity using Nr values to set vector "viscArNr" in main parameter
input file "data" (note that the fist value corresponds to the very top,
i.e., surface, vertical index k=1, and has no effect).
Cheers,
Jean-Michel
On Wed, Feb 01, 2023 at 12:55:22PM +0000, Burns, Paul wrote:
> Hi,
>
> 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.
>
> 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?
>
>
> Many thanks,
> Paul
>
>
>
>
> Dr Paul Burns MInstP FRMetS
>
> Research Fellow
>
> Geophysical and Astrophysical Fluid Dynamics Group
>
> Department of Mathematics
>
> Harrison Building
>
> University of Exeter
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
> 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<http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support>
_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
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<http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support>
_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
_______________________________________________
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/20231211/ab3a47f1/attachment-0001.html>
More information about the MITgcm-support
mailing list