-
Notifications
You must be signed in to change notification settings - Fork 6
Description
A good first step toward #113 might be attaching update: this has been implementedGrid and ModelTime to models and simulations, respectively. I think we could have the grid as an extra attrs.field on the model class (likewise for time), so it becomes an init method parameter, but is ignored by xattree.
We also have the grid and time discretizations encoded as dimensions/coordinates in the backing data tree. This gives us alignment but we aren't taking full advantage yet of xarray's extension points.
Eventually I think we want
- an xarray index, which accepts a flopy grid as an init param
- an xarray accessor, a la xugrid's
.ugrid, which exposes grid info in an xarray way
We could call the accessor .grid, so it's distinct from .ugrid. But it might use xugrid under the hood and/or redirect to .ugrid.
This way, models have a .grid which is the flopy.discretization.Grid, and the datatree .data also has a grid .data.grid which exposes grid-aware indexing, selection, plotting, etc. You choose between them as the situation calls for it.