Deltares / imod-python

🐍🧰 Make massive MODFLOW models
https://deltares.github.io/imod-python/
MIT License
16 stars 0 forks source link

Output Control: support not writing specific stress periods #1038

Open JoerivanEngelen opened 1 month ago

JoerivanEngelen commented 1 month ago

@tessodk ran into the issue that it's not possible to turn off certain timesteps as output control, even though MODFLOW6 supports this. Something like:

    BEGIN PERIOD 1
      SAVE BUDGET LAST
    END PERIOD

    # No output for stress periods 2 through 24
    BEGIN PERIOD 2
    END PERIOD

    BEGIN PERIOD 25
      SAVE BUDGET LAST
    END PERIOD

Would only save data for period 1 and 25. API could look something like:

save_budget = xr.DataArray(
    ["last", None, "last"], coords={"time": [<t1>, <t2>, <t25>]}, dims=("time",)
)
oc = imod.mf6.OutputControl(save_budget=save_budget)