Skip to content

Commit

Permalink
Merge branch 'mark-petersen/ocean/redi-flux-limiter' into next (PR #5945
Browse files Browse the repository at this point in the history
)

A quasi-monotone flux limiter for isopycnal diffusion (Redi)

This PR addresses a range of issues concerning the isopycnal diffusion
operator (Redi):
* Updating the use of the triad slopes in one of the Redi fluxes.
* Correcting the implementation of the Redi fluxes.
* Adding a new new quasi-monotone flux limiting strategy that attempts
  to prevent the development of non-monotone tracer values.

[non-BFB]
[CC]
  • Loading branch information
jonbob committed Oct 24, 2023
2 parents 23a8664 + f22e3f3 commit 5472a90
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 45 deletions.
2 changes: 2 additions & 0 deletions components/mpas-ocean/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ add_default($nl, 'config_Redi_use_surface_taper');
add_default($nl, 'config_Redi_N2_based_taper_enable');
add_default($nl, 'config_Redi_N2_based_taper_min');
add_default($nl, 'config_Redi_N2_based_taper_limit_term1');
add_default($nl, 'config_Redi_use_quasi_monotone_limiter');
add_default($nl, 'config_Redi_quasi_monotone_safety_factor');
add_default($nl, 'config_Redi_min_layers_diag_terms');
add_default($nl, 'config_Redi_horizontal_taper');
add_default($nl, 'config_Redi_horizontal_ramp_min');
Expand Down
2 changes: 2 additions & 0 deletions components/mpas-ocean/bld/build-namelist-section
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ add_default($nl, 'config_Redi_use_surface_taper');
add_default($nl, 'config_Redi_N2_based_taper_enable');
add_default($nl, 'config_Redi_N2_based_taper_min');
add_default($nl, 'config_Redi_N2_based_taper_limit_term1');
add_default($nl, 'config_Redi_use_quasi_monotone_limiter');
add_default($nl, 'config_Redi_quasi_monotone_safety_factor');
add_default($nl, 'config_Redi_min_layers_diag_terms');
add_default($nl, 'config_Redi_horizontal_taper');
add_default($nl, 'config_Redi_horizontal_ramp_min');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
<config_Redi_N2_based_taper_enable>.true.</config_Redi_N2_based_taper_enable>
<config_Redi_N2_based_taper_min>0.1</config_Redi_N2_based_taper_min>
<config_Redi_N2_based_taper_limit_term1>.true.</config_Redi_N2_based_taper_limit_term1>
<config_Redi_use_quasi_monotone_limiter>.true.</config_Redi_use_quasi_monotone_limiter>
<config_Redi_quasi_monotone_safety_factor>0.9</config_Redi_quasi_monotone_safety_factor>
<config_Redi_min_layers_diag_terms>6</config_Redi_min_layers_diag_terms>
<config_Redi_min_layers_diag_terms ocn_grid="ARRM10to60E2r1">15</config_Redi_min_layers_diag_terms>
<config_Redi_horizontal_taper>'ramp'</config_Redi_horizontal_taper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,22 @@ Valid values: .true. or .false.
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_Redi_use_quasi_monotone_limiter" type="logical"
category="Redi_isopycnal_mixing" group="Redi_isopycnal_mixing">
If true, fluxes are reduced to prevent tracers from violating monotonicity. Cross-term fluxes are scaled toward zero to prevent tracers from under/overshooting the min/max values in adjacent cells and layers

Valid values: .true. or .false.
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_Redi_quasi_monotone_safety_factor" type="real"
category="Redi_isopycnal_mixing" group="Redi_isopycnal_mixing">
A safety factor applied to flux scaling when monotonicity is violated. Smaller values scale fluxes toward zero more aggressively.

Valid values: A value between 0 and 1
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_Redi_min_layers_diag_terms" type="integer"
category="Redi_isopycnal_mixing" group="Redi_isopycnal_mixing">
Redi diagonal terms (2 and 3) are turned off from layer 1 through config_Redi_min_layers_diag_terms-1, and on from config_Redi_min_layers_diag_terms to nVertLevels. The Redi diagonal terms are not guaranteed to produce bounded tracer fields, and in practice produce growing temperatures in a few columns with fewer than 5 vertical cells. Redi is meant for isopycnal mixing in the deep ocean, so not applying Redi diagonal terms in very shallow regions is an acceptable solution.
Expand Down
8 changes: 8 additions & 0 deletions components/mpas-ocean/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,14 @@
description="If true, the N2 limiting is applied to the horizontal diffusion term"
possible_values=".true. or .false."
/>
<nml_option name="config_Redi_use_quasi_monotone_limiter" type="logical" default_value=".true."
description="If true, fluxes are reduced to prevent tracers from violating monotonicity. Cross-term fluxes are scaled toward zero to prevent tracers from under/overshooting the min/max values in adjacent cells and layers"
possible_values=".true. or .false."
/>
<nml_option name="config_Redi_quasi_monotone_safety_factor" type="real" default_value="0.9"
description="A safety factor applied to flux scaling when monotonicity is violated. Smaller values scale fluxes toward zero more aggressively."
possible_values="A value between 0 and 1"
/>
<nml_option name="config_Redi_min_layers_diag_terms" type="integer" default_value="6"
description="Redi diagonal terms (2 and 3) are turned off from layer 1 through config_Redi_min_layers_diag_terms-1, and on from config_Redi_min_layers_diag_terms to nVertLevels. The Redi diagonal terms are not guaranteed to produce bounded tracer fields, and in practice produce growing temperatures in a few columns with fewer than 5 vertical cells. Redi is meant for isopycnal mixing in the deep ocean, so not applying Redi diagonal terms in very shallow regions is an acceptable solution."
possible_values="any integer between 0 (all layers on) and nVertLevels (all layers off)"
Expand Down
Loading

0 comments on commit 5472a90

Please sign in to comment.