Replies: 3 comments
-
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.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions