register_ocean_dataovr Subroutine

private subroutine register_ocean_dataovr(cfg, schema)

&ocean_dataovr_nml: file-backed surface forcing (PR-15). Flat per-tag knobs (<tag>_file, <tag>_var, <tag>_scale, <tag>_add) rather than a MOM6-style parallel-array data table — the schema engine has no string-array key type, and the set of recognised tags is fixed by the slots they feed, so a flat layout is both expressible today and self-documenting in docs/generated_nml_knobs.md.

Arguments

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

Calls

proc~~register_ocean_dataovr~~CallsGraph proc~register_ocean_dataovr register_ocean_dataovr proc~add_dataovr_entry add_dataovr_entry proc~register_ocean_dataovr->proc~add_dataovr_entry proc~group_add nml_group_t%group_add proc~register_ocean_dataovr->proc~group_add proc~nml_enum nml_enum proc~register_ocean_dataovr->proc~nml_enum proc~nml_logical nml_logical proc~register_ocean_dataovr->proc~nml_logical proc~nml_real nml_real proc~register_ocean_dataovr->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_ocean_dataovr->proc~schema_add_group proc~add_dataovr_entry->proc~group_add proc~add_dataovr_entry->proc~nml_real proc~nml_string nml_string proc~add_dataovr_entry->proc~nml_string 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_dataovr~~CalledByGraph proc~register_ocean_dataovr register_ocean_dataovr proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_ocean_dataovr 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
logical, private, pointer :: pl
real(kind=wp), private, pointer :: pr
character(len=:), private, pointer :: ps

Source Code

   subroutine register_ocean_dataovr(cfg, schema)
      !! `&ocean_dataovr_nml`: file-backed surface forcing (PR-15).  Flat
      !! per-tag knobs (`<tag>_file`, `<tag>_var`, `<tag>_scale`,
      !! `<tag>_add`) rather than a MOM6-style parallel-array data table
      !! — the schema engine has no string-array key type, and the set of
      !! recognised tags is fixed by the slots they feed, so a flat
      !! layout is both expressible today and self-documenting in
      !! `docs/generated_nml_knobs.md`.
      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
      character(len=:), pointer :: ps

      g%name = "ocean_dataovr"
      g%doc = "File-backed surface forcing (PR-15): wind stress, heat, freshwater."
      pl => cfg%ocean%dataovr%enable
      call g%add(nml_logical("enable", pl, &
                             "Master switch (default off; requires RDB_ENABLE_NETCDF=ON)"))
      ps => cfg%ocean%dataovr%time_mode
      call g%add(nml_enum("time_mode", ps, &
                          "Shared time-axis mode for every active tag", &
                          allowed=[character(len=6) :: "linear", "cyclic", "static"]))
      pr => cfg%ocean%dataovr%cycle_period
      call g%add(nml_real("cycle_period", pr, &
                          "Climatology period (required > 0 when time_mode=cyclic)", &
                          units="s", min=0.0_wp))
      pr => cfg%ocean%dataovr%t_offset
      call g%add(nml_real("t_offset", pr, &
                          "Added to the model time before the file-axis lookup", units="s"))
      pl => cfg%ocean%dataovr%oor_clamp
      call g%add(nml_logical("oor_clamp", pl, &
                             "Clamp an out-of-range query to the end record instead of aborting"))

      call add_dataovr_entry(g, cfg%ocean%dataovr%tau_x, "tau_x", &
                             "zonal wind stress", "Pa")
      call add_dataovr_entry(g, cfg%ocean%dataovr%tau_y, "tau_y", &
                             "meridional wind stress", "Pa")
      call add_dataovr_entry(g, cfg%ocean%dataovr%heat, "heat", &
                             "net surface heat flux (positive down)", "W m-2")
      call add_dataovr_entry(g, cfg%ocean%dataovr%evap, "evap", &
                             "evaporative mass flux (<= 0)", "kg m-2 s-1")
      call add_dataovr_entry(g, cfg%ocean%dataovr%lprec, "lprec", &
                             "liquid precipitation (>= 0)", "kg m-2 s-1")
      call add_dataovr_entry(g, cfg%ocean%dataovr%salt, "salt", &
                             "surface salt flux (positive salinifies)", "kg m-2 s-1")

      call schema%add_group(g)
   end subroutine register_ocean_dataovr