Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQG vertical structure to eddy diffusivities #738

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

Wendazhang33
Copy link

@Wendazhang33 Wendazhang33 commented Oct 10, 2024

This commit added an surface quasigeostrophy (SQG) vertical structure (sqg_struct) in Varmix (MOM_lateral_mixing_coeffs) to provide a vertical profile for eddy diffusivities. The SQG vertical structure and its parameterization is given by Zhang et al. (2024): https://journals.ametsoc.org/view/journals/phoc/54/6/JPO-D-23-0203.1.xml.
Also, the vertical structure of all eddy diffusivities/viscosities, including khth, khtr, kh, and kdgl90, are reorganized in Varmix. Two vertical structures are optional for each diffusivity: the equivalent barotropic (ebt_struct) and surface quasigeostrophy (sqg_struct) structures. For example, if one wants to use the SQG structure for the thickness diffusivity Khth, they can set KHTH_USE_SQG_STRUCT=True.
Detailed changes are summarized below:

  • KHTH_USE_EBT_STRUCT, KHTR_USE_EBT_STRUCT, KDGL90_USE_EBT_STRUCT and BS_EBT_POWER parameters, which already existed, still control whether to use the EBT structure for khth, khtr, kdgl90, and kh, respectively
  • Added KHTH_USE_SQG_STRUCT, KHTR_USE_SQG_STRUCT, KDGL90_USE_SQG_STRUCT and BS_USE_SQG parameters to control whether to use the SQG structure for khth, khtr, kdgl90, and kh, respectively
  • Added function calc_sqg_struct in MOM_lateral_mixing_coeffs to compute sqg_struct
  • The sqg_struct can be tuned by the exponent sqg_expo, default is 1.0, suggested range is 0.5-3.0
  • If SQG_USE_MEKE=True, the eddy length scale from MEKE will be used to compute sqg_struct
  • The eddy length scale, Le, will be added into MEKE and registered as a restart variable, MEKE_LE, if SQG_USE_MEKE=True
  • MEKE and dt are added in Varmix to compute sqg_struct

…r diffusivities

- added function calc_sqg_struct in MOM_lateral_mixing_coeffs to compute sqg_struct
- added sqg_expo to set the exponent of sqg_struct
- to use sqg_struct for the backscatter, set BS_use_sqg=true, sqg_expo>0., and BS_EBT_power=0.
- if SQG_USE_MEKE=True, use the eddy length scale from MEKE to compute sqg_struct
- added eddy length scale Le in MEKE if SQG_USE_MEKE=True
- added MEKE%Le into restart file if SQG_USE_MEKE=True
- added MEKE in Varmix
- registered N2_u and N2_v diagnostics when SQG_EXPO>0

(cherry picked from commit 6d3df0541c33d6f6d1f9fcb695f1a1eb961ec1b3)
…ll in VarMix

- Vertical structures including khth_struct, khtr_struct, BS_struct, and kdgl90_struct are now computed in VarMix
- Each diffusivity/viscosity have two vertical structure options, equivalent barotropic (EBT) and surface quasigeostrophic (SQG) mode structures
- KHTH_USE_EBT_STRUCT, KHTR_USE_EBT_STRUCT, KDGL90_USE_EBT_STRUCT and BS_EBT_POWER parameters, which already existed, still control whether to use the EBT structure for khth, khtr, kdgl90, and backscatter, respectively
- Added KHTH_USE_SQG_STRUCT, KHTR_USE_SQG_STRUCT, KDGL90_USE_SQG_STRUCT and BS_USE_SQG parameters to control whether to use the SQG structure for khth, khtr, kdgl90, and backscatter, respectively
- If neither EBT nor SQG is called, no vertical structure will be used for that diffusivity/viscosity
- An error will be called if both EBT and SQG structures are called for the same diffusivity/viscosity
- Added dt as an input of calc_resoln_function. dt is needed for calc_sqg_struct called in calc_resoln_function
@adcroft
Copy link
Member

adcroft commented Oct 23, 2024

This look good to me. The only question I had was whether MEKE%Le is the right length scale to pass in the code, given Le can be configured to be pretty much anything. @Wendazhang33 tells me that it only makes sense when MEKE is using the minimum of the Rhines scale or grid-spacing. I'll wait for @Hallberg-NOAA's opinion.

- Changed ()**0.5 to sqrt in sqg_struct, which solves the dimension error
- Added if statement for using BS_struct in MOM_hor_visc
- Added if statement for CS%sqg_struct<=0.
- Changed the subroundoff of Coriolis parameter to 1e-40 in calc_sqg_struct
- Changed parameter BS_USE_SQG to BS_USE_SQG_STRUCT
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the recent revisions, this PR now looks good to me.

Copy link
Member

@adcroft adcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adcroft adcroft merged commit 7a9adbc into NOAA-GFDL:dev/gfdl Nov 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants