Replies: 1 comment
-
Relevant reading re: avoiding awkwardly shaped data |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
MF6 distinguishes array and list data.
Arrays are always homogeneous and often (but not always) represent some variable living on features of the grid. Xarray works very nicely where this is true.
Lists can be homogeneous (elements all having the same record type) or heterogeneous (elements can be any of several record types). The former are amenable to numpy, pandas, providing columns separately, etc. The latter not so. Period data for example.
You can stuff any kind of object you want into an xarray array, so there's nothing preventing us from defining classes for unions where only one field is expected to have a value at any time. We could also consider libraries like ragged or awkward, though I'm not sure how compatible they are with xarray. Maybe also worth considering where we can rework the spec or flopy's interpretation of it to avoid the raggedness/awkwardness
Beta Was this translation helpful? Give feedback.
All reactions