register_time Subroutine

private subroutine register_time(cfg, schema)

&time_nml: time-integration controls. t_end is interpreted in time_unit and converted to seconds by the post-parse cascade in read_config; dt_fixed/dt_max stay in seconds. time_unit is a plain string (the cascade validates its set).

Arguments

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

Calls

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

Source Code

   subroutine register_time(cfg, schema)
      !! `&time_nml`: time-integration controls.  `t_end` is interpreted
      !! in `time_unit` and converted to seconds by the post-parse
      !! cascade in read_config; `dt_fixed`/`dt_max` stay in seconds.
      !! `time_unit` is a plain string (the cascade validates its set).
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      integer, pointer :: pi
      real(wp), pointer :: pr
      character(len=:), pointer :: ps

      g%name = "time"
      g%doc = "Time-integration controls."
      pr => cfg%t_end
      call g%add(nml_real("t_end", pr, "Simulation end time (in time_unit)"))
      pr => cfg%cfl
      call g%add(nml_real("cfl", pr, "CFL number for adaptive timestep"))
      pr => cfg%dt_max
      call g%add(nml_real("dt_max", pr, "Maximum allowable timestep", units="s", &
                          dead_on_ocean_path="accepted and type/range-validated but read "// &
                          "nowhere in src/ -- the ocean path's adaptive-timestep ceiling "// &
                          "comes from the barotropic gravity-wave CFL (auto_n_inner), not "// &
                          "this knob (found by the P4 dead-knob sweep, 2026-09-10)."))
      pr => cfg%dt_fixed
      call g%add(nml_real("dt_fixed", pr, "Fixed timestep (0 = adaptive CFL)", units="s"))
      pi => cfg%cfl_interval
      call g%add(nml_int("cfl_interval", pi, "Recompute CFL timestep every N steps", min=1, &
                         dead_on_ocean_path="accepted and range-validated but read nowhere "// &
                         "in src/ -- there is no adaptive-CFL recompute cadence on the ocean "// &
                         "path to interval-gate (found by the P4 dead-knob sweep, 2026-09-10)."))
      ps => cfg%time_unit
      call g%add(nml_string("time_unit", ps, &
                            "Unit for the long-time fields: s/min/hr/day/year"))
      call schema%add_group(g)
   end subroutine register_time