Skip to content

Commit 12c34c9

Browse files
committed
update sdd
1 parent f7deb2d commit 12c34c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/dev/sdd.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ We propose to follow the same general pattern, using `attrs` instead for introsp
8080

8181
XArray provides abstractions for working with multiple datasets related in a hierarchical context, some of which may share the same spatial/temporal indices and/or coordinate systems.
8282

83-
We propose to follow [imod-python](https://github.com/Deltares/imod-python) in adopting [xarray](https://docs.xarray.dev/en/stable/index.html) as our components' onboard data store, e.g. in a `.data` attribute.
84-
85-
For nodes in the context tree (i.e., components with children), `.data` can be a [`DataTree`](https://docs.xarray.dev/en/stable/generated/xarray.DataTree.html). For leaves in the tree, just a `Dataset`.
83+
We propose to follow [imod-python](https://github.com/Deltares/imod-python) in adopting [xarray](https://docs.xarray.dev/en/stable/index.html) as our components' onboard data store.
8684

8785
### `attrs` + `xarray`
8886

8987
Combining these patterns naively would result in several challenges, involving duplication, synchronization, and a more general problem reminiscent of [object-relational impedance mismatch](https://en.wikipedia.org/wiki/Object%E2%80%93relational_impedance_mismatch), where the list-oriented and array-oriented paradigms conflict.
9088

9189
Ultimately, we'd like a mapping between an abstract hierarchy of components and variables, as defined in MF6 definition files, to a Python representation which is self-describing (courtesy of `attrs`) and self-aligning (courtesy of `xarray`).
9290

91+
The [`DataTree`](https://docs.xarray.dev/en/stable/generated/xarray.DataTree.html) is a recently developed `xarray` extension, now in the core package, which provides [many of the features we want from a hierarchical data store](https://docs.xarray.dev/en/stable/user-guide/hierarchical-data.html).
92+
9393
## Data types
9494

9595
MODFLOW 6 defines a [type system for input variables](https://github.com/MODFLOW-USGS/modflow6/tree/develop/doc/mf6io/mf6ivar#variable-types). We adapt this for Python.

0 commit comments

Comments
 (0)