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

Updates to Redi scheme #117

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions components/mpas-ocean/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ add_default($nl, 'config_Leith_visc2_max');

add_default($nl, 'config_use_Redi');
add_default($nl, 'config_Redi_closure');
add_default($nl, 'config_redi_transition_layer_mld_offset');
add_default($nl, 'config_Redi_constant_kappa');
add_default($nl, 'config_Redi_maximum_slope');
add_default($nl, 'config_Redi_use_slope_taper');
Expand Down
1 change: 1 addition & 0 deletions components/mpas-ocean/bld/build-namelist-section
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ add_default($nl, 'config_Leith_visc2_max');

add_default($nl, 'config_use_Redi');
add_default($nl, 'config_Redi_closure');
add_default($nl, 'config_redi_transition_layer_mld_offset');
add_default($nl, 'config_Redi_constant_kappa');
add_default($nl, 'config_Redi_maximum_slope');
add_default($nl, 'config_Redi_use_slope_taper');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
<config_use_Redi ocn_grid="oRRS15to5">.false.</config_use_Redi>
<config_use_Redi ocn_grid="RRSwISC6to18E3r5">.false.</config_use_Redi>
<config_Redi_closure>'constant'</config_Redi_closure>
<config_redi_transition_layer_mld_offset>100.0</config_redi_transition_layer_mld_offset>
<config_Redi_constant_kappa>400.0</config_Redi_constant_kappa>
<config_Redi_constant_kappa ocn_forcing="datm_forced_restoring">400.0</config_Redi_constant_kappa>
<config_Redi_maximum_slope>0.01</config_Redi_maximum_slope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,14 @@ Valid values: 'constant', 'equalGM', 'data'
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_redi_transition_layer_mld_offset" type="real"
category="Redi_isopycnal_mixing" group="Redi_isopycnal_mixing">
For instances where MLD lt BLD, the MLD for the transition layer (from isopycnal at depth to horizontal in the BLD) is set to BLD + this config value

Valid values: Positive real numbers.
Default: Defined in namelist_defaults.xml
</entry>

<entry id="config_Redi_constant_kappa" type="real"
category="Redi_isopycnal_mixing" group="Redi_isopycnal_mixing">
The Redi diffusion coefficient. Only used when config_Redi_closure = 'constant'.
Expand Down
13 changes: 9 additions & 4 deletions components/mpas-ocean/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@
/>
<nml_option name="config_Redi_closure" type="character" default_value="constant"
description="Control what type of function is used for Redi $\kappa$. For 'equalGM', RediKappa is set to gmBolusKappa, so picks up the closure used by GM. Note that equalGM should only be used with 2D GM schemes (e.g. config_GM_closure=constant or Visbeck), not with EdenGreatbatch."
possible_values="'constant', 'equalGM', 'data'"
possible_values="'constant', 'N2_dependent', 'equalGM', 'data'"
/>
<nml_option name="config_redi_transition_layer_mld_offset" type="real" default_value="100.0" units="m"
description="For instances where MLD lt BLD, the MLD for the transition layer (from isopycnal at depth to horizontal in the BLD) is set to BLD + this config value"
possible_values="Positive real numbers."
/>
<nml_option name="config_Redi_constant_kappa" type="real" default_value="600.0" units="m^2 s^-1"
description="The Redi diffusion coefficient. Only used when config_Redi_closure = 'constant'."
Expand Down Expand Up @@ -378,7 +382,7 @@
/>
<nml_option name="config_GM_closure" type="character" default_value="EdenGreatbatch"
description="Control what method used to compute GM $\kappa$. Both 'constant' and 'N2_dependent' use the method in Ferrari et al. 2010 (https://doi.org/10.1016/j.ocemod.2010.01.004). 'constant' uses a constant kappa in eqn 16a, while 'N2_dependent' varies kappa in the vertical according to Danabasoglu and Marshall 2007 (https://doi.org/10.1016/j.ocemod.2007.03.006). 'Visbeck' implements a horizontally varying diffusivity of Visbeck et al 1997. EdenGreatbatch implements a simplified form of the EKE scheme in Eden and Greatbatch (2008) Ocean modeling"
possible_values="'constant', 'N2_dependent', 'Visbeck', 'EdenGreatbatch'"
possible_values="'constant', 'N2_dependent', 'N2_dependent_orig', 'Visbeck', 'EdenGreatbatch'"
/>
<nml_option name="config_GM_constant_kappa" type="real" default_value="600.0" units="m^2 s^-1"
description="Coefficient of standard GM parametrization of eddy transport (Bolus component), $\kappa$. Only used when config_GM_closure is set to constant."
Expand Down Expand Up @@ -2036,6 +2040,7 @@
<var_array name="SSHGradient"/>
<var_array name="vertNonLocalFlux"/>
<var name="boundaryLayerDepth"/>
<var name="dThreshMLD"/>
<var name="effectiveDensityInLandIce"/>
<var_struct name="ecosysAuxiliary"/>
<var name="accumulatedFrazilIceMass"/>
Expand Down Expand Up @@ -3198,7 +3203,7 @@
description="spatially and depth varying GM kappa. The scaling is based on the Brunt Vaisala Frequency relative to a maximum value below the mixed layer, follows from Danabasoglu and Marshall 2007. If config_GM_closure is not set to N2_dependent the scaling value is set to 1 everywhere."
packages="gm"
/>
<var name="RediKappaSfcTaper" type="real" dimensions="nVertLevelsP1 nCells Time" units="1"
<var name="RediKappaSfcTaper" type="real" dimensions="nVertLevelsP1 nEdges Time" units="1"
description="Scaling coefficient for Redi kappa. Varies from 0 to 1."
packages="gm"
/>
Expand Down Expand Up @@ -3381,7 +3386,7 @@
description="GM Bolus Kappa value. On output, it has NOT been multiplied by the horizontal taper array gmHorizontalTaper, because that is applied at the end to the normalGMBolusVelocity variable, not to the gmBolusKappa."
packages="gm"
/>
<var name="RediKappa" type="real" dimensions="nEdges Time" units="m^2 s^-1"
<var name="RediKappa" type="real" dimensions="nVertLevelsP1 nEdges Time" units="m^2 s^-1"
description="Redi Kappa value. On output, it has already been multiplied by the horizontal taper array RediHorizontalTaper (as opposed to gmBolusKappa, which has not been multiplied by the horizontal taper)."
packages="gm"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,14 @@ function ocn_forward_mode_run(domain) result(ierr)!{{{
call mpas_timer_stop('io_monthly_surface_salinity')
endif

! --- update halos for diagnostic ocean boundary layer depth
if (config_use_cvmix_kpp) then
call mpas_timer_start("se halo diag obd")
call mpas_dmpar_field_halo_exch(domain,'boundaryLayerDepth')
call mpas_dmpar_field_halo_exch(domain,'dThreshMLD')
call mpas_timer_stop("se halo diag obd")
end if

! initialize time-varying forcing
call ocn_time_varying_forcing_init(domain)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ module ocn_diagnostics_variables

integer, dimension(:), pointer :: indMLD
real(kind=RKIND), dimension(:), pointer :: dThreshMLD

real (kind=RKIND), dimension(:,:), pointer :: velocityX, velocityY, velocityZ

real (kind=RKIND), dimension(:,:), pointer :: vertAleTransportTop
Expand All @@ -164,7 +165,7 @@ module ocn_diagnostics_variables
real (kind=RKIND), dimension(:,:,:), pointer :: activeTracerNonLocalTendency
real (kind=RKIND), dimension(:,:,:), pointer :: activeTracerHorMixTendency
real (kind=RKIND), dimension(:,:), pointer :: temperatureShortWaveTendency
real (kind=RKIND), dimension(:), pointer :: RediKappa
real (kind=RKIND), dimension(:,:), pointer :: RediKappa

! pointers for tendencies used in diagnostic budget computation
real (kind=RKIND), dimension(:,:,:), pointer, contiguous :: &
Expand Down
Loading