-
Couldn't load subscription status.
- Fork 5
Description
Which arrays do we want to allow specifying sparsely i.e. with dict-based Python syntax to set values only for some indices?
MF6 input processing forces a distinction between packages for which the full array is required (e.g. IC strt) and packages for which list (sparse) input is supported (e.g. CHD stress period data arrays like head) as well as the layer-array and grid-array package variants as alternatives to list-based input.
But Python and xarray don't compel any such thing. From xarray's perspective there's no difference between IC strt and CHD head, except that head has a time dimension and is presumably set to none/NA for non-CHD cell/time indices, while strt is presumably set to a meaningful value over the entire grid. But if the grid has an inactive region, there's no reason in principle that strt needs meaningful values in the inactive region. Both strt and head are just variables on (a subset of) grid features.
So the relevant criterion for allowing sparse array initialization would seem to be whether the array has a default (cf #240), not which flavor of package MF6 defines it in (layer-array e.g. RCHA, grid-array e.g. CHDG, standard list-based e.g. CHD). In general I think it's cleanest to avoid duplicating these packages in Python, if possible, since their only purpose is to support different MF6 input schemes. But that might mean giving up 1-1 correspondence between DFNs and generated components, and/or modifying IDM on the MF6 side to not need different DFNs. In the near term we can live with the duplication but something to consider longer term.