Skip to content

Commit 26f9ef6

Browse files
committed
more cleanup
1 parent 4d68575 commit 26f9ef6

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

flopy4/mf6/codec/reader/grammar/typed.lark

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Typed grammar rules for MF6 input files
2-
// Named fields use specific types (integer/double) for validation
3-
// List/recarray data uses generic 'number' - structuring step handles type conversion
41
integer: SIGNED_INT | INT
52
double: SIGNED_NUMBER | NUMBER
63
number: SIGNED_NUMBER | NUMBER
@@ -20,7 +17,6 @@ iprn: "iprn"i integer
2017
binary: "(binary)"i
2118
filename: ESCAPED_STRING | word
2219
data: double+
23-
2420
record: token+ NEWLINE
2521
token: number | word
2622
word: /(?!(?i:begin|end))[a-zA-Z0-9._'~,-\\(\\)]+/

flopy4/mf6/spec.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import numpy as np
1313
from attrs import NOTHING, Attribute
1414
from modflow_devtools.dfn.schema.block import block_sort_key
15-
from modflow_devtools.dfn.schema.v2 import SCALAR_TYPES, FieldType
1615
from modflow_devtools.dfn.schema.v2 import Field as FieldV2
16+
from modflow_devtools.dfn.schema.v2 import FieldType
1717

1818
from flopy4.spec import array as flopy_array
1919
from flopy4.spec import coord as flopy_coord
@@ -274,22 +274,3 @@ def to_field(attribute: Attribute) -> FieldV2:
274274
if attribute.metadata.get("kind", None) == "child" # type: ignore
275275
else None, # type: ignore
276276
)
277-
278-
279-
def is_array_field(field: FieldV2) -> bool:
280-
"""Check if a field should be provided in MF6 array input format."""
281-
return field["type"] in SCALAR_TYPES and "shape" in field
282-
283-
284-
def is_list_field(field: FieldV2) -> bool:
285-
"""
286-
Check if a field should be provided in MF6 list input format.
287-
"""
288-
return field["type"] == "list" and "period" in field["block"]
289-
290-
291-
def is_list_block(block: Block) -> bool:
292-
"""
293-
Check if a block should be provided in MF6 list input format.
294-
"""
295-
return is_list_field(next(iter(block.values())))

0 commit comments

Comments
 (0)