2D mirror of config_schema (Full 2D Parity phase P2): the transport's
SET_/GET_ opcodes resolve parameter names against THIS table when the
attached session is dim=2. Kind tags are shared with the 1D module so
protocol_codec.decode_set_value needs no dim awareness. Setters validate
key existence and type only; VALUE ranges are enforced by
validate_config_2d at session INITIALIZE (same contract as 1D).
n_cell is a namelist-reader cascade convenience, not a config_2d_t
field, and is deliberately absent. config_2d has no real3 parameters,
so the real3 accessors always report unknown-key (kept for symmetry).
Internals are derived from the shared config_engine field-descriptor
table (built once per call by config_2d.build_field_table_2d) rather
than a hand-maintained select case per field; the public API is
unchanged.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | n_schema_entries_2d | = | n_config_fields_2d |
Number of published 2D schema entries (== n_config_fields_2d, the frozen
|
| type(config_2d_t), | private, | save, target | :: | schema_defaults_2d |
Static schema state: one saved table bound to a saved default instance. |
||
| type(field_desc_t), | private, | save | :: | schema_fields_2d(n_config_fields_2d) | |||
| logical, | private, | save | :: | schema_2d_ready | = | .false. |
Minimal schema record: canonical key, namelist group, value kind.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=32), | public | :: | key | = | '' | ||
| character(len=32), | public | :: | group | = | '' | ||
| integer, | public | :: | value_kind | = | 0 |
Find a 2D schema entry by key; 0 when absent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key |
Keys whose value read_config_2d stores lowercased (selector-like fields): every kind_choice field in the table, PLUS grid_type and output_format, which are kind_string rather than kind_choice but get the same historical to_lower-on-parse treatment, so the setter must special-case them alongside the choice keys. Table-driven rather than a hand-maintained key list, but yields the identical 12 keys the old list named (10 choice-kind fields + these 2 string-kind fields).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(field_desc_t), | intent(in) | :: | fields(:) | |||
| character(len=*), | intent(in) | :: | normalized_key |
Resolve a wire-protocol key against the 2D schema (same shape as
protocol_codec.schema_lookup). Unknown key: ok=.false. with an
"unknown config key: ..." message the transport forwards verbatim.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(out) | :: | idx | |||
| integer, | intent(out) | :: | expected_kind | |||
| logical, | intent(out) | :: | ok | |||
| character(len=*), | intent(out) | :: | message |
Read one integer-valued field from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one integer-valued field in cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(inout), | target | :: | cfg | ||
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(in) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read one scalar real-valued field from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one scalar real-valued field in cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(inout), | target | :: | cfg | ||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(in) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read one logical field from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| logical, | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one logical field in cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(inout), | target | :: | cfg | ||
| character(len=*), | intent(in) | :: | key | |||
| logical, | intent(in) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read one string or choice-token field from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one string or choice-token field in cfg by schema key.
Choice tokens (and grid_type/output_format) are lowercased on write,
mirroring read_config_2d's to_lower-on-parse behavior: downstream
dispatch (schemes_2d, boundary_2d/boundary_conditions, resolve_*_scheme)
compares these fields with exact-case ==, so a value set through this
wire-protocol path must land already-normalized.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(inout), | target | :: | cfg | ||
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(in) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
config_2d has no real3 parameters: always unknown-key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(out) | :: | value(3) | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
config_2d has no real3 parameters: always unknown-key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_2d_t), | intent(inout) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(in) | :: | value(3) | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Populate the saved schema table on first use, bound to a saved default
config_2d_t instance (mirrors config_schema's ensure_schema).
Fan out a success flag and message to optional outputs (mirrors 1D).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | ok | |||
| character(len=*), | intent(in) | :: | err | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |