ocean-eddy-cpt / MOM6

Modular Ocean Model
Other
1 stars 1 forks source link

Adding the Danabasoglu & Marshal 2007 scheme #15

Open gustavo-marques opened 3 years ago

gustavo-marques commented 3 years ago

This PR adds the scheme for calculating the thickness diffusivity (KHTH) described by Danabasoglu & Marshall (2007). Because the version implemented here must work on layer mode and in the absence of a surface boundary layer depth, the current implementation differs from the original one. Below is a brief description of what is implemented in this PR.

Calculate KHTH (or \kappa_{GM})

The scheme can be activated by setting USE_DANABASOGLU_MARSHALL = True

Diffusivities are calculated using image,

where N^2 is the Brunt-Väisälä frequency and N^2{ref} is the maximum N^2 value for a particular column (i,j point). Therefore, the ratio N^2/N^2{ref} <= 1.0. \kappa_{GM} is a reference diffusivity prescribed by the user via the DM07_KAPPA_REF parameter. The lower bound on the diffusivities is controlled via the minimum ratio (N^2/N^2_{ref}) parameter DM07_MIN_RATIO. We also set the density ratio at the top-most interface to one.

The subroutine vert_fill_rho has been introduced to allow the calculation of N^2 in layer mode (stacked shallow water). In this mode, the target densities are prescribed by the user and can be extremely small (vanished) making the calculation of N^2 difficult because vanished layers are used in the denominator. To avoid this issue, we pass the thickness array and the density targets to subroutine vert_fill_rho and fill the vanished layers with sensible density values by diffusing vertically with a small but constant diffusivity. We then calculate N2_u and N2_v using the "corrected" density profiles.

TODO

Check if this implementation works in ALE mode.

codecov-commenter commented 3 years ago

Codecov Report

Merging #15 (1891ff0) into dev/cpt (7868fdd) will decrease coverage by 0.03%. The diff coverage is 9.91%.

:exclamation: Current head 1891ff0 differs from pull request most recent head 91ca6ba. Consider uploading reports for the commit 91ca6ba to get more accurate results Impacted file tree graph

@@             Coverage Diff             @@
##           dev/cpt      #15      +/-   ##
===========================================
- Coverage    29.29%   29.26%   -0.04%     
===========================================
  Files          235      235              
  Lines        70799    70909     +110     
===========================================
+ Hits         20742    20749       +7     
- Misses       50057    50160     +103     
Impacted Files Coverage Δ
src/core/MOM_isopycnal_slopes.F90 37.12% <3.33%> (-7.82%) :arrow_down:
...eterizations/lateral/MOM_lateral_mixing_coeffs.F90 30.27% <7.84%> (-1.48%) :arrow_down:
...arameterizations/lateral/MOM_thickness_diffuse.F90 31.68% <60.00%> (+0.15%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7868fdd...91ca6ba. Read the comment docs.