add_dataovr_entry Subroutine

private subroutine add_dataovr_entry(g, e, tag, what, units)

Register the four flat knobs of one &ocean_dataovr_nml tag. e is target, intent(in) for the same reason cfg is in every register_ocean_* above: the schema stores a pointer to the target and assigns through it at parse time, and the actual argument is always a component of the target cfg, so the association outlives this call.

Arguments

Type IntentOptional Attributes Name
type(nml_group_t), intent(inout) :: g
type(dataovr_entry_config_t), intent(in), target :: e
character(len=*), intent(in) :: tag
character(len=*), intent(in) :: what
character(len=*), intent(in) :: units

Calls

proc~~add_dataovr_entry~~CallsGraph proc~add_dataovr_entry add_dataovr_entry proc~group_add nml_group_t%group_add proc~add_dataovr_entry->proc~group_add proc~nml_real nml_real 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

Called by

proc~~add_dataovr_entry~~CalledByGraph proc~add_dataovr_entry add_dataovr_entry proc~register_ocean_dataovr register_ocean_dataovr proc~register_ocean_dataovr->proc~add_dataovr_entry 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

Variables

Type Visibility Attributes Name Initial
real(kind=wp), private, pointer :: pr
character(len=:), private, pointer :: ps

Source Code

   subroutine add_dataovr_entry(g, e, tag, what, units)
      !! Register the four flat knobs of one `&ocean_dataovr_nml` tag.
      !! `e` is `target, intent(in)` for the same reason `cfg` is in every
      !! `register_ocean_*` above: the schema stores a pointer to the
      !! target and assigns through it at parse time, and the actual
      !! argument is always a component of the `target` `cfg`, so the
      !! association outlives this call.
      type(nml_group_t), intent(inout) :: g
      type(dataovr_entry_config_t), target, intent(in) :: e
      character(len=*), intent(in) :: tag, what, units
      real(wp), pointer :: pr
      character(len=:), pointer :: ps

      ps => e%file
      call g%add(nml_string(tag//"_file", ps, &
                            "Path to the "//what//" NetCDF (blank ⇒ tag not file-driven)"))
      ps => e%var
      call g%add(nml_string(tag//"_var", ps, &
                            "Variable name inside "//tag//"_file (required when it is set)"))
      pr => e%scale
      call g%add(nml_real(tag//"_scale", pr, &
                          "Multiplier applied to the "//what//" slab at read", units=units))
      pr => e%add_offset
      call g%add(nml_real(tag//"_add", pr, &
                          "Offset added to the "//what//" slab after scale", units=units))
   end subroutine add_dataovr_entry