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 ocean option for Redi kappa to be set equal to GM (AMOC PR 3/6) #4904

Merged
merged 3 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. Note that equalGM should only be used with 2D GM schemes (e.g. config_GM_closure=constant or Visbeck), not with EdenGreatbatch.

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. 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'"
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be good to say this only works for 2-d schemes (e.g. constant or visbeck)? This won't work for edenGreatbatch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I added that comment above.

/>
<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 @@ -762,7 +762,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) = gmHorizontalTaper(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
5 changes: 4 additions & 1 deletion components/mpas-ocean/src/shared/mpas_ocn_tracer_hmix_redi.F
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,10 @@ subroutine ocn_tracer_hmix_Redi_init(domain, err)!{{{


! initialize Redi kappa array
if (config_Redi_closure == 'constant') then
if (config_Redi_closure == 'constant'.or. &
config_Redi_closure == 'equalGM') then
! For 'equalGM' RediKappa is updated every step. Just
! initialize here.
!$omp parallel
!$omp do schedule(runtime)
do iEdge = 1, nEdges
Expand Down