Deltares / imod-python

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

Projectfile: Support loading boundary conditions with both a steady-state as well as transient timestamps #1073

Open JoerivanEngelen opened 5 months ago

JoerivanEngelen commented 5 months ago

Projectfiles can contain boundary conditions with both a "STEADY-STATE" timestamp as well as timestamps indicating actual transient or periodic boundary conditions. The data under the "steady-state" label is used by iMOD5 when building a steady-state simulation, or a transient simulation where the first stress period needs to be computed as steady-state.

Right now a keyerror is thrown in this case on the key "time", as the entry with timestamp "STEADY-STATE" doesn't have a "time" entry in the header because the "steady-state" timestamp is special-cased (I think).

We should fix the open_project_file function first. When this is done, we can assess whether we follow the iMOD5 path, or let the user select manually whether to use steady-state or transient timestamps. I think there is a reason for why iMOD5 has this functionality, as it is quite nice to have some special "steady-state" boundary conditions to drive the first steady-state stress periods.

JoerivanEngelen commented 3 months ago

Context

The "steady-state" string is used in the following situations:

I don't foresee situations where "steady-state" is used at the end, or half way a simulation.

Refinement

A proposal to fix this:

Huite commented 3 months ago

I don't foresee situations where "steady-state" is used at the end, or half way a simulation.

iMOD5 doesn't support this either if I recall correctly from discussing it with Peter. It only works if it's the first one.