register_output Subroutine

private subroutine register_output(cfg, schema)

&output_nml: file output + I/O + forcing/restart/gauge files.

Arguments

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

Calls

proc~~register_output~~CallsGraph proc~register_output register_output proc~group_add nml_group_t%group_add proc~register_output->proc~group_add proc~nml_int nml_int proc~register_output->proc~nml_int proc~nml_logical nml_logical proc~register_output->proc~nml_logical proc~nml_real nml_real proc~register_output->proc~nml_real proc~nml_string nml_string proc~register_output->proc~nml_string proc~schema_add_group nml_schema_t%schema_add_group proc~register_output->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_output~~CalledByGraph proc~register_output register_output proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_output 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_output(cfg, schema)
      !! `&output_nml`: file output + I/O + forcing/restart/gauge files.
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      real(wp), pointer :: pr
      integer, pointer :: pi
      logical, pointer :: pl
      character(len=:), pointer :: ps

      g%name = "output"
      g%doc = "File output, I/O server, forcing/restart/gauge files."
      pl => cfg%output_to_file
      call g%add(nml_logical("output_to_file", pl, "Enable file output (NetCDF snapshots)", &
                             dead_on_ocean_path="accepted and validated but read nowhere in "// &
                             "src/ -- NetCDF output is gated by RDB_ENABLE_NETCDF at build "// &
                             "time and by the diag/restart registries at run time, not by this "// &
                             "flag (found by the P4 dead-knob sweep, 2026-09-10)."))
      ps => cfg%output_dir
      call g%add(nml_string("output_dir", ps, "Directory for output files"))
      pr => cfg%restart_interval
      call g%add(nml_real("restart_interval", pr, "Time between restart writes (0 = none)", units="s"))
      pl => cfg%compress_output
      call g%add(nml_logical("compress_output", pl, "Deflate-compress NetCDF output"))
      pi => cfg%compress_level
      call g%add(nml_int("compress_level", pi, "Deflate level (1=fast, 9=max)", min=1, max=9))
      pl => cfg%use_io_server
      call g%add(nml_logical("use_io_server", pl, "Dedicate one MPI rank per node as I/O server"))
      ps => cfg%bathymetry_file
      call g%add(nml_string("bathymetry_file", ps, "NetCDF bathymetry file (empty = flat)"))
      ps => cfg%restart_file
      call g%add(nml_string("restart_file", ps, "Restart file for warm start (empty = cold)"))
      call schema%add_group(g)
   end subroutine register_output