Abstract base for a single namelist key descriptor.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=:), | public, | allocatable | :: | dead_reason |
Unallocated/empty = live. Non-empty = this knob is registered
(accepted, type/range-validated) but does NOT reach any
ocean-path behaviour – e.g. |
||
| character(len=:), | public, | allocatable | :: | doc |
Human-readable description (FORD-style synthesis doc). |
||
| logical, | public | :: | found | = | .false. |
Parse-state: set true when the key is seen in the file. |
|
| character(len=:), | public, | allocatable | :: | name |
Key name (matched case-insensitively). |
||
| logical, | public | :: | required | = | .false. |
If true, the key must appear whenever its group appears. |
|
| character(len=:), | public, | allocatable | :: | units |
Optional units string, default ‘’. |
Captured default value, formatted for namelist output.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nml_key_t), | intent(in) | :: | this |
True if the current target value equals the captured default.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nml_key_t), | intent(in) | :: | this |
Validate values and assign through the target pointer.
On success err_msg is left unallocated.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nml_key_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | values(:) | |||
| character(len=:), | intent(out), | allocatable | :: | err_msg |
Current target value, formatted for namelist output.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nml_key_t), | intent(in) | :: | this |
type, abstract :: nml_key_t !! Abstract base for a single namelist key descriptor. character(len=:), allocatable :: name !! Key name (matched case-insensitively). character(len=:), allocatable :: doc !! Human-readable description (FORD-style synthesis doc). character(len=:), allocatable :: units !! Optional units string, default ''. logical :: required = .false. !! If true, the key must appear whenever its group appears. logical :: found = .false. !! Parse-state: set true when the key is seen in the file. character(len=:), allocatable :: dead_reason !! Unallocated/empty = live. Non-empty = this knob is registered !! (accepted, type/range-validated) but does NOT reach any !! ocean-path behaviour -- e.g. `&vcoord_nml zstar_stretching` !! is captured on `cfg` but never copied onto `ocean_state%vcoord` !! (rdb_ocean_vcoord.F90:179,182). Carried into the JSON emitter !! (`render_json`) so a generated caller-side layer can warn on !! assignment instead of presenting a dead knob as live. contains procedure(parse_tokens_iface), deferred :: parse_tokens procedure(value_string_iface), deferred :: value_string procedure(default_string_iface), deferred :: default_string procedure(is_default_iface), deferred :: is_default end type nml_key_t