register_tracer Subroutine

private subroutine register_tracer(cfg, schema)

&tracer_nml: salinity + temperature IC/EOS/bounds + sediment.

Arguments

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

Calls

proc~~register_tracer~~CallsGraph proc~register_tracer register_tracer proc~group_add nml_group_t%group_add proc~register_tracer->proc~group_add proc~nml_real nml_real proc~register_tracer->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_tracer->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_tracer~~CalledByGraph proc~register_tracer register_tracer proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_tracer 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_tracer(cfg, schema)
      !! `&tracer_nml`: salinity + temperature IC/EOS/bounds + sediment.
      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
      character(len=:), pointer :: ps

      g%name = "tracer"
      g%doc = "Salinity + temperature IC/EOS/bounds, sediment transport."
      pr => cfg%initial_salinity
      call g%add(nml_real("initial_salinity", pr, "Initial salinity (uniform IC)", units="PSU"))
      pr => cfg%S_ref
      call g%add(nml_real("S_ref", pr, "EOS reference salinity", units="PSU", &
                          dead_on_ocean_path="RETIRED -- stored onto tracer_t%eos_ref via "// &
                          "register_default_tracers but eos_ref is read nowhere on the ocean "// &
                          "path. The live ocean-path spelling is &ocean_ic_nml S_ref; setting "// &
                          "THIS one to anything other than its default is a fail-loud "// &
                          "configure error (validate_config)."))
      pr => cfg%beta_S
      call g%add(nml_real("beta_S", pr, "Haline contraction coefficient", units="kg/m^3/PSU", &
                          dead_on_ocean_path="RETIRED -- stored onto tracer_t%eos_coeff via "// &
                          "register_default_tracers but eos_coeff is read nowhere on the "// &
                          "ocean path. The live ocean-path spelling is &ocean_ic_nml beta_S; "// &
                          "setting THIS one to anything other than its default is a fail-loud "// &
                          "configure error (validate_config)."))
      pr => cfg%S_min
      call g%add(nml_real("S_min", pr, "Lower physical bound for salinity", units="PSU", &
                          dead_on_ocean_path="stored onto tracer_t%tr_min via "// &
                          "register_default_tracers but tr_min is read nowhere on the ocean "// &
                          "path (found by the P4 dead-knob sweep, 2026-09-10)."))
      pr => cfg%S_max
      call g%add(nml_real("S_max", pr, "Upper physical bound for salinity", units="PSU", &
                          dead_on_ocean_path="stored onto tracer_t%tr_max via "// &
                          "register_default_tracers but tr_max is read nowhere on the ocean "// &
                          "path (found by the P4 dead-knob sweep, 2026-09-10)."))
      pr => cfg%kappa_S_bg
      call g%add(nml_real("kappa_S_bg", pr, "Background vertical salinity diffusivity", units="m^2/s", &
                          dead_on_ocean_path="stored onto tracer_t%kappa_bg via "// &
                          "register_default_tracers but kappa_bg is read nowhere on the "// &
                          "ocean path -- the ocean path's background salt diffusivity is "// &
                          "&ocean_vmix_nml ks_bg (found by the P4 dead-knob sweep, 2026-09-10)."))
      pr => cfg%S_init_surface
      call g%add(nml_real("S_init_surface", pr, &
                          "Initial surface salinity at k=nz (linear-in-layer stratified IC; "// &
                          "needs S_init_bottom non-zero too)", units="PSU", min=0.0_wp))
      pr => cfg%S_init_bottom
      call g%add(nml_real("S_init_bottom", pr, &
                          "Initial bed salinity at k=1 (linear-in-layer stratified IC; "// &
                          "needs S_init_surface non-zero too)", units="PSU", min=0.0_wp))
      pr => cfg%initial_temperature
      call g%add(nml_real("initial_temperature", pr, "Initial temperature (uniform IC)", units="degC"))
      pr => cfg%T_ref
      call g%add(nml_real("T_ref", pr, "EOS reference temperature", units="degC", &
                          dead_on_ocean_path="RETIRED -- stored onto tracer_t%eos_ref via "// &
                          "register_default_tracers but eos_ref is read nowhere on the ocean "// &
                          "path. The live ocean-path spelling is &ocean_ic_nml T_ref; setting "// &
                          "THIS one to anything other than its default is a fail-loud "// &
                          "configure error (validate_config)."))
      pr => cfg%alpha_T
      call g%add(nml_real("alpha_T", pr, "Thermal expansion coefficient", units="kg/m^3/degC", &
                          dead_on_ocean_path="RETIRED -- the coastal-legacy alpha_T (D2.5): "// &
                          "stored onto tracer_t%eos_coeff via register_default_tracers but "// &
                          "eos_coeff is read nowhere on the ocean path. The live ocean-path "// &
                          "spelling is &ocean_ic_nml alpha_T; setting THIS one to anything "// &
                          "other than its default is a fail-loud configure error "// &
                          "(validate_config)."))
      pr => cfg%T_min
      call g%add(nml_real("T_min", pr, "Lower physical bound for temperature", units="degC", &
                          dead_on_ocean_path="stored onto tracer_t%tr_min via "// &
                          "register_default_tracers but tr_min is read nowhere on the ocean "// &
                          "path (found by the P4 dead-knob sweep, 2026-09-10)."))
      pr => cfg%T_max
      call g%add(nml_real("T_max", pr, "Upper physical bound for temperature", units="degC", &
                          dead_on_ocean_path="stored onto tracer_t%tr_max via "// &
                          "register_default_tracers but tr_max is read nowhere on the ocean "// &
                          "path (found by the P4 dead-knob sweep, 2026-09-10)."))
      pr => cfg%kappa_T_bg
      call g%add(nml_real("kappa_T_bg", pr, "Background vertical temperature diffusivity", units="m^2/s", &
                          dead_on_ocean_path="stored onto tracer_t%kappa_bg via "// &
                          "register_default_tracers but kappa_bg is read nowhere on the "// &
                          "ocean path -- the ocean path's background heat diffusivity is "// &
                          "&ocean_vmix_nml kt_bg (found by the P4 dead-knob sweep, 2026-09-10)."))
      pr => cfg%T_init_surface
      call g%add(nml_real("T_init_surface", pr, "Initial surface temperature (stratified IC)", units="degC"))
      pr => cfg%T_init_bottom
      call g%add(nml_real("T_init_bottom", pr, "Initial bed temperature (stratified IC)", units="degC"))
      call schema%add_group(g)
   end subroutine register_tracer