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 | Intent | Optional | 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 |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private, | pointer | :: | pr | |||
| character(len=:), | private, | pointer | :: | ps |
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