Skip to content

Conversation

@wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Nov 2, 2025

rough but it works. involved a few fixes upstream in devtools, record subfield order was getting scrambled and some v1 schema things were not getting converted to v2. and a few fixes here, mostly to allow the typed transformer to handle composites i.e. (lists of) records and unions. I think this should generalize pretty well but it needs cleanup/refactoring.

still need an inbound converter. right now we only support array conversion and haven't tried plugging it into the output of the loader.

"for the record", ha, here is what the OC grammar looks like

// Auto-generated grammar for MF6 GWT-OC

%import typed.integer -> integer
%import typed.double -> double
%import typed.number -> number
%import typed.string -> string
%import typed.word -> word
%import typed.array -> array
%import typed.record -> record
%import typed.NEWLINE -> NEWLINE
%import common.WS
%import common.SH_COMMENT

%ignore WS
%ignore SH_COMMENT

start: block*
block: options_block | period_block
options_block: "begin"i "options"i options_fields "end"i "options"i
period_block: "begin"i "period"i block_index period_fields "end"i "period"i block_index
block_index: integer
options_fields: (budget_filerecord | budgetcsv_filerecord | concentration_filerecord | concentrationprintrecord)*
period_fields: (saverecord | printrecord)*
budget_filerecord: "budget"i "fileout"i word
budgetcsv_filerecord: "budgetcsv"i "fileout"i word
concentration_filerecord: "concentration"i "fileout"i word
concentrationprintrecord: "concentration"i "print_format"i
saverecord: "save"i word ocsetting
printrecord: "print"i word ocsetting
ocsetting: ocsetting_all | ocsetting_first | ocsetting_last | ocsetting_frequency | ocsetting_steps
ocsetting_all: "all"i
ocsetting_first: "first"i
ocsetting_last: "last"i
ocsetting_frequency: "frequency"i integer
ocsetting_steps: "steps"i integer+

@wpbonelli wpbonelli added this to the Demo milestone Nov 2, 2025
@wpbonelli wpbonelli added requirement Core requirement IO Related to loading/writing input/output files labels Nov 2, 2025
@wpbonelli wpbonelli marked this pull request as ready for review November 2, 2025 01:40
@wpbonelli wpbonelli merged commit 07d5255 into modflowpy:develop Nov 2, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO Related to loading/writing input/output files requirement Core requirement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant