Replies: 4 comments 5 replies
-
|
Using xarray as data store means we should be able to easily import/export an entire simulation (or a piece thereof) to a netcdf file. But we need to consider how flopy's internal xarray representation may differ from the netcdf format expected by mf6's new netcdf reader capability, and from the format expected by 3rd party postprocessing tools. It seems ideal if all these representations were to converge, but 3rd party tools will require e.g. extra metadata that we likely don't want to carry around inside flopy. So the ability to map between the representations may be needed. |
Beta Was this translation helpful? Give feedback.
-
|
Copying in some notes from other threads
|
Beta Was this translation helpful? Give feedback.
-
|
Tentatively we have decided to store data in xarray datasets/trees (depending whether the component is a leaf or node in the component tree). Each component stores its own data in-house, but the datatree provides a unified, hierarchically-addressable view, allowing any component's variables to be accessed from any other component. Attrs attributes can proxy data stored in xarray data structures, giving us easy introspection and automatic dunder methods without data duplication. |
Beta Was this translation helpful? Give feedback.
-
|
Maybe this is worth a separate discussion, but I'll put it here for now. Re: data schemas and runtime validations. @mjreno has a draft specification for providing input to mf6 via netcdf. We could combine this with an approach like https://github.com/casangi/xradio to specify how a simulation should look in xarray. This would make both sides (mf6 and flopy) of the runtime spec rigorous. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Flopy3 simulations have a dictionary in which all model/package data is stored and from which it is looked up. This is somewhat analogous (in concept, not implementation) to the memory manager in mf6. We have discussed whether to keep this approach, or to store data in-place in the component hierarchy in flopy4.
Related issues
Related PRs
Beta Was this translation helpful? Give feedback.
All reactions