Skip to content

Commit

Permalink
Add config_Redi_closure='equalGM'
Browse files Browse the repository at this point in the history
This reverts commit 88fd9c0.
  • Loading branch information
mark-petersen committed Apr 20, 2022
1 parent 88fd9c0 commit 826ff40
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ Default: Defined in namelist_defaults.xml

<entry id="config_Redi_closure" type="char*1024"
category="Redi_isopycnal_mixing" group="Redi_isopycnal_mixing">
Control what type of function is used for Redi $\kappa$.
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.

Valid values: 'constant', 'data'
Valid values: 'constant', 'equalGM', 'data'
Default: Defined in namelist_defaults.xml
</entry>

Expand Down
4 changes: 2 additions & 2 deletions components/mpas-ocean/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@
possible_values=".true. or .false."
/>
<nml_option name="config_Redi_closure" type="character" default_value="constant" units="unitless"
description="Control what type of function is used for Redi $\kappa$."
possible_values="'constant', 'data'"
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."
possible_values="'constant', 'equalGM', 'data'"
/>
<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
14 changes: 13 additions & 1 deletion components/mpas-ocean/src/shared/mpas_ocn_gm.F
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,19 @@ subroutine ocn_GM_compute_Bolus_velocity(statePool, &
deallocate (RossbyRadiusTaper)
end if

if (config_Redi_closure == 'constant'.and. &
if (config_Redi_closure == 'equalGM') then
! Set Redi closure to be the same as the GM closure, i.e. if
! config_GM_closure is EdenGreatbatch or Visbeck, you will see those
! same closure fields in RediKappa. The horizontal tapering still
! comes from the config_Redi_horizontal_taper flag, not GM.
!$omp parallel
!$omp do schedule(runtime)
do iEdge=1, nEdges
RediKappa(iEdge) = RediHorizontalTaper(iEdge) * gmBolusKappa(iEdge)
end do
!$omp end do
!$omp end parallel
else if (config_Redi_closure == 'constant'.and. &
config_Redi_horizontal_taper == 'RossbyRadius') then
!$omp parallel
!$omp do schedule(runtime)
Expand Down

0 comments on commit 826ff40

Please sign in to comment.