register_varmix Subroutine

private subroutine register_varmix(cfg, schema)

&ocean_varmix (spatially-varying GM/Redi coefficients, [4]).

Arguments

Type IntentOptional Attributes Name
type(config_t), intent(in), target :: cfg
type(nml_schema_t), intent(inout) :: schema

Calls

proc~~register_varmix~~CallsGraph proc~register_varmix register_varmix proc~group_add nml_group_t%group_add proc~register_varmix->proc~group_add proc~nml_int nml_int proc~register_varmix->proc~nml_int proc~nml_logical nml_logical proc~register_varmix->proc~nml_logical proc~nml_real nml_real proc~register_varmix->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_varmix->proc~schema_add_group error error proc~group_add->error proc~lower lower proc~group_add->proc~lower proc~schema_add_group->error proc~schema_add_group->proc~lower proc~move_group move_group proc~schema_add_group->proc~move_group

Called by

proc~~register_varmix~~CalledByGraph proc~register_varmix register_varmix proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_varmix proc~read_config_from_string_impl read_config_from_string_impl proc~read_config_from_string_impl->proc~build_rdb_schema proc~read_config_impl read_config_impl proc~read_config_impl->proc~build_rdb_schema proc~read_config read_config proc~read_config->proc~read_config_impl proc~read_config_from_string read_config_from_string proc~read_config_from_string->proc~read_config_from_string_impl proc~build_pending_handle build_pending_handle proc~build_pending_handle->proc~read_config_from_string proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~build_pending_handle proc~rdb_ocean_create_pending rdb_ocean_create_pending proc~rdb_ocean_create_pending->proc~build_pending_handle

Variables

Type Visibility Attributes Name Initial
type(nml_group_t), private :: g
integer, private, pointer :: pi
logical, private, pointer :: pl
real(kind=wp), private, pointer :: pr

Source Code

   subroutine register_varmix(cfg, schema)
      !! `&ocean_varmix` (spatially-varying GM/Redi coefficients, [4]).
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      logical, pointer :: pl
      real(wp), pointer :: pr
      integer, pointer :: pi

      g%name = "ocean_varmix"
      g%doc = "Spatially-varying GM/Redi lateral-diffusivity coefficients."

      pl => cfg%ocean%varmix%enable
      call g%add(nml_logical("enable", pl, &
                             "Master switch (requires slopes + wavespeed; default off ⇒ GM uses const khth)"))
      pl => cfg%ocean%varmix%use_visbeck
      call g%add(nml_logical("use_visbeck", pl, &
                             "Add the Visbeck/Eady khth_slope_cff·L²·SN baroclinicity term"))
      pl => cfg%ocean%varmix%resoln_scaled_khth
      call g%add(nml_logical("resoln_scaled_khth", pl, &
                             "Scale the assembled KhTh by the resolution function"))
      pl => cfg%ocean%varmix%resoln_scaled_khtr
      call g%add(nml_logical("resoln_scaled_khtr", pl, &
                             "Scale the assembled KhTr by the resolution function"))
      pl => cfg%ocean%varmix%gill_equatorial_ld
      call g%add(nml_logical("gill_equatorial_ld", pl, &
                             "Gill (1982) equatorial-Ld convention (factor 2 in beta_dx2)"))
      pl => cfg%ocean%varmix%interpolate_res_fn
      call g%add(nml_logical("interpolate_res_fn", pl, &
                             "Interpolate centre Res_fn to faces (else interpolate cg1, MOM6 default)"))
      pi => cfg%ocean%varmix%kh_res_fn_power
      call g%add(nml_int("kh_res_fn_power", pi, "Resolution-function power p (even)"))
      pr => cfg%ocean%varmix%kh_res_scale_coef
      call g%add(nml_real("kh_res_scale_coef", pr, &
                          "Resolution-function alpha ((alpha·cg1)^p denominator coef)", units="nondim"))
      pr => cfg%ocean%varmix%khth
      call g%add(nml_real("khth", pr, "Background thickness diffusivity KhTh", units="m^2/s"))
      pr => cfg%ocean%varmix%khtr
      call g%add(nml_real("khtr", pr, "Background tracer diffusivity KhTr (future Redi)", units="m^2/s"))
      pr => cfg%ocean%varmix%khth_slope_cff
      call g%add(nml_real("khth_slope_cff", pr, "Visbeck coefficient for the KhTh chain", units="nondim"))
      pr => cfg%ocean%varmix%khtr_slope_cff
      call g%add(nml_real("khtr_slope_cff", pr, "Visbeck coefficient for the KhTr chain", units="nondim"))
      pr => cfg%ocean%varmix%khth_min
      call g%add(nml_real("khth_min", pr, "Lower clamp on KhTh", units="m^2/s"))
      pr => cfg%ocean%varmix%khth_max
      call g%add(nml_real("khth_max", pr, "Upper clamp on KhTh (<= 0 ⇒ no cap)", units="m^2/s"))
      pr => cfg%ocean%varmix%khtr_min
      call g%add(nml_real("khtr_min", pr, "Lower clamp on KhTr", units="m^2/s"))
      pr => cfg%ocean%varmix%khtr_max
      call g%add(nml_real("khtr_max", pr, "Upper clamp on KhTr (<= 0 ⇒ no cap)", units="m^2/s"))
      pr => cfg%ocean%varmix%visbeck_l_scale
      call g%add(nml_real("visbeck_l_scale", pr, &
                          "Visbeck length scale L (m); if < 0, |L|²·areaCu", units="m"))
      pr => cfg%ocean%varmix%visbeck_max_slope
      call g%add(nml_real("visbeck_max_slope", pr, &
                          "S² limiter scale (<= 0 ⇒ no limit)", units="nondim"))

      call schema%add_group(g)
   end subroutine register_varmix