Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/chf-sto.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"period": {
"fields": {
"storage": {
"stress_period_data": {
"type": "string",
"longname": "storage state",
"description": "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block.",
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/chf-sto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ longname = "export array variables to layered ascii files."
description = "keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files."
optional = true

[blocks.period.fields.storage]
[blocks.period.fields.stress_period_data]
type = "string"
longname = "storage state"
description = "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block."
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/chf-sto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ blocks:
optional: true
period:
fields:
storage:
stress_period_data:
type: string
longname: storage state
description: keyword to indicate that stress period IPER is steady-state. Steady-state conditions
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/gwf-sto.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
},
"period": {
"fields": {
"storage": {
"stress_period_data": {
"type": "string",
"longname": "storage state",
"description": "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block. If the CSUB Package is included in the GWF model, only the first and last stress period can be steady-state.",
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/gwf-sto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ shape = [
"nodes",
]

[blocks.period.fields.storage]
[blocks.period.fields.stress_period_data]
type = "string"
longname = "storage state"
description = "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block. If the CSUB Package is included in the GWF model, only the first and last stress period can be steady-state."
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/gwf-sto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ blocks:
- nodes
period:
fields:
storage:
stress_period_data:
type: string
longname: storage state
description: keyword to indicate that stress period IPER is steady-state. Steady-state conditions
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/olf-sto.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"period": {
"fields": {
"storage": {
"stress_period_data": {
"type": "string",
"longname": "storage state",
"description": "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block.",
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/olf-sto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ longname = "export array variables to layered ascii files."
description = "keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files."
optional = true

[blocks.period.fields.storage]
[blocks.period.fields.stress_period_data]
type = "string"
longname = "storage state"
description = "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block."
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/olf-sto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ blocks:
optional: true
period:
fields:
storage:
stress_period_data:
type: string
longname: storage state
description: keyword to indicate that stress period IPER is steady-state. Steady-state conditions
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/swf-sto.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"period": {
"fields": {
"storage": {
"stress_period_data": {
"type": "string",
"longname": "storage state",
"description": "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block.",
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/swf-sto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ longname = "export array variables to layered ascii files."
description = "keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files."
optional = true

[blocks.period.fields.storage]
[blocks.period.fields.stress_period_data]
type = "string"
longname = "storage state"
description = "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block."
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev2/swf-sto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ blocks:
optional: true
period:
fields:
storage:
stress_period_data:
type: string
longname: storage state
description: keyword to indicate that stress period IPER is steady-state. Steady-state conditions
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/chf-sto.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"period": {
"fields": {
"storage": {
"stress_period_data": {
"type": "string",
"longname": "storage state",
"description": "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block.",
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/chf-sto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ longname = "export array variables to layered ascii files."
description = "keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files."
optional = true

[blocks.period.fields.storage]
[blocks.period.fields.stress_period_data]
type = "string"
longname = "storage state"
description = "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block."
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/chf-sto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ blocks:
optional: true
period:
fields:
storage:
stress_period_data:
type: string
longname: storage state
description: keyword to indicate that stress period IPER is steady-state. Steady-state conditions
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
},
"period": {
"fields": {
"storage": {
"stress_period_data": {
"type": "string",
"longname": "storage state",
"description": "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block. If the CSUB Package is included in the GWF model, only the first and last stress period can be steady-state.",
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ shape = [
"nodes",
]

[blocks.period.fields.storage]
[blocks.period.fields.stress_period_data]
type = "string"
longname = "storage state"
description = "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block. If the CSUB Package is included in the GWF model, only the first and last stress period can be steady-state."
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ blocks:
- nodes
period:
fields:
storage:
stress_period_data:
type: string
longname: storage state
description: keyword to indicate that stress period IPER is steady-state. Steady-state conditions
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/olf-sto.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"period": {
"fields": {
"storage": {
"stress_period_data": {
"type": "string",
"longname": "storage state",
"description": "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block.",
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/olf-sto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ longname = "export array variables to layered ascii files."
description = "keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files."
optional = true

[blocks.period.fields.storage]
[blocks.period.fields.stress_period_data]
type = "string"
longname = "storage state"
description = "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block."
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/olf-sto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ blocks:
optional: true
period:
fields:
storage:
stress_period_data:
type: string
longname: storage state
description: keyword to indicate that stress period IPER is steady-state. Steady-state conditions
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/swf-sto.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"period": {
"fields": {
"storage": {
"stress_period_data": {
"type": "string",
"longname": "storage state",
"description": "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block.",
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/swf-sto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ longname = "export array variables to layered ascii files."
description = "keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files."
optional = true

[blocks.period.fields.storage]
[blocks.period.fields.stress_period_data]
type = "string"
longname = "storage state"
description = "keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block."
Expand Down
2 changes: 1 addition & 1 deletion autotest/dfns/__snapshots__/v2.0.0.dev3/swf-sto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ blocks:
optional: true
period:
fields:
storage:
stress_period_data:
type: string
longname: storage state
description: keyword to indicate that stress period IPER is steady-state. Steady-state conditions
Expand Down
6 changes: 4 additions & 2 deletions autotest/dfns/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,11 @@ def test_memory_output_attributes_rcha(dev3_spec):


@pytest.mark.parametrize("name", ["chf-sto", "gwf-sto", "olf-sto", "swf-sto"])
def test_sto_storage_field_is_untagged(dev3_spec, name):
def test_sto_period_field_is_untagged(dev3_spec, name):
"""STO's PERIOD block writes a bare STEADY-STATE/TRANSIENT line, no STORAGE prefix."""
storage = dev3_spec.components[name].blocks["period"].fields["storage"]
fields = dev3_spec.components[name].blocks["period"].fields
assert "storage" not in fields
storage = fields["stress_period_data"]
assert storage.tagged is False
assert storage.valid == ["steady-state", "transient"]

Expand Down
9 changes: 6 additions & 3 deletions modflow_devtools/dfns/migrate_to_v2_0_0_dev2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,8 @@ def _collapse_sto_keywords(
"""
STO packages define their period block with two mutually exclusive optional
Keywords (steady-state, transient). Replace them with a single optional
String field named 'storage' with constrained valid values.
String field with constrained valid values, named 'stress_period_data' like
every other package's period data.
"""
_STO_KEYWORDS = frozenset({"steady-state", "transient"})
result = {}
Expand All @@ -1317,7 +1318,7 @@ def _collapse_sto_keywords(
continue
non_sto = {name: f for name, f in fields.items() if name not in _STO_KEYWORDS}
storage = v2.String(
name="storage",
name="stress_period_data",
longname="storage state",
description=fields["steady-state"].description,
optional=True,
Expand All @@ -1327,7 +1328,9 @@ def _collapse_sto_keywords(
tagged=False,
valid=["steady-state", "transient"],
)
result[bname] = block.model_copy(update={"fields": {**non_sto, "storage": storage}})
result[bname] = block.model_copy(
update={"fields": {**non_sto, "stress_period_data": storage}}
)
return result


Expand Down
2 changes: 1 addition & 1 deletion modflow_devtools/dfns/migrate_to_v2_0_0_dev3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ def to_v2_0_0_dev3(

# Step 5c: clear stale string source references.
# Some v1 field names are renamed by dev2 transforms (e.g. _collapse_sto_keywords
# replaces "steady-state"/"transient" with "storage"). The stress template also
# replaces "steady-state"/"transient" with "stress_period_data"). The stress template also
# sets nodelist.source = "cellid" for all stress packages, including gridded
# variants that have no cellid field. Clear any source that no longer resolves.
v2_field_names = set(component.get_fields(recurse=True).keys())
Expand Down
Loading