register_ocean_topo Subroutine

private subroutine register_ocean_topo(cfg, schema)

&ocean_topo_nml: basin geometry + surface forcing + Coriolis tilt. topo_config / wind_config enums mirror the dispatch select-cases in rdb_ocean_state / rdb_ocean_setup.

Arguments

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

Calls

proc~~register_ocean_topo~~CallsGraph proc~register_ocean_topo register_ocean_topo proc~group_add nml_group_t%group_add proc~register_ocean_topo->proc~group_add proc~nml_enum nml_enum proc~register_ocean_topo->proc~nml_enum proc~nml_real nml_real proc~register_ocean_topo->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_ocean_topo->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_topo~~CalledByGraph proc~register_ocean_topo register_ocean_topo proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_ocean_topo 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
real(kind=wp), private, pointer :: pr
character(len=:), private, pointer :: ps

Source Code

   subroutine register_ocean_topo(cfg, schema)
      !! `&ocean_topo_nml`: basin geometry + surface forcing + Coriolis tilt.
      !! `topo_config` / `wind_config` enums mirror the dispatch
      !! select-cases in rdb_ocean_state / rdb_ocean_setup.
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      real(wp), pointer :: pr
      character(len=:), pointer :: ps

      g%name = "ocean_topo"
      g%doc = "Basin geometry + surface forcing + Coriolis tilt."
      ps => cfg%ocean%topo%topo_config
      call g%add(nml_enum("topo_config", ps, "Bathymetry profile selector", &
                          allowed=[character(len=12) :: "flat", "spoon", "seamount", &
                                   "neverworld2", "island", "double_drake", &
                                   "isomip_plus", "file"]))
      pr => cfg%ocean%topo%max_depth
      call g%add(nml_real("max_depth", pr, "Basin maximum depth", units="m"))
      pr => cfg%ocean%topo%edge_depth
      call g%add(nml_real("edge_depth", pr, "Spoon-bathymetry edge depth", units="m"))
      pr => cfg%ocean%topo%slope_scale
      call g%add(nml_real("slope_scale", pr, "Spoon-bathymetry exponential decay scale", units="m"))
      pr => cfg%ocean%topo%nl_continent_amp
      call g%add(nml_real("nl_continent_amp", pr, &
                          "Neverworld2 continent amplitude (1=full continents, 0=aquaplanet+channel)", &
                          units="nondim", min=0.0_wp))
      pr => cfg%ocean%topo%nl_roughness_amp
      call g%add(nml_real("nl_roughness_amp", pr, &
                          "Neverworld2 bathymetry roughness amplitude", units="nondim", min=0.0_wp))
      pr => cfg%ocean%topo%nl_min_depth
      call g%add(nml_real("nl_min_depth", pr, &
                          "Neverworld2 minimum-depth floor (MOM6 MINIMUM_DEPTH analogue)", &
                          units="m", min=0.0_wp))
      ps => cfg%ocean%topo%wind_config
      call g%add(nml_enum("wind_config", ps, "Surface wind-stress dispatch", &
                          allowed=[character(len=11) :: "constant", "2gyre", "neverworld2"]))
      pr => cfg%ocean%topo%taux_magnitude
      call g%add(nml_real("taux_magnitude", pr, "Peak zonal wind stress for wind_config=2gyre/neverworld2", &
                          units="Pa"))
      pr => cfg%ocean%topo%coriolis_beta
      call g%add(nml_real("coriolis_beta", pr, "Meridional gradient of f (0 = f-plane)", &
                          units="1/(s m)"))
      pr => cfg%ocean%topo%coriolis_y_ref
      call g%add(nml_real("coriolis_y_ref", pr, "Reference y where f = coriolis_f under beta-plane", &
                          units="m"))
      pr => cfg%ocean%topo%x_origin
      call g%add(nml_real("x_origin", pr, &
                          "Absolute x of the domain west edge, for topo_config='isomip_plus' "// &
                          "(ISOMIP+ ocean box starts at the MISMIP+ x = 320 km)", units="m"))
      call schema%add_group(g)
   end subroutine register_ocean_topo