register_ocean_pgf Subroutine

private subroutine register_ocean_pgf(cfg, schema)

&ocean_pgf_nml: pressure-gradient-force kernel selector + knobs. form enum mirrors parse_opgf_variant in rdb_ocean_pressure_force.

Arguments

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

Calls

proc~~register_ocean_pgf~~CallsGraph proc~register_ocean_pgf register_ocean_pgf proc~group_add nml_group_t%group_add proc~register_ocean_pgf->proc~group_add proc~nml_enum nml_enum proc~register_ocean_pgf->proc~nml_enum proc~nml_int nml_int proc~register_ocean_pgf->proc~nml_int proc~nml_logical nml_logical proc~register_ocean_pgf->proc~nml_logical proc~nml_real nml_real proc~register_ocean_pgf->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_ocean_pgf->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_ocean_pgf~~CalledByGraph proc~register_ocean_pgf register_ocean_pgf proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_ocean_pgf 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
character(len=:), private, pointer :: ps

Source Code

   subroutine register_ocean_pgf(cfg, schema)
      !! `&ocean_pgf_nml`: pressure-gradient-force kernel selector + knobs.
      !! `form` enum mirrors `parse_opgf_variant` in rdb_ocean_pressure_force.
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      real(wp), pointer :: pr
      logical, pointer :: pl
      integer, pointer :: pi
      character(len=:), pointer :: ps

      g%name = "ocean_pgf"
      g%doc = "Pressure-gradient-force kernel selector + knobs."
      ps => cfg%ocean%pgf%form
      ! "montgomery" is a long-spelling alias for "mont": `parse_opgf_variant`
      ! accepts it, so the schema must too or the alias is unreachable through
      ! the namelist (the enum gate rejects before the parser is ever called).
      ! Both canonicalise to OPGF_VARIANT_MONT; the only literal comparison on
      ! this key anywhere is against "gprime", so the extra spelling is inert.
      call g%add(nml_enum("form", ps, "PGF kernel variant", &
                          allowed=[character(len=10) :: "mont", "montgomery", "fv_lite", &
                                   "fv_wright", "gprime", "fv_mom6"]))
      pr => cfg%ocean%pgf%gprime_gfs
      call g%add(nml_real("gprime_gfs", pr, "Free-surface gravity for the gprime PGF", &
                          units="m/s^2"))
      pr => cfg%ocean%pgf%gprime_gint
      call g%add(nml_real("gprime_gint", pr, "Internal-interface reduced gravity (gprime PGF)", &
                          units="m/s^2"))
      pr => cfg%ocean%pgf%gfs_scale
      call g%add(nml_real("gfs_scale", pr, "Free-surface gravity scaling (FV_MOM6, MOM6 GFS_scale)"))
      pr => cfg%ocean%pgf%maxvel
      call g%add(nml_real("maxvel", pr, "Velocity-truncation clamp (0 = disabled)", units="m/s"))
      pr => cfg%ocean%pgf%cfl_trunc
      call g%add(nml_real("cfl_trunc", pr, "Advective-CFL velocity truncation threshold (0 = disabled)"))
      pl => cfg%ocean%pgf%mass_weight
      call g%add(nml_logical("mass_weight", pl, &
                             "FV_MOM6 shelf-break hWght mass-weighting at unequal-depth faces"))
      pl => cfg%ocean%pgf%reconstruct_for_pressure
      call g%add(nml_logical("reconstruct_for_pressure", pl, &
                             "FV_MOM6 in-layer PLM/PPM T/S reconstruction for the density integral"))
      pi => cfg%ocean%pgf%recon_scheme
      call g%add(nml_int("recon_scheme", pi, &
                         "In-layer reconstruction scheme: 1=PLM, 2=PPM", min=1, max=2))
      pl => cfg%ocean%pgf%insitu_density
      call g%add(nml_logical("insitu_density", pl, &
                             "FV_MOM6 constant-by-layer density at its in-situ pressure "// &
                             "(MOM6 PCM parity); .false. = legacy potential density at "// &
                             "&ocean_eos_nml p_ref. Inert for the linear EOS"))
      pl => cfg%ocean%pgf%p_top_in_bc
      call g%add(nml_logical("p_top_in_bc", pl, &
                             "FV_MOM6: add the top-of-column load ms%p_top to "// &
                             "the pressure-stack surface boundary condition "// &
                             "pa(nz+1) = rho_ref*g*eta + p_top"))
      call schema%add_group(g)
   end subroutine register_ocean_pgf