Skip to content

non-numeric period block writes not formatted correctly #252

@mjreno

Description

@mjreno

STORAGE example:

dis = Dis()
gwf = Gwf(dis=dis)
sto = Sto(
  dims={"nper": 3},
  parent=gwf,
  steady_state=[False, True, False],
  transient=[True, False, True],
)

is written as:

BEGIN OPTIONS
END OPTIONS

BEGIN GRIDDATA
 ICONVERT
 CONSTANT 0

 SS
 CONSTANT 0.00001000

 SY
 CONSTANT 0.15000000

END GRIDDATA

BEGIN PERIOD 1
 False True
END PERIOD 1

BEGIN PERIOD 2
 True False
END PERIOD 2

BEGIN PERIOD 3
 False True
END PERIOD 3

OC example (test_dumps_oc which is currently disabled):

oc = Oc(
    dims={"nper": 1},
    budget_file="test.bud",
    head_file="test.hds",
    save_head={0: "all"},
    save_budget={0: "all"},
    perioddata={
        0: Oc.PrintSaveSetting(
            printrecord=[
                Oc.PrintRecord("head", Oc.Steps(all=True)),
                Oc.PrintRecord("budget", Oc.Steps(all=True)),
            ],
        )
    },
)

is written as:

BEGIN OPTIONS
 BUDGET FILEOUT test.bud
 HEAD FILEOUT test.hds
END OPTIONS

BEGIN PERIOD 1
 save head all
 save budget all
 <class 'list'> [('print', 'head', (True, None, None, None, None)), ('print', 'budget', (True, None, None, None, None))]
END PERIOD 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    IORelated to loading/writing input/output filesbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions