From 4282f85108e520208224692208c951507e42dde9 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 27 Aug 2026 13:43:57 -0700 Subject: [PATCH] refactor(dfns): split Dim into InputDim and RuntimeDim --- .../__snapshots__/v2.0.0.dev3/chf-cdb.json | 4 +- .../__snapshots__/v2.0.0.dev3/chf-cdb.toml | 4 +- .../__snapshots__/v2.0.0.dev3/chf-cdb.yaml | 1 + .../__snapshots__/v2.0.0.dev3/chf-chd.json | 4 +- .../__snapshots__/v2.0.0.dev3/chf-chd.toml | 4 +- .../__snapshots__/v2.0.0.dev3/chf-chd.yaml | 1 + .../__snapshots__/v2.0.0.dev3/chf-dfw.json | 2 +- .../__snapshots__/v2.0.0.dev3/chf-dfw.toml | 2 +- .../__snapshots__/v2.0.0.dev3/chf-dfw.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/chf-disv1d.json | 28 ++ .../__snapshots__/v2.0.0.dev3/chf-disv1d.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/chf-disv1d.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/chf-evp.json | 4 +- .../__snapshots__/v2.0.0.dev3/chf-evp.toml | 4 +- .../__snapshots__/v2.0.0.dev3/chf-evp.yaml | 1 + .../__snapshots__/v2.0.0.dev3/chf-flw.json | 4 +- .../__snapshots__/v2.0.0.dev3/chf-flw.toml | 4 +- .../__snapshots__/v2.0.0.dev3/chf-flw.yaml | 1 + .../__snapshots__/v2.0.0.dev3/chf-ic.json | 2 +- .../__snapshots__/v2.0.0.dev3/chf-ic.toml | 2 +- .../__snapshots__/v2.0.0.dev3/chf-ic.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/chf-nam.json | 2 +- .../__snapshots__/v2.0.0.dev3/chf-nam.toml | 4 +- .../__snapshots__/v2.0.0.dev3/chf-nam.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/chf-pcp.json | 4 +- .../__snapshots__/v2.0.0.dev3/chf-pcp.toml | 4 +- .../__snapshots__/v2.0.0.dev3/chf-pcp.yaml | 1 + .../__snapshots__/v2.0.0.dev3/chf-zdg.json | 4 +- .../__snapshots__/v2.0.0.dev3/chf-zdg.toml | 4 +- .../__snapshots__/v2.0.0.dev3/chf-zdg.yaml | 1 + .../__snapshots__/v2.0.0.dev3/exg-chfgwf.json | 40 +++ .../__snapshots__/v2.0.0.dev3/exg-chfgwf.toml | 40 +++ .../__snapshots__/v2.0.0.dev3/exg-chfgwf.yaml | 34 +++ .../__snapshots__/v2.0.0.dev3/exg-gwegwe.json | 81 +++++- .../__snapshots__/v2.0.0.dev3/exg-gwegwe.toml | 79 +++++ .../__snapshots__/v2.0.0.dev3/exg-gwegwe.yaml | 66 +++++ .../__snapshots__/v2.0.0.dev3/exg-gwfgwf.json | 81 +++++- .../__snapshots__/v2.0.0.dev3/exg-gwfgwf.toml | 79 +++++ .../__snapshots__/v2.0.0.dev3/exg-gwfgwf.yaml | 66 +++++ .../__snapshots__/v2.0.0.dev3/exg-gwtgwt.json | 81 +++++- .../__snapshots__/v2.0.0.dev3/exg-gwtgwt.toml | 79 +++++ .../__snapshots__/v2.0.0.dev3/exg-gwtgwt.yaml | 66 +++++ .../__snapshots__/v2.0.0.dev3/exg-olfgwf.json | 40 +++ .../__snapshots__/v2.0.0.dev3/exg-olfgwf.toml | 40 +++ .../__snapshots__/v2.0.0.dev3/exg-olfgwf.yaml | 34 +++ .../__snapshots__/v2.0.0.dev3/gwe-cnd.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-cnd.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-cnd.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-ctp.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-ctp.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-ctp.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwe-dis.json | 28 ++ .../__snapshots__/v2.0.0.dev3/gwe-dis.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/gwe-dis.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/gwe-disu.json | 30 +- .../__snapshots__/v2.0.0.dev3/gwe-disu.toml | 28 +- .../__snapshots__/v2.0.0.dev3/gwe-disu.yaml | 25 +- .../__snapshots__/v2.0.0.dev3/gwe-disv.json | 28 ++ .../__snapshots__/v2.0.0.dev3/gwe-disv.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/gwe-disv.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/gwe-esl.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-esl.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-esl.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwe-est.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-est.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-est.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-ic.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-ic.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-ic.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-lke.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-lke.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-lke.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwe-mve.json | 26 ++ .../__snapshots__/v2.0.0.dev3/gwe-mve.toml | 24 ++ .../__snapshots__/v2.0.0.dev3/gwe-mve.yaml | 22 ++ .../__snapshots__/v2.0.0.dev3/gwe-mwe.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-mwe.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-mwe.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwe-nam.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-nam.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-nam.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-sfe.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-sfe.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-sfe.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwe-uze.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwe-uze.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwe-uze.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-chd.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-chd.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-chd.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-chdg.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-chdg.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-chdg.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-csub.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-csub.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-csub.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-dis.json | 28 ++ .../__snapshots__/v2.0.0.dev3/gwf-dis.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/gwf-dis.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/gwf-disu.json | 30 +- .../__snapshots__/v2.0.0.dev3/gwf-disu.toml | 28 +- .../__snapshots__/v2.0.0.dev3/gwf-disu.yaml | 25 +- .../__snapshots__/v2.0.0.dev3/gwf-disv.json | 28 ++ .../__snapshots__/v2.0.0.dev3/gwf-disv.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/gwf-disv.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/gwf-drn.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-drn.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-drn.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-drng.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-drng.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-drng.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-evt.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-evt.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-evt.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-evta.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-evta.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-evta.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-ghb.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-ghb.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-ghb.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-ghbg.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-ghbg.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-ghbg.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-ic.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-ic.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-ic.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-nam.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-nam.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-nam.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-npf.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-npf.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-npf.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-rch.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-rch.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-rch.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-rcha.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-rcha.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-rcha.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-riv.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-riv.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-riv.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-rivg.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-rivg.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-rivg.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-sfr.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-sfr.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-sfr.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-sto.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-sto.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-sto.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwf-wel.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-wel.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-wel.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwf-welg.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-welg.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwf-welg.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwt-cnc.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-cnc.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-cnc.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwt-dis.json | 28 ++ .../__snapshots__/v2.0.0.dev3/gwt-dis.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/gwt-dis.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/gwt-disu.json | 30 +- .../__snapshots__/v2.0.0.dev3/gwt-disu.toml | 28 +- .../__snapshots__/v2.0.0.dev3/gwt-disu.yaml | 25 +- .../__snapshots__/v2.0.0.dev3/gwt-disv.json | 28 ++ .../__snapshots__/v2.0.0.dev3/gwt-disv.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/gwt-disv.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/gwt-dsp.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-dsp.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-dsp.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-ic.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-ic.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-ic.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-ist.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-ist.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-ist.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-lkt.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-lkt.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-lkt.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwt-mst.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-mst.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-mst.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-mvt.json | 26 ++ .../__snapshots__/v2.0.0.dev3/gwt-mvt.toml | 24 ++ .../__snapshots__/v2.0.0.dev3/gwt-mvt.yaml | 22 ++ .../__snapshots__/v2.0.0.dev3/gwt-mwt.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-mwt.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-mwt.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwt-nam.json | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-nam.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-nam.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-sft.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-sft.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-sft.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwt-src.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-src.toml | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-src.yaml | 1 + .../__snapshots__/v2.0.0.dev3/gwt-uzt.json | 4 +- .../__snapshots__/v2.0.0.dev3/gwt-uzt.toml | 2 +- .../__snapshots__/v2.0.0.dev3/gwt-uzt.yaml | 1 + .../__snapshots__/v2.0.0.dev3/olf-cdb.json | 4 +- .../__snapshots__/v2.0.0.dev3/olf-cdb.toml | 4 +- .../__snapshots__/v2.0.0.dev3/olf-cdb.yaml | 1 + .../__snapshots__/v2.0.0.dev3/olf-chd.json | 4 +- .../__snapshots__/v2.0.0.dev3/olf-chd.toml | 4 +- .../__snapshots__/v2.0.0.dev3/olf-chd.yaml | 1 + .../__snapshots__/v2.0.0.dev3/olf-dfw.json | 2 +- .../__snapshots__/v2.0.0.dev3/olf-dfw.toml | 2 +- .../__snapshots__/v2.0.0.dev3/olf-dfw.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/olf-dis2d.json | 28 ++ .../__snapshots__/v2.0.0.dev3/olf-dis2d.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/olf-dis2d.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/olf-disv1d.json | 28 ++ .../__snapshots__/v2.0.0.dev3/olf-disv1d.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/olf-disv1d.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/olf-disv2d.json | 28 ++ .../__snapshots__/v2.0.0.dev3/olf-disv2d.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/olf-disv2d.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/olf-evp.json | 4 +- .../__snapshots__/v2.0.0.dev3/olf-evp.toml | 4 +- .../__snapshots__/v2.0.0.dev3/olf-evp.yaml | 1 + .../__snapshots__/v2.0.0.dev3/olf-flw.json | 4 +- .../__snapshots__/v2.0.0.dev3/olf-flw.toml | 4 +- .../__snapshots__/v2.0.0.dev3/olf-flw.yaml | 1 + .../__snapshots__/v2.0.0.dev3/olf-ic.json | 2 +- .../__snapshots__/v2.0.0.dev3/olf-ic.toml | 2 +- .../__snapshots__/v2.0.0.dev3/olf-ic.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/olf-nam.json | 2 +- .../__snapshots__/v2.0.0.dev3/olf-nam.toml | 4 +- .../__snapshots__/v2.0.0.dev3/olf-nam.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/olf-pcp.json | 4 +- .../__snapshots__/v2.0.0.dev3/olf-pcp.toml | 4 +- .../__snapshots__/v2.0.0.dev3/olf-pcp.yaml | 1 + .../__snapshots__/v2.0.0.dev3/olf-zdg.json | 4 +- .../__snapshots__/v2.0.0.dev3/olf-zdg.toml | 4 +- .../__snapshots__/v2.0.0.dev3/olf-zdg.yaml | 1 + .../__snapshots__/v2.0.0.dev3/prt-dis.json | 28 ++ .../__snapshots__/v2.0.0.dev3/prt-dis.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/prt-dis.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/prt-disv.json | 28 ++ .../__snapshots__/v2.0.0.dev3/prt-disv.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/prt-disv.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/prt-mip.json | 2 +- .../__snapshots__/v2.0.0.dev3/prt-mip.toml | 2 +- .../__snapshots__/v2.0.0.dev3/prt-mip.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/prt-nam.json | 2 +- .../__snapshots__/v2.0.0.dev3/prt-nam.toml | 4 +- .../__snapshots__/v2.0.0.dev3/prt-nam.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/prt-prp.json | 4 +- .../__snapshots__/v2.0.0.dev3/prt-prp.toml | 6 +- .../__snapshots__/v2.0.0.dev3/prt-prp.yaml | 1 + .../__snapshots__/v2.0.0.dev3/swf-cdb.json | 4 +- .../__snapshots__/v2.0.0.dev3/swf-cdb.toml | 4 +- .../__snapshots__/v2.0.0.dev3/swf-cdb.yaml | 1 + .../__snapshots__/v2.0.0.dev3/swf-chd.json | 4 +- .../__snapshots__/v2.0.0.dev3/swf-chd.toml | 4 +- .../__snapshots__/v2.0.0.dev3/swf-chd.yaml | 1 + .../__snapshots__/v2.0.0.dev3/swf-dfw.json | 2 +- .../__snapshots__/v2.0.0.dev3/swf-dfw.toml | 2 +- .../__snapshots__/v2.0.0.dev3/swf-dfw.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/swf-dis2d.json | 28 ++ .../__snapshots__/v2.0.0.dev3/swf-dis2d.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/swf-dis2d.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/swf-disv1d.json | 28 ++ .../__snapshots__/v2.0.0.dev3/swf-disv1d.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/swf-disv1d.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/swf-disv2d.json | 28 ++ .../__snapshots__/v2.0.0.dev3/swf-disv2d.toml | 26 ++ .../__snapshots__/v2.0.0.dev3/swf-disv2d.yaml | 23 ++ .../__snapshots__/v2.0.0.dev3/swf-evp.json | 4 +- .../__snapshots__/v2.0.0.dev3/swf-evp.toml | 4 +- .../__snapshots__/v2.0.0.dev3/swf-evp.yaml | 1 + .../__snapshots__/v2.0.0.dev3/swf-flw.json | 4 +- .../__snapshots__/v2.0.0.dev3/swf-flw.toml | 4 +- .../__snapshots__/v2.0.0.dev3/swf-flw.yaml | 1 + .../__snapshots__/v2.0.0.dev3/swf-ic.json | 2 +- .../__snapshots__/v2.0.0.dev3/swf-ic.toml | 2 +- .../__snapshots__/v2.0.0.dev3/swf-ic.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/swf-nam.json | 2 +- .../__snapshots__/v2.0.0.dev3/swf-nam.toml | 4 +- .../__snapshots__/v2.0.0.dev3/swf-nam.yaml | 2 +- .../__snapshots__/v2.0.0.dev3/swf-pcp.json | 4 +- .../__snapshots__/v2.0.0.dev3/swf-pcp.toml | 4 +- .../__snapshots__/v2.0.0.dev3/swf-pcp.yaml | 1 + .../__snapshots__/v2.0.0.dev3/swf-zdg.json | 4 +- .../__snapshots__/v2.0.0.dev3/swf-zdg.toml | 4 +- .../__snapshots__/v2.0.0.dev3/swf-zdg.yaml | 1 + autotest/dfns/test_schema.py | 4 +- autotest/dfns/test_schema_dimensions.py | 181 ++++++------ docs/md/dfnspec.md | 68 +++-- modflow_devtools/dfns/__init__.py | 14 +- .../dfns/migrate_to_v2_0_0_dev2.py | 64 +++-- .../dfns/migrate_to_v2_0_0_dev3.py | 271 +++++++++++++++++- modflow_devtools/dfns/schema.py | 221 +++++++------- 295 files changed, 3373 insertions(+), 471 deletions(-) diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.json index ee41dbcf..6eaac295 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.toml index 7983624f..783ab1cf 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.yaml index d725ae79..9a2791ae 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-cdb.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.json index 727336d6..1b984b99 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.toml index 43ec27b5..bf04eaeb 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.yaml index 0e52a2a8..99023f60 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-chd.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.json index f60d8d04..a0181a65 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "chf-dfw", "parent": "chf-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.toml index 8558b6e4..fcbda033 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "chf-dfw" parent = "chf-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.central_in_space] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.yaml index 9349526d..61a7f295 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-dfw.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: chf-dfw parent: chf-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.json index 89f687eb..54f3c6d2 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.json @@ -17,6 +17,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -259,6 +267,26 @@ "shape": [ "nodes" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.toml index 955ab44a..9af3005c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.toml @@ -15,6 +15,12 @@ scope = "model" value = "1" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -228,3 +234,23 @@ dtype = "integer" shape = [ "nodes", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.yaml index 5317b78a..0c2993bd 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-disv1d.yaml @@ -12,6 +12,11 @@ dims: ncelldim: value: '1' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -232,3 +237,21 @@ memory: dtype: integer shape: - nodes + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.json index d39e786d..9e1b7c55 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.toml index e06c06f9..4fe2df2e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.yaml index 1ee299c3..ee3093b0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-evp.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.json index 3fe7fdfa..de7636ed 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.toml index 2073e980..73524983 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.yaml index 170167a6..d88f04c6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-flw.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.json index 0e0220ac..0ff6f734 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "chf-ic", "parent": "chf-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.toml index d875559c..0de4a3be 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "chf-ic" parent = "chf-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.export_array_ascii] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.yaml index 5bfbb96e..da7aeefd 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-ic.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: chf-ic parent: chf-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.json index 02fd2cf1..92d45ec4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.json @@ -4,7 +4,7 @@ "name": "chf-nam", "parent": "sim-nam", "dependent_variable": "stage", - "dims": { + "runtime_dims": { "nja": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.toml index d79d62b8..e2ec243b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.toml @@ -4,10 +4,10 @@ name = "chf-nam" parent = "sim-nam" dependent_variable = "stage" -[dims.nja] +[runtime_dims.nja] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.list] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.yaml index 4c4e697b..7f1ed917 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-nam.yaml @@ -3,7 +3,7 @@ schema_version: 2.0.0.dev3 name: chf-nam parent: sim-nam dependent_variable: stage -dims: +runtime_dims: nja: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.json index c52dd855..45dccc5d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.toml index 755cb5f5..7efa2d36 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.yaml index d8a75e1d..cc7be05f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-pcp.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.json index fab945af..70dc74c1 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.toml index 6b1e60ba..51665ff0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.yaml index 51eb2150..21b15c2c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/chf-zdg.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.json index b1791313..e24331b0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.json @@ -126,6 +126,46 @@ "set_in": "ar", "source": "nexg", "type": "integer" + }, + "nodem1": { + "type": "array", + "set_in": "ar", + "source": "cellidm1", + "description": "Reduced node number in the surface water model for each exchange, derived from CELLIDM1. Registered as NODEM1 in memory though the Fortran field is named NODESWF.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "nodem2": { + "type": "array", + "set_in": "ar", + "source": "cellidm2", + "description": "Reduced node number in the GWF model for each exchange, derived from CELLIDM2. Registered as NODEM2 in memory though the Fortran field is named NODEGWF.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "bedleak": { + "type": "array", + "set_in": "ar", + "source": "bedleak", + "description": "Bed leakance for each exchange.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "cfact": { + "type": "array", + "set_in": "ar", + "source": "cfact", + "description": "Factor used in the conductance calculation for each exchange.", + "dtype": "double", + "shape": [ + "nexg" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.toml index 81421dd1..f46eeaaa 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.toml @@ -105,3 +105,43 @@ type = "integer" set_in = "ar" source = "nexg" type = "integer" + +[memory.nodem1] +type = "array" +set_in = "ar" +source = "cellidm1" +description = "Reduced node number in the surface water model for each exchange, derived from CELLIDM1. Registered as NODEM1 in memory though the Fortran field is named NODESWF." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.nodem2] +type = "array" +set_in = "ar" +source = "cellidm2" +description = "Reduced node number in the GWF model for each exchange, derived from CELLIDM2. Registered as NODEM2 in memory though the Fortran field is named NODEGWF." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.bedleak] +type = "array" +set_in = "ar" +source = "bedleak" +description = "Bed leakance for each exchange." +dtype = "double" +shape = [ + "nexg", +] + +[memory.cfact] +type = "array" +set_in = "ar" +source = "cfact" +description = "Factor used in the conductance calculation for each exchange." +dtype = "double" +shape = [ + "nexg", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.yaml index 6e5962f6..66567836 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-chfgwf.yaml @@ -123,3 +123,37 @@ memory: set_in: ar source: nexg type: integer + nodem1: + type: array + set_in: ar + source: cellidm1 + description: Reduced node number in the surface water model for each exchange, derived from CELLIDM1. + Registered as NODEM1 in memory though the Fortran field is named NODESWF. + dtype: integer + shape: + - nexg + nodem2: + type: array + set_in: ar + source: cellidm2 + description: Reduced node number in the GWF model for each exchange, derived from CELLIDM2. Registered + as NODEM2 in memory though the Fortran field is named NODEGWF. + dtype: integer + shape: + - nexg + bedleak: + type: array + set_in: ar + source: bedleak + description: Bed leakance for each exchange. + dtype: double + shape: + - nexg + cfact: + type: array + set_in: ar + source: cfact + description: Factor used in the conductance calculation for each exchange. + dtype: double + shape: + - nexg diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.json index ce647472..bd35bbfb 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.json @@ -235,16 +235,95 @@ }, "auxvar": { "type": "array", + "set_in": "ar", "source": "aux", + "description": "Auxiliary variable values for each exchange.", "dtype": "double", "shape": [ - "naux" + "naux", + "nexg" ] }, "nexg": { "set_in": "ar", "source": "nexg", "type": "integer" + }, + "nodem1": { + "type": "array", + "set_in": "ar", + "source": "cellidm1", + "description": "Reduced node number in model 1 for each exchange, derived from CELLIDM1.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "nodem2": { + "type": "array", + "set_in": "ar", + "source": "cellidm2", + "description": "Reduced node number in model 2 for each exchange, derived from CELLIDM2.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "ihc": { + "type": "array", + "set_in": "ar", + "source": "ihc", + "description": "Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a vertically staggered grid.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "cl1": { + "type": "array", + "set_in": "ar", + "source": "cl1", + "description": "Distance between the center of the model 1 cell and its shared face.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "cl2": { + "type": "array", + "set_in": "ar", + "source": "cl2", + "description": "Distance between the center of the model 2 cell and its shared face.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "hwva": { + "type": "array", + "set_in": "ar", + "source": "hwva", + "description": "Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the vertical connection if IHC = 0.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "naux": { + "readonly": true, + "set_in": "ar", + "description": "Number of auxiliary variables.", + "type": "integer" + }, + "auxname_cst": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Names of auxiliary variables.", + "dtype": "string", + "shape": [ + "naux" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.toml index 5bc23804..ceaf619a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.toml @@ -212,13 +212,92 @@ type = "logical" [memory.auxvar] type = "array" +set_in = "ar" source = "aux" +description = "Auxiliary variable values for each exchange." dtype = "double" shape = [ "naux", + "nexg", ] [memory.nexg] set_in = "ar" source = "nexg" type = "integer" + +[memory.nodem1] +type = "array" +set_in = "ar" +source = "cellidm1" +description = "Reduced node number in model 1 for each exchange, derived from CELLIDM1." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.nodem2] +type = "array" +set_in = "ar" +source = "cellidm2" +description = "Reduced node number in model 2 for each exchange, derived from CELLIDM2." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.ihc] +type = "array" +set_in = "ar" +source = "ihc" +description = "Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a vertically staggered grid." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.cl1] +type = "array" +set_in = "ar" +source = "cl1" +description = "Distance between the center of the model 1 cell and its shared face." +dtype = "double" +shape = [ + "nexg", +] + +[memory.cl2] +type = "array" +set_in = "ar" +source = "cl2" +description = "Distance between the center of the model 2 cell and its shared face." +dtype = "double" +shape = [ + "nexg", +] + +[memory.hwva] +type = "array" +set_in = "ar" +source = "hwva" +description = "Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the vertical connection if IHC = 0." +dtype = "double" +shape = [ + "nexg", +] + +[memory.naux] +readonly = true +set_in = "ar" +description = "Number of auxiliary variables." +type = "integer" + +[memory.auxname_cst] +type = "array" +readonly = true +set_in = "ar" +description = "Names of auxiliary variables." +dtype = "string" +shape = [ + "naux", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.yaml index 8093d576..5fb3084b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwegwe.yaml @@ -230,11 +230,77 @@ memory: type: logical auxvar: type: array + set_in: ar source: aux + description: Auxiliary variable values for each exchange. dtype: double shape: - naux + - nexg nexg: set_in: ar source: nexg type: integer + nodem1: + type: array + set_in: ar + source: cellidm1 + description: Reduced node number in model 1 for each exchange, derived from CELLIDM1. + dtype: integer + shape: + - nexg + nodem2: + type: array + set_in: ar + source: cellidm2 + description: Reduced node number in model 2 for each exchange, derived from CELLIDM2. + dtype: integer + shape: + - nexg + ihc: + type: array + set_in: ar + source: ihc + description: 'Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a + vertically staggered grid.' + dtype: integer + shape: + - nexg + cl1: + type: array + set_in: ar + source: cl1 + description: Distance between the center of the model 1 cell and its shared face. + dtype: double + shape: + - nexg + cl2: + type: array + set_in: ar + source: cl2 + description: Distance between the center of the model 2 cell and its shared face. + dtype: double + shape: + - nexg + hwva: + type: array + set_in: ar + source: hwva + description: Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the + vertical connection if IHC = 0. + dtype: double + shape: + - nexg + naux: + readonly: true + set_in: ar + description: Number of auxiliary variables. + type: integer + auxname_cst: + type: array + readonly: true + set_in: ar + description: Names of auxiliary variables. + dtype: string + shape: + - naux diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.json index 97a0b56d..1493a5a5 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.json @@ -262,16 +262,95 @@ }, "auxvar": { "type": "array", + "set_in": "ar", "source": "aux", + "description": "Auxiliary variable values for each exchange.", "dtype": "double", "shape": [ - "naux" + "naux", + "nexg" ] }, "nexg": { "set_in": "ar", "source": "nexg", "type": "integer" + }, + "nodem1": { + "type": "array", + "set_in": "ar", + "source": "cellidm1", + "description": "Reduced node number in model 1 for each exchange, derived from CELLIDM1.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "nodem2": { + "type": "array", + "set_in": "ar", + "source": "cellidm2", + "description": "Reduced node number in model 2 for each exchange, derived from CELLIDM2.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "ihc": { + "type": "array", + "set_in": "ar", + "source": "ihc", + "description": "Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a vertically staggered grid.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "cl1": { + "type": "array", + "set_in": "ar", + "source": "cl1", + "description": "Distance between the center of the model 1 cell and its shared face.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "cl2": { + "type": "array", + "set_in": "ar", + "source": "cl2", + "description": "Distance between the center of the model 2 cell and its shared face.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "hwva": { + "type": "array", + "set_in": "ar", + "source": "hwva", + "description": "Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the vertical connection if IHC = 0.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "naux": { + "readonly": true, + "set_in": "ar", + "description": "Number of auxiliary variables.", + "type": "integer" + }, + "auxname_cst": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Names of auxiliary variables.", + "dtype": "string", + "shape": [ + "naux" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.toml index d9824871..9eb53d02 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.toml @@ -235,13 +235,92 @@ type = "logical" [memory.auxvar] type = "array" +set_in = "ar" source = "aux" +description = "Auxiliary variable values for each exchange." dtype = "double" shape = [ "naux", + "nexg", ] [memory.nexg] set_in = "ar" source = "nexg" type = "integer" + +[memory.nodem1] +type = "array" +set_in = "ar" +source = "cellidm1" +description = "Reduced node number in model 1 for each exchange, derived from CELLIDM1." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.nodem2] +type = "array" +set_in = "ar" +source = "cellidm2" +description = "Reduced node number in model 2 for each exchange, derived from CELLIDM2." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.ihc] +type = "array" +set_in = "ar" +source = "ihc" +description = "Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a vertically staggered grid." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.cl1] +type = "array" +set_in = "ar" +source = "cl1" +description = "Distance between the center of the model 1 cell and its shared face." +dtype = "double" +shape = [ + "nexg", +] + +[memory.cl2] +type = "array" +set_in = "ar" +source = "cl2" +description = "Distance between the center of the model 2 cell and its shared face." +dtype = "double" +shape = [ + "nexg", +] + +[memory.hwva] +type = "array" +set_in = "ar" +source = "hwva" +description = "Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the vertical connection if IHC = 0." +dtype = "double" +shape = [ + "nexg", +] + +[memory.naux] +readonly = true +set_in = "ar" +description = "Number of auxiliary variables." +type = "integer" + +[memory.auxname_cst] +type = "array" +readonly = true +set_in = "ar" +description = "Names of auxiliary variables." +dtype = "string" +shape = [ + "naux", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.yaml index e0027d62..38c350b9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwfgwf.yaml @@ -275,11 +275,77 @@ memory: type: logical auxvar: type: array + set_in: ar source: aux + description: Auxiliary variable values for each exchange. dtype: double shape: - naux + - nexg nexg: set_in: ar source: nexg type: integer + nodem1: + type: array + set_in: ar + source: cellidm1 + description: Reduced node number in model 1 for each exchange, derived from CELLIDM1. + dtype: integer + shape: + - nexg + nodem2: + type: array + set_in: ar + source: cellidm2 + description: Reduced node number in model 2 for each exchange, derived from CELLIDM2. + dtype: integer + shape: + - nexg + ihc: + type: array + set_in: ar + source: ihc + description: 'Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a + vertically staggered grid.' + dtype: integer + shape: + - nexg + cl1: + type: array + set_in: ar + source: cl1 + description: Distance between the center of the model 1 cell and its shared face. + dtype: double + shape: + - nexg + cl2: + type: array + set_in: ar + source: cl2 + description: Distance between the center of the model 2 cell and its shared face. + dtype: double + shape: + - nexg + hwva: + type: array + set_in: ar + source: hwva + description: Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the + vertical connection if IHC = 0. + dtype: double + shape: + - nexg + naux: + readonly: true + set_in: ar + description: Number of auxiliary variables. + type: integer + auxname_cst: + type: array + readonly: true + set_in: ar + description: Names of auxiliary variables. + dtype: string + shape: + - naux diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.json index 1db10058..2b454a8c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.json @@ -235,16 +235,95 @@ }, "auxvar": { "type": "array", + "set_in": "ar", "source": "aux", + "description": "Auxiliary variable values for each exchange.", "dtype": "double", "shape": [ - "naux" + "naux", + "nexg" ] }, "nexg": { "set_in": "ar", "source": "nexg", "type": "integer" + }, + "nodem1": { + "type": "array", + "set_in": "ar", + "source": "cellidm1", + "description": "Reduced node number in model 1 for each exchange, derived from CELLIDM1.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "nodem2": { + "type": "array", + "set_in": "ar", + "source": "cellidm2", + "description": "Reduced node number in model 2 for each exchange, derived from CELLIDM2.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "ihc": { + "type": "array", + "set_in": "ar", + "source": "ihc", + "description": "Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a vertically staggered grid.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "cl1": { + "type": "array", + "set_in": "ar", + "source": "cl1", + "description": "Distance between the center of the model 1 cell and its shared face.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "cl2": { + "type": "array", + "set_in": "ar", + "source": "cl2", + "description": "Distance between the center of the model 2 cell and its shared face.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "hwva": { + "type": "array", + "set_in": "ar", + "source": "hwva", + "description": "Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the vertical connection if IHC = 0.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "naux": { + "readonly": true, + "set_in": "ar", + "description": "Number of auxiliary variables.", + "type": "integer" + }, + "auxname_cst": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Names of auxiliary variables.", + "dtype": "string", + "shape": [ + "naux" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.toml index fda9d90f..63191ea4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.toml @@ -212,13 +212,92 @@ type = "logical" [memory.auxvar] type = "array" +set_in = "ar" source = "aux" +description = "Auxiliary variable values for each exchange." dtype = "double" shape = [ "naux", + "nexg", ] [memory.nexg] set_in = "ar" source = "nexg" type = "integer" + +[memory.nodem1] +type = "array" +set_in = "ar" +source = "cellidm1" +description = "Reduced node number in model 1 for each exchange, derived from CELLIDM1." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.nodem2] +type = "array" +set_in = "ar" +source = "cellidm2" +description = "Reduced node number in model 2 for each exchange, derived from CELLIDM2." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.ihc] +type = "array" +set_in = "ar" +source = "ihc" +description = "Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a vertically staggered grid." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.cl1] +type = "array" +set_in = "ar" +source = "cl1" +description = "Distance between the center of the model 1 cell and its shared face." +dtype = "double" +shape = [ + "nexg", +] + +[memory.cl2] +type = "array" +set_in = "ar" +source = "cl2" +description = "Distance between the center of the model 2 cell and its shared face." +dtype = "double" +shape = [ + "nexg", +] + +[memory.hwva] +type = "array" +set_in = "ar" +source = "hwva" +description = "Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the vertical connection if IHC = 0." +dtype = "double" +shape = [ + "nexg", +] + +[memory.naux] +readonly = true +set_in = "ar" +description = "Number of auxiliary variables." +type = "integer" + +[memory.auxname_cst] +type = "array" +readonly = true +set_in = "ar" +description = "Names of auxiliary variables." +dtype = "string" +shape = [ + "naux", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.yaml index 4ea0952b..03c38d8d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-gwtgwt.yaml @@ -228,11 +228,77 @@ memory: type: logical auxvar: type: array + set_in: ar source: aux + description: Auxiliary variable values for each exchange. dtype: double shape: - naux + - nexg nexg: set_in: ar source: nexg type: integer + nodem1: + type: array + set_in: ar + source: cellidm1 + description: Reduced node number in model 1 for each exchange, derived from CELLIDM1. + dtype: integer + shape: + - nexg + nodem2: + type: array + set_in: ar + source: cellidm2 + description: Reduced node number in model 2 for each exchange, derived from CELLIDM2. + dtype: integer + shape: + - nexg + ihc: + type: array + set_in: ar + source: ihc + description: 'Connection type flag for each exchange: 0 vertical, 1 horizontal, 2 horizontal for a + vertically staggered grid.' + dtype: integer + shape: + - nexg + cl1: + type: array + set_in: ar + source: cl1 + description: Distance between the center of the model 1 cell and its shared face. + dtype: double + shape: + - nexg + cl2: + type: array + set_in: ar + source: cl2 + description: Distance between the center of the model 2 cell and its shared face. + dtype: double + shape: + - nexg + hwva: + type: array + set_in: ar + source: hwva + description: Horizontal width of the connection if IHC > 0, or the area perpendicular to flow of the + vertical connection if IHC = 0. + dtype: double + shape: + - nexg + naux: + readonly: true + set_in: ar + description: Number of auxiliary variables. + type: integer + auxname_cst: + type: array + readonly: true + set_in: ar + description: Names of auxiliary variables. + dtype: string + shape: + - naux diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.json index e41a3455..cd0c5334 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.json @@ -126,6 +126,46 @@ "set_in": "ar", "source": "nexg", "type": "integer" + }, + "nodem1": { + "type": "array", + "set_in": "ar", + "source": "cellidm1", + "description": "Reduced node number in the surface water model for each exchange, derived from CELLIDM1. Registered as NODEM1 in memory though the Fortran field is named NODESWF.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "nodem2": { + "type": "array", + "set_in": "ar", + "source": "cellidm2", + "description": "Reduced node number in the GWF model for each exchange, derived from CELLIDM2. Registered as NODEM2 in memory though the Fortran field is named NODEGWF.", + "dtype": "integer", + "shape": [ + "nexg" + ] + }, + "bedleak": { + "type": "array", + "set_in": "ar", + "source": "bedleak", + "description": "Bed leakance for each exchange.", + "dtype": "double", + "shape": [ + "nexg" + ] + }, + "cfact": { + "type": "array", + "set_in": "ar", + "source": "cfact", + "description": "Factor used in the conductance calculation for each exchange.", + "dtype": "double", + "shape": [ + "nexg" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.toml index b2abfa2b..2ab13122 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.toml @@ -105,3 +105,43 @@ type = "integer" set_in = "ar" source = "nexg" type = "integer" + +[memory.nodem1] +type = "array" +set_in = "ar" +source = "cellidm1" +description = "Reduced node number in the surface water model for each exchange, derived from CELLIDM1. Registered as NODEM1 in memory though the Fortran field is named NODESWF." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.nodem2] +type = "array" +set_in = "ar" +source = "cellidm2" +description = "Reduced node number in the GWF model for each exchange, derived from CELLIDM2. Registered as NODEM2 in memory though the Fortran field is named NODEGWF." +dtype = "integer" +shape = [ + "nexg", +] + +[memory.bedleak] +type = "array" +set_in = "ar" +source = "bedleak" +description = "Bed leakance for each exchange." +dtype = "double" +shape = [ + "nexg", +] + +[memory.cfact] +type = "array" +set_in = "ar" +source = "cfact" +description = "Factor used in the conductance calculation for each exchange." +dtype = "double" +shape = [ + "nexg", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.yaml index 2390253a..5a617848 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/exg-olfgwf.yaml @@ -123,3 +123,37 @@ memory: set_in: ar source: nexg type: integer + nodem1: + type: array + set_in: ar + source: cellidm1 + description: Reduced node number in the surface water model for each exchange, derived from CELLIDM1. + Registered as NODEM1 in memory though the Fortran field is named NODESWF. + dtype: integer + shape: + - nexg + nodem2: + type: array + set_in: ar + source: cellidm2 + description: Reduced node number in the GWF model for each exchange, derived from CELLIDM2. Registered + as NODEM2 in memory though the Fortran field is named NODEGWF. + dtype: integer + shape: + - nexg + bedleak: + type: array + set_in: ar + source: bedleak + description: Bed leakance for each exchange. + dtype: double + shape: + - nexg + cfact: + type: array + set_in: ar + source: cfact + description: Factor used in the conductance calculation for each exchange. + dtype: double + shape: + - nexg diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.json index a877ff21..17fb33e1 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwe-cnd", "parent": "gwe-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.toml index 8372c1b8..b150a6bd 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "gwe-cnd" parent = "gwe-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.xt3d_off] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.yaml index 945b4002..0e52911c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-cnd.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwe-cnd parent: gwe-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.json index 03077909..286bc681 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.toml index 5b66230e..0d7bc18c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.yaml index 23ca3d77..d8c9768b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ctp.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.json index a3cb7321..7c33bf7a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.json @@ -29,6 +29,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -294,6 +302,26 @@ "shape": [ "ncpl" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.toml index 85f341f7..e749b55e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.toml @@ -27,6 +27,12 @@ scope = "model" value = "3" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -273,3 +279,23 @@ dtype = "double" shape = [ "ncpl", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.yaml index 575eb0b6..0f2b37a5 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-dis.yaml @@ -21,6 +21,11 @@ dims: ncelldim: value: '3' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -258,3 +263,21 @@ memory: dtype: double shape: - ncpl + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.json index f3c6375d..fe4e927a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.json @@ -24,6 +24,14 @@ "value": "(nja - nodes) / 2" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -360,7 +368,7 @@ "description": "Horizontal cell area, computed from grid geometry.", "dtype": "double", "shape": [ - "nodes" + "nodesuser" ] }, "idomain": { @@ -371,6 +379,26 @@ "shape": [ "nodes" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.toml index b522e1a7..d4c449f8 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.toml @@ -22,6 +22,12 @@ scope = "model" [dims.njas] value = "(nja - nodes) / 2" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -325,7 +331,7 @@ set_in = "ar" description = "Horizontal cell area, computed from grid geometry." dtype = "double" shape = [ - "nodes", + "nodesuser", ] [memory.idomain] @@ -336,3 +342,23 @@ dtype = "integer" shape = [ "nodes", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.yaml index 5155c096..285ae8d2 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disu.yaml @@ -17,6 +17,11 @@ dims: scope: model njas: value: (nja - nodes) / 2 +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -348,7 +353,7 @@ memory: description: Horizontal cell area, computed from grid geometry. dtype: double shape: - - nodes + - nodesuser idomain: type: array set_in: ar @@ -356,3 +361,21 @@ memory: dtype: integer shape: - nodes + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.json index 07d7ff4b..50a79403 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.json @@ -25,6 +25,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -328,6 +336,26 @@ "shape": [ "ncpl" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.toml index 0d81cbd2..5e066363 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.toml @@ -23,6 +23,12 @@ scope = "model" value = "2" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -295,3 +301,23 @@ dtype = "double" shape = [ "ncpl", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.yaml index aed6f089..dab25fab 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-disv.yaml @@ -18,6 +18,11 @@ dims: ncelldim: value: '2' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -289,3 +294,21 @@ memory: dtype: double shape: - ncpl + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.json index b7454aa2..336382df 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.toml index 0d15adeb..03efed2c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.yaml index 09f64fec..db4d50e7 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-esl.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.json index 1f3217a5..066ad3c0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwe-est", "parent": "gwe-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.toml index 3afb3cf8..b31a44e4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "gwe-est" parent = "gwe-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.save_flows] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.yaml index b4bc6dd6..c83e7b84 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-est.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwe-est parent: gwe-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.json index dd84ad1e..7c781f84 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwe-ic", "parent": "gwe-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.toml index 3079da5f..816ec519 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "gwe-ic" parent = "gwe-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.export_array_ascii] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.yaml index d3782582..7525bc2d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-ic.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwe-ic parent: gwe-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.json index b49d12c4..e55079e4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.json @@ -8,7 +8,9 @@ "dims": { "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "ncv": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.toml index 08611de0..a3de3530 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.toml @@ -8,7 +8,7 @@ subtype = "advanced" [dims.auxiliary] value = "len(auxiliary)" -[dims.ncv] +[runtime_dims.ncv] set_in = "ar" [blocks.options.fields.flow_package_name] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.yaml index a4f7df81..64dd5a8f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-lke.yaml @@ -7,6 +7,7 @@ subtype: advanced dims: auxiliary: value: len(auxiliary) +runtime_dims: ncv: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.json index 5a5a10f1..712c3fe6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.json @@ -62,5 +62,31 @@ } } } + }, + "memory": { + "iprpak": { + "set_in": "ar", + "source": "print_input", + "description": "Flag controlling whether mover input is echoed to the listing file.", + "type": "integer" + }, + "iprflow": { + "set_in": "ar", + "source": "print_flows", + "description": "Flag controlling whether mover flow rates are printed to the listing file.", + "type": "integer" + }, + "ipakcb": { + "set_in": "ar", + "source": "save_flows", + "description": "Flag controlling whether mover flows are written to the budget file.", + "type": "integer" + }, + "maxpackages": { + "readonly": true, + "set_in": "ar", + "description": "Number of packages participating in the mover. Computed from the packages that supply or receive moved water.", + "type": "integer" + } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.toml index ca776a0b..36dc9549 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.toml @@ -52,3 +52,27 @@ longname = "file keyword" description = "name of the comma-separated value (CSV) output file to write budget summary information. A budget summary record will be written to this file for each time step of the simulation." tagged = false direction = "out" + +[memory.iprpak] +set_in = "ar" +source = "print_input" +description = "Flag controlling whether mover input is echoed to the listing file." +type = "integer" + +[memory.iprflow] +set_in = "ar" +source = "print_flows" +description = "Flag controlling whether mover flow rates are printed to the listing file." +type = "integer" + +[memory.ipakcb] +set_in = "ar" +source = "save_flows" +description = "Flag controlling whether mover flows are written to the budget file." +type = "integer" + +[memory.maxpackages] +readonly = true +set_in = "ar" +description = "Number of packages participating in the mover. Computed from the packages that supply or receive moved water." +type = "integer" diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.yaml index 1883f9bc..8c0a19a2 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mve.yaml @@ -54,3 +54,25 @@ blocks: budget summary record will be written to this file for each time step of the simulation. tagged: false direction: out +memory: + iprpak: + set_in: ar + source: print_input + description: Flag controlling whether mover input is echoed to the listing file. + type: integer + iprflow: + set_in: ar + source: print_flows + description: Flag controlling whether mover flow rates are printed to the listing file. + type: integer + ipakcb: + set_in: ar + source: save_flows + description: Flag controlling whether mover flows are written to the budget file. + type: integer + maxpackages: + readonly: true + set_in: ar + description: Number of packages participating in the mover. Computed from the packages that supply + or receive moved water. + type: integer diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.json index b6b39d4c..160c9476 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.json @@ -8,7 +8,9 @@ "dims": { "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "ncv": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.toml index 2d5ef2df..dd4c7915 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.toml @@ -8,7 +8,7 @@ subtype = "advanced" [dims.auxiliary] value = "len(auxiliary)" -[dims.ncv] +[runtime_dims.ncv] set_in = "ar" [blocks.options.fields.flow_package_name] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.yaml index 7b9eafd6..6c91bbe0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-mwe.yaml @@ -7,6 +7,7 @@ subtype: advanced dims: auxiliary: value: len(auxiliary) +runtime_dims: ncv: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.json index 2ebfe483..79c631e3 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.json @@ -4,7 +4,7 @@ "name": "gwe-nam", "parent": "sim-nam", "dependent_variable": "temperature", - "dims": { + "runtime_dims": { "nja": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.toml index 152d8d09..5c68a895 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.toml @@ -4,10 +4,10 @@ name = "gwe-nam" parent = "sim-nam" dependent_variable = "temperature" -[dims.nja] +[runtime_dims.nja] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.list] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.yaml index e9182288..2842d2c1 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-nam.yaml @@ -3,7 +3,7 @@ schema_version: 2.0.0.dev3 name: gwe-nam parent: sim-nam dependent_variable: temperature -dims: +runtime_dims: nja: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.json index 84ed1e57..6c60b51b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.json @@ -8,7 +8,9 @@ "dims": { "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "ncv": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.toml index d9354e79..5f9bf2c4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.toml @@ -8,7 +8,7 @@ subtype = "advanced" [dims.auxiliary] value = "len(auxiliary)" -[dims.ncv] +[runtime_dims.ncv] set_in = "ar" [blocks.options.fields.flow_package_name] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.yaml index 77c59894..2f8c6dfb 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-sfe.yaml @@ -7,6 +7,7 @@ subtype: advanced dims: auxiliary: value: len(auxiliary) +runtime_dims: ncv: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.json index 41aa7a4b..b09afea6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.json @@ -8,7 +8,9 @@ "dims": { "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "ncv": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.toml index cdb636cf..20f3d68e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.toml @@ -8,7 +8,7 @@ subtype = "advanced" [dims.auxiliary] value = "len(auxiliary)" -[dims.ncv] +[runtime_dims.ncv] set_in = "ar" [blocks.options.fields.flow_package_name] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.yaml index 63056a0b..a7f652d2 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwe-uze.yaml @@ -7,6 +7,7 @@ subtype: advanced dims: auxiliary: value: len(auxiliary) +runtime_dims: ncv: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.json index 6fe10d4c..ad3bd625 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.toml index 29d5950a..42c45214 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.yaml index e9854919..a25842fd 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chd.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.json index 03dd1a6e..4c872661 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.toml index 42a09d98..a1fb85f6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.readarraygrid] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.yaml index 88d77c3f..9b4b7d55 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-chdg.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.json index d9388898..51342d6c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.json @@ -11,7 +11,9 @@ "maxsig0": { "value": "maxsig0", "scope": "model" - }, + } + }, + "runtime_dims": { "ncelldim": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.toml index f221431d..cf6c54b5 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.toml @@ -11,10 +11,10 @@ scope = "model" value = "maxsig0" scope = "model" -[dims.ncelldim] +[runtime_dims.ncelldim] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.boundnames] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.yaml index 370d7491..4e760595 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-csub.yaml @@ -9,6 +9,7 @@ dims: maxsig0: value: maxsig0 scope: model +runtime_dims: ncelldim: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.json index 14b99fce..09317275 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.json @@ -29,6 +29,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -294,6 +302,26 @@ "shape": [ "ncpl" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.toml index c87525c3..cb000ae5 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.toml @@ -27,6 +27,12 @@ scope = "model" value = "3" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -273,3 +279,23 @@ dtype = "double" shape = [ "ncpl", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.yaml index a24f8216..31a1234a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-dis.yaml @@ -21,6 +21,11 @@ dims: ncelldim: value: '3' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -258,3 +263,21 @@ memory: dtype: double shape: - ncpl + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.json index 51366d45..c4b502a7 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.json @@ -24,6 +24,14 @@ "value": "(nja - nodes) / 2" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -362,7 +370,7 @@ "description": "Horizontal cell area, computed from grid geometry.", "dtype": "double", "shape": [ - "nodes" + "nodesuser" ] }, "idomain": { @@ -373,6 +381,26 @@ "shape": [ "nodes" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.toml index cbf8e357..21640548 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.toml @@ -22,6 +22,12 @@ scope = "model" [dims.njas] value = "(nja - nodes) / 2" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -327,7 +333,7 @@ set_in = "ar" description = "Horizontal cell area, computed from grid geometry." dtype = "double" shape = [ - "nodes", + "nodesuser", ] [memory.idomain] @@ -338,3 +344,23 @@ dtype = "integer" shape = [ "nodes", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.yaml index 243a1ce1..f2ccfe22 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disu.yaml @@ -17,6 +17,11 @@ dims: scope: model njas: value: (nja - nodes) / 2 +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -350,7 +355,7 @@ memory: description: Horizontal cell area, computed from grid geometry. dtype: double shape: - - nodes + - nodesuser idomain: type: array set_in: ar @@ -358,3 +363,21 @@ memory: dtype: integer shape: - nodes + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.json index be8607d5..8cdda593 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.json @@ -25,6 +25,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -328,6 +336,26 @@ "shape": [ "ncpl" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.toml index e2def104..20151227 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.toml @@ -23,6 +23,12 @@ scope = "model" value = "2" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -295,3 +301,23 @@ dtype = "double" shape = [ "ncpl", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.yaml index 76e29f07..e9fba3b8 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-disv.yaml @@ -18,6 +18,11 @@ dims: ncelldim: value: '2' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -289,3 +294,21 @@ memory: dtype: double shape: - ncpl + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.json index f5820d1f..e1d19c86 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.toml index b762208f..ae64e936 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.yaml index 73ddbc36..462e7c35 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drn.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.json index 2606d974..529e075b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.toml index f6f32e1c..fb68245b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.readarraygrid] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.yaml index 052dcaa4..dd5a9bc4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-drng.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.json index 97fbecb2..013c7e1d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.json @@ -19,7 +19,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.toml index 84396d85..4ab06de0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.toml @@ -19,10 +19,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.fixed_cell] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.yaml index b0422293..84d9459e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evt.yaml @@ -15,6 +15,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.json index c3b07ae7..fc8fc2f0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.json @@ -11,7 +11,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.toml index c406a481..d797bfc9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.toml @@ -11,10 +11,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.readasarrays] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.yaml index e4b425c5..889237e3 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-evta.yaml @@ -9,6 +9,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.json index ba57ed3b..38a758c5 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.toml index 2c3ee506..24af0356 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.yaml index f99ee1af..4012fb72 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghb.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.json index 992cf762..0c14b4b4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.toml index b56d7a3b..3415aef2 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.readarraygrid] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.yaml index 452a5d92..7caec7c0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ghbg.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.json index 688b3448..c258cd8d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwf-ic", "parent": "gwf-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.toml index caf105b3..4a564cf4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "gwf-ic" parent = "gwf-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.export_array_ascii] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.yaml index db82f1dd..0e736932 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-ic.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwf-ic parent: gwf-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.json index b31ece72..395aab7e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.json @@ -4,7 +4,7 @@ "name": "gwf-nam", "parent": "sim-nam", "dependent_variable": "head", - "dims": { + "runtime_dims": { "nja": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.toml index 3b4f8501..0f02598d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.toml @@ -4,10 +4,10 @@ name = "gwf-nam" parent = "sim-nam" dependent_variable = "head" -[dims.nja] +[runtime_dims.nja] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.list] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.yaml index b32c9f15..fe9e0432 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-nam.yaml @@ -3,7 +3,7 @@ schema_version: 2.0.0.dev3 name: gwf-nam parent: sim-nam dependent_variable: head -dims: +runtime_dims: nja: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.json index 201b1e88..1be50c63 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwf-npf", "parent": "gwf-nam", - "dims": { + "runtime_dims": { "njas": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.toml index 52d8a613..314d32a8 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.toml @@ -3,10 +3,10 @@ schema_version = "2.0.0.dev3" name = "gwf-npf" parent = "gwf-nam" -[dims.njas] +[runtime_dims.njas] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.save_flows] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.yaml index 182ed1d1..c598f3f4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-npf.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwf-npf parent: gwf-nam -dims: +runtime_dims: njas: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.json index ae88b7a5..2f9d0f93 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.toml index b6151c13..1549c6f9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.fixed_cell] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.yaml index 742bbdeb..64965075 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rch.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.json index a818e29e..c4d66f4d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.json @@ -11,7 +11,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.toml index d679d8a4..0dd531ba 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.toml @@ -11,10 +11,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.readasarrays] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.yaml index ed5d1c9a..eb3f49ec 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rcha.yaml @@ -9,6 +9,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.json index f88f8097..4ca9f730 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.toml index 97493d95..1295347d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.yaml index f3638cef..8babbd3e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-riv.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.json index 65e81593..3689622a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.toml index 7eba9b17..836e249e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.readarraygrid] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.yaml index f4cfb9e0..e13bfbde 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-rivg.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.json index a4e970ce..ee20d0da 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.json @@ -12,7 +12,9 @@ }, "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "maxbound": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.toml index 71c4b242..a10b8390 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.toml @@ -12,7 +12,7 @@ scope = "model" [dims.auxiliary] value = "len(auxiliary)" -[dims.maxbound] +[runtime_dims.maxbound] set_in = "ar" [blocks.options.fields.storage] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.yaml index 26859915..7634a1fa 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sfr.yaml @@ -10,6 +10,7 @@ dims: scope: model auxiliary: value: len(auxiliary) +runtime_dims: maxbound: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.json index adaa3ae8..4a4841e9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwf-sto", "parent": "gwf-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.toml index 7c5468fd..0f92ee77 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "gwf-sto" parent = "gwf-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.save_flows] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.yaml index 3f741534..6b7d23bf 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-sto.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwf-sto parent: gwf-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.json index 2ed60538..c740914f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.toml index 0187a24e..505f3003 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.yaml index 96442f03..1a254340 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-wel.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.json index 091eeb49..0066595a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.toml index c59b270e..f3c0f984 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.readarraygrid] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.yaml index bf1bae7c..3ab8ea0c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwf-welg.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.json index cf4e6475..03b3bf1b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.toml index 4367ccaa..ce39ccec 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.yaml index 30e2d585..060828eb 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-cnc.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.json index b901094b..7d1aa2ad 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.json @@ -29,6 +29,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -294,6 +302,26 @@ "shape": [ "ncpl" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.toml index 296be006..e12156a6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.toml @@ -27,6 +27,12 @@ scope = "model" value = "3" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -273,3 +279,23 @@ dtype = "double" shape = [ "ncpl", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.yaml index 16c0b1e4..fbf94636 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dis.yaml @@ -21,6 +21,11 @@ dims: ncelldim: value: '3' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -258,3 +263,21 @@ memory: dtype: double shape: - ncpl + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.json index ad4b2fdb..7c9c9a2c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.json @@ -24,6 +24,14 @@ "value": "(nja - nodes) / 2" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -362,7 +370,7 @@ "description": "Horizontal cell area, computed from grid geometry.", "dtype": "double", "shape": [ - "nodes" + "nodesuser" ] }, "idomain": { @@ -373,6 +381,26 @@ "shape": [ "nodes" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.toml index 1c81ca49..cfbef4d7 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.toml @@ -22,6 +22,12 @@ scope = "model" [dims.njas] value = "(nja - nodes) / 2" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -327,7 +333,7 @@ set_in = "ar" description = "Horizontal cell area, computed from grid geometry." dtype = "double" shape = [ - "nodes", + "nodesuser", ] [memory.idomain] @@ -338,3 +344,23 @@ dtype = "integer" shape = [ "nodes", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.yaml index 703cecc0..44a22ab8 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disu.yaml @@ -17,6 +17,11 @@ dims: scope: model njas: value: (nja - nodes) / 2 +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -350,7 +355,7 @@ memory: description: Horizontal cell area, computed from grid geometry. dtype: double shape: - - nodes + - nodesuser idomain: type: array set_in: ar @@ -358,3 +363,21 @@ memory: dtype: integer shape: - nodes + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.json index ec4d43e5..493c3ceb 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.json @@ -25,6 +25,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -328,6 +336,26 @@ "shape": [ "ncpl" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.toml index 2e1726d8..1a62e2f9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.toml @@ -23,6 +23,12 @@ scope = "model" value = "2" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -295,3 +301,23 @@ dtype = "double" shape = [ "ncpl", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.yaml index da88a410..ce28d9d6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-disv.yaml @@ -18,6 +18,11 @@ dims: ncelldim: value: '2' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -289,3 +294,21 @@ memory: dtype: double shape: - ncpl + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.json index c596f307..6747c6a1 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwt-dsp", "parent": "gwt-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.toml index 1cddb0d0..fbf45fa0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "gwt-dsp" parent = "gwt-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.xt3d_off] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.yaml index 8f3f3a13..be16a639 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-dsp.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwt-dsp parent: gwt-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.json index c9c23d27..a21146c9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwt-ic", "parent": "gwt-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.toml index 03342681..59f91cd0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "gwt-ic" parent = "gwt-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.export_array_ascii] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.yaml index 5d6577eb..0ae458d6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ic.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwt-ic parent: gwt-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.json index 26e0510a..52b4a494 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.json @@ -4,7 +4,7 @@ "name": "gwt-ist", "parent": "gwt-nam", "multi": true, - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.toml index 38d47ea3..3856ba5f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.toml @@ -4,7 +4,7 @@ name = "gwt-ist" parent = "gwt-nam" multi = true -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.save_flows] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.yaml index d1941cce..9154d2d0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-ist.yaml @@ -3,7 +3,7 @@ schema_version: 2.0.0.dev3 name: gwt-ist parent: gwt-nam multi: true -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.json index e4d62309..22ac4c93 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.json @@ -8,7 +8,9 @@ "dims": { "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "ncv": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.toml index 4417055a..03fcada9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.toml @@ -8,7 +8,7 @@ subtype = "advanced" [dims.auxiliary] value = "len(auxiliary)" -[dims.ncv] +[runtime_dims.ncv] set_in = "ar" [blocks.options.fields.flow_package_name] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.yaml index 3985de41..d973421d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-lkt.yaml @@ -7,6 +7,7 @@ subtype: advanced dims: auxiliary: value: len(auxiliary) +runtime_dims: ncv: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.json index fb5f4460..41de8948 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "gwt-mst", "parent": "gwt-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.toml index 27954db4..74984e3a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "gwt-mst" parent = "gwt-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.save_flows] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.yaml index c4eb3e71..5631a91e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mst.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: gwt-mst parent: gwt-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.json index aa1b9126..af2c826f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.json @@ -62,5 +62,31 @@ } } } + }, + "memory": { + "iprpak": { + "set_in": "ar", + "source": "print_input", + "description": "Flag controlling whether mover input is echoed to the listing file.", + "type": "integer" + }, + "iprflow": { + "set_in": "ar", + "source": "print_flows", + "description": "Flag controlling whether mover flow rates are printed to the listing file.", + "type": "integer" + }, + "ipakcb": { + "set_in": "ar", + "source": "save_flows", + "description": "Flag controlling whether mover flows are written to the budget file.", + "type": "integer" + }, + "maxpackages": { + "readonly": true, + "set_in": "ar", + "description": "Number of packages participating in the mover. Computed from the packages that supply or receive moved water.", + "type": "integer" + } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.toml index 84520e03..701f016c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.toml @@ -52,3 +52,27 @@ longname = "file keyword" description = "name of the comma-separated value (CSV) output file to write budget summary information. A budget summary record will be written to this file for each time step of the simulation." tagged = false direction = "out" + +[memory.iprpak] +set_in = "ar" +source = "print_input" +description = "Flag controlling whether mover input is echoed to the listing file." +type = "integer" + +[memory.iprflow] +set_in = "ar" +source = "print_flows" +description = "Flag controlling whether mover flow rates are printed to the listing file." +type = "integer" + +[memory.ipakcb] +set_in = "ar" +source = "save_flows" +description = "Flag controlling whether mover flows are written to the budget file." +type = "integer" + +[memory.maxpackages] +readonly = true +set_in = "ar" +description = "Number of packages participating in the mover. Computed from the packages that supply or receive moved water." +type = "integer" diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.yaml index 619825f4..1c5743c1 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mvt.yaml @@ -54,3 +54,25 @@ blocks: budget summary record will be written to this file for each time step of the simulation. tagged: false direction: out +memory: + iprpak: + set_in: ar + source: print_input + description: Flag controlling whether mover input is echoed to the listing file. + type: integer + iprflow: + set_in: ar + source: print_flows + description: Flag controlling whether mover flow rates are printed to the listing file. + type: integer + ipakcb: + set_in: ar + source: save_flows + description: Flag controlling whether mover flows are written to the budget file. + type: integer + maxpackages: + readonly: true + set_in: ar + description: Number of packages participating in the mover. Computed from the packages that supply + or receive moved water. + type: integer diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.json index c693a28d..ef2d15bc 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.json @@ -8,7 +8,9 @@ "dims": { "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "ncv": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.toml index 62276bab..347006da 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.toml @@ -8,7 +8,7 @@ subtype = "advanced" [dims.auxiliary] value = "len(auxiliary)" -[dims.ncv] +[runtime_dims.ncv] set_in = "ar" [blocks.options.fields.flow_package_name] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.yaml index 317f4ee6..faa289c1 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-mwt.yaml @@ -7,6 +7,7 @@ subtype: advanced dims: auxiliary: value: len(auxiliary) +runtime_dims: ncv: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.json index 96c06d3a..ab552be3 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.json @@ -4,7 +4,7 @@ "name": "gwt-nam", "parent": "sim-nam", "dependent_variable": "concentration", - "dims": { + "runtime_dims": { "nja": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.toml index 259043c7..663a0d17 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.toml @@ -4,10 +4,10 @@ name = "gwt-nam" parent = "sim-nam" dependent_variable = "concentration" -[dims.nja] +[runtime_dims.nja] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.list] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.yaml index 2065af53..5f13f2f4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-nam.yaml @@ -3,7 +3,7 @@ schema_version: 2.0.0.dev3 name: gwt-nam parent: sim-nam dependent_variable: concentration -dims: +runtime_dims: nja: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.json index b17316b7..91cffe84 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.json @@ -8,7 +8,9 @@ "dims": { "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "ncv": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.toml index 2ae30283..a16ea4d7 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.toml @@ -8,7 +8,7 @@ subtype = "advanced" [dims.auxiliary] value = "len(auxiliary)" -[dims.ncv] +[runtime_dims.ncv] set_in = "ar" [blocks.options.fields.flow_package_name] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.yaml index ef626754..0f9d6e77 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-sft.yaml @@ -7,6 +7,7 @@ subtype: advanced dims: auxiliary: value: len(auxiliary) +runtime_dims: ncv: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.json index 83fc2671..05f9471f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.toml index d8884f57..63161d34 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.yaml index 29f13f41..e87a08cf 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-src.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.json index 6fcb9d2d..3ee11c0c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.json @@ -8,7 +8,9 @@ "dims": { "auxiliary": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "ncv": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.toml index a4927862..847a7a5a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.toml @@ -8,7 +8,7 @@ subtype = "advanced" [dims.auxiliary] value = "len(auxiliary)" -[dims.ncv] +[runtime_dims.ncv] set_in = "ar" [blocks.options.fields.flow_package_name] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.yaml index 266ca3cb..d0be4723 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/gwt-uzt.yaml @@ -7,6 +7,7 @@ subtype: advanced dims: auxiliary: value: len(auxiliary) +runtime_dims: ncv: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.json index 4270d69d..e2482189 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.toml index 8499ca3f..9efe0f8d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.yaml index 3d724b77..e35258ab 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-cdb.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.json index bbfb7fc0..c3e9de1f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.toml index 90664df3..de3c047c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.yaml index fe57b3e7..518886c3 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-chd.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.json index b6957d24..09283454 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "olf-dfw", "parent": "olf-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.toml index 88d82c42..b563400b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "olf-dfw" parent = "olf-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.central_in_space] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.yaml index 43acdd46..229c6fe0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dfw.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: olf-dfw parent: olf-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.json index b65ded74..45e634c0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.json @@ -25,6 +25,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -208,6 +216,26 @@ "ncol", "nrow" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.toml index 149fd23b..ac54cb1a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.toml @@ -23,6 +23,12 @@ scope = "model" value = "2" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -189,3 +195,23 @@ shape = [ "ncol", "nrow", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.yaml index 326d4782..8aaac3f8 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-dis2d.yaml @@ -18,6 +18,11 @@ dims: ncelldim: value: '2' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -184,3 +189,21 @@ memory: shape: - ncol - nrow + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.json index bb2ef1be..549fe875 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.json @@ -17,6 +17,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -278,6 +286,26 @@ "shape": [ "nodes" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.toml index f2b93ec6..741ee7e6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.toml @@ -15,6 +15,12 @@ scope = "model" value = "1" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -247,3 +253,23 @@ dtype = "integer" shape = [ "nodes", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.yaml index f1f49a1a..9562cbc5 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv1d.yaml @@ -12,6 +12,11 @@ dims: ncelldim: value: '1' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -247,3 +252,21 @@ memory: dtype: integer shape: - nodes + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.json index f5822d56..80a8fb40 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.json @@ -17,6 +17,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -244,6 +252,26 @@ "shape": [ "nodes" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.toml index 201f8e25..116cfa5f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.toml @@ -15,6 +15,12 @@ scope = "model" value = "1" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -213,3 +219,23 @@ dtype = "integer" shape = [ "nodes", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.yaml index 59b68d16..ec3f9eba 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-disv2d.yaml @@ -12,6 +12,11 @@ dims: ncelldim: value: '1' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -216,3 +221,21 @@ memory: dtype: integer shape: - nodes + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.json index 3bbb9208..75856170 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.toml index f5c7515e..47d951a6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.yaml index 3c4e4c9b..ab61d4ad 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-evp.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.json index 0f251d1b..7f1aa86d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.toml index 5231e0c5..11d84e7a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.yaml index ba2aacbd..7ac484a8 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-flw.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.json index cb85529b..da92aa01 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "olf-ic", "parent": "olf-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.toml index 16fafe77..f16c0aff 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "olf-ic" parent = "olf-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.export_array_ascii] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.yaml index 3629aa10..e17ae6c4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-ic.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: olf-ic parent: olf-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.json index e390cbb7..2e6ffd9a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.json @@ -4,7 +4,7 @@ "name": "olf-nam", "parent": "sim-nam", "dependent_variable": "stage", - "dims": { + "runtime_dims": { "nja": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.toml index 87d6c1e7..e6d6eb56 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.toml @@ -4,10 +4,10 @@ name = "olf-nam" parent = "sim-nam" dependent_variable = "stage" -[dims.nja] +[runtime_dims.nja] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.list] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.yaml index b865d1bb..d74f8a1c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-nam.yaml @@ -3,7 +3,7 @@ schema_version: 2.0.0.dev3 name: olf-nam parent: sim-nam dependent_variable: stage -dims: +runtime_dims: nja: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.json index e59e41cc..43185309 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.toml index 42ca292a..6dd9994e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.yaml index c4ad8cf0..4016e593 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-pcp.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.json index b51a68f6..8161fba3 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.toml index 86df5942..f6660208 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.yaml index 6b681ca6..aea17e6a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/olf-zdg.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.json index c2bcbe1f..4fc878ba 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.json @@ -29,6 +29,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -289,6 +297,26 @@ "shape": [ "ncpl" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.toml index b3a9a015..5542b17b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.toml @@ -27,6 +27,12 @@ scope = "model" value = "3" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -268,3 +274,23 @@ dtype = "double" shape = [ "ncpl", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.yaml index a2998899..6f54778e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-dis.yaml @@ -21,6 +21,11 @@ dims: ncelldim: value: '3' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -253,3 +258,21 @@ memory: dtype: double shape: - ncpl + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.json index 3f6f603f..0329961a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.json @@ -25,6 +25,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -325,6 +333,26 @@ "shape": [ "ncpl" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.toml index 1facaa43..da41e48b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.toml @@ -23,6 +23,12 @@ scope = "model" value = "2" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -292,3 +298,23 @@ dtype = "double" shape = [ "ncpl", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.yaml index f35cb844..b06ea315 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-disv.yaml @@ -18,6 +18,11 @@ dims: ncelldim: value: '2' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -285,3 +290,21 @@ memory: dtype: double shape: - ncpl + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.json index 5fef47cd..cf1d91c8 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "prt-mip", "parent": "prt-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.toml index f53f7741..10f3b6a2 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "prt-mip" parent = "prt-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.export_array_ascii] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.yaml index e5c7ea90..963e4b3b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-mip.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: prt-mip parent: prt-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.json index 157b8288..4afc90c9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "prt-nam", "parent": "sim-nam", - "dims": { + "runtime_dims": { "nja": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.toml index ef47836f..58ffddf6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.toml @@ -3,10 +3,10 @@ schema_version = "2.0.0.dev3" name = "prt-nam" parent = "sim-nam" -[dims.nja] +[runtime_dims.nja] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.list] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.yaml index 14dda0aa..691e5e2b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-nam.yaml @@ -2,7 +2,7 @@ type: model schema_version: 2.0.0.dev3 name: prt-nam parent: sim-nam -dims: +runtime_dims: nja: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.json index 0f546b6e..4f15cac3 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.json @@ -13,7 +13,9 @@ "nreleasetimes": { "value": "nreleasetimes", "scope": "model" - }, + } + }, + "runtime_dims": { "naux": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.toml index e01e062a..e1cf4527 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.toml @@ -13,13 +13,13 @@ scope = "model" value = "nreleasetimes" scope = "model" -[dims.naux] +[runtime_dims.naux] set_in = "ar" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.boundnames] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.yaml index 338fa5df..e2a6d5ce 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/prt-prp.yaml @@ -11,6 +11,7 @@ dims: nreleasetimes: value: nreleasetimes scope: model +runtime_dims: naux: set_in: ar nbound: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.json index 6bc565b1..ab7f0adf 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.toml index 4b4226a2..85f41704 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.yaml index 22ae7e02..9a30ae4d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-cdb.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.json index 770f93ab..e028eaba 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.toml index b1f66e52..ad0fed46 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.yaml index 737e6abe..9ae6983a 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-chd.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.json index 443561ae..816969fb 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "swf-dfw", "parent": "swf-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.toml index 1e4acc0d..c677c5c0 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "swf-dfw" parent = "swf-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.central_in_space] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.yaml index 2c7f7a58..b182114d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dfw.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: swf-dfw parent: swf-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.json index 43a862f6..8f2ef48b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.json @@ -25,6 +25,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -208,6 +216,26 @@ "ncol", "nrow" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.toml index b10e784e..ca504265 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.toml @@ -23,6 +23,12 @@ scope = "model" value = "2" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -189,3 +195,23 @@ shape = [ "ncol", "nrow", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.yaml index 18770e53..c5c5bdb9 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-dis2d.yaml @@ -18,6 +18,11 @@ dims: ncelldim: value: '2' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -184,3 +189,21 @@ memory: shape: - ncol - nrow + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.json index da93265b..c4940162 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.json @@ -17,6 +17,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -259,6 +267,26 @@ "shape": [ "nodes" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.toml index f9788c08..856f425e 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.toml @@ -15,6 +15,12 @@ scope = "model" value = "1" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -228,3 +234,23 @@ dtype = "integer" shape = [ "nodes", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.yaml index fafbba22..4c0e46db 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv1d.yaml @@ -12,6 +12,11 @@ dims: ncelldim: value: '1' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -232,3 +237,21 @@ memory: dtype: integer shape: - nodes + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.json index fbe4149d..888dceb2 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.json @@ -17,6 +17,14 @@ "scope": "model" } }, + "runtime_dims": { + "nodes": { + "set_in": "ar" + }, + "nodesuser": { + "set_in": "ar" + } + }, "blocks": { "options": { "fields": { @@ -244,6 +252,26 @@ "shape": [ "nodes" ] + }, + "nodeuser": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension.", + "dtype": "integer", + "shape": [ + "nodes" + ] + }, + "nodereduced": { + "type": "array", + "readonly": true, + "set_in": "ar", + "description": "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive.", + "dtype": "integer", + "shape": [ + "nodesuser" + ] } } } \ No newline at end of file diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.toml index 6c582c7e..694d3bf4 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.toml @@ -15,6 +15,12 @@ scope = "model" value = "1" scope = "model" +[runtime_dims.nodes] +set_in = "ar" + +[runtime_dims.nodesuser] +set_in = "ar" + [blocks.options.fields.length_units] type = "string" longname = "model length units" @@ -213,3 +219,23 @@ dtype = "integer" shape = [ "nodes", ] + +[memory.nodeuser] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each packed (active-cell) node position to its full-grid user node number. Index map for the runtime 'nodes' dimension." +dtype = "integer" +shape = [ + "nodes", +] + +[memory.nodereduced] +type = "array" +readonly = true +set_in = "ar" +description = "Maps each full-grid user node number to its packed (active-cell) node position, or a nonpositive sentinel if the cell is inactive." +dtype = "integer" +shape = [ + "nodesuser", +] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.yaml index a2393f48..6703adfc 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-disv2d.yaml @@ -12,6 +12,11 @@ dims: ncelldim: value: '1' scope: model +runtime_dims: + nodes: + set_in: ar + nodesuser: + set_in: ar blocks: options: fields: @@ -216,3 +221,21 @@ memory: dtype: integer shape: - nodes + nodeuser: + type: array + readonly: true + set_in: ar + description: Maps each packed (active-cell) node position to its full-grid user node number. Index + map for the runtime 'nodes' dimension. + dtype: integer + shape: + - nodes + nodereduced: + type: array + readonly: true + set_in: ar + description: Maps each full-grid user node number to its packed (active-cell) node position, or a + nonpositive sentinel if the cell is inactive. + dtype: integer + shape: + - nodesuser diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.json index c3e8707b..3e1bb0bc 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.toml index 960ad8d8..d15afad6 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.yaml index a4e96f7b..0af76d6c 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-evp.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.json index 9c02c554..07ecbb7b 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.toml index 634fc8a1..3d262f1f 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.yaml index 8f4fb1a9..a9bc251d 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-flw.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.json index b32721b1..bc7d0a17 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.json @@ -3,7 +3,7 @@ "schema_version": "2.0.0.dev3", "name": "swf-ic", "parent": "swf-nam", - "dims": { + "runtime_dims": { "nodes": { "set_in": "ar" } diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.toml index 21adca02..ae2a1f45 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.toml @@ -3,7 +3,7 @@ schema_version = "2.0.0.dev3" name = "swf-ic" parent = "swf-nam" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.export_array_ascii] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.yaml index c53e34bb..609ac918 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-ic.yaml @@ -2,7 +2,7 @@ type: package schema_version: 2.0.0.dev3 name: swf-ic parent: swf-nam -dims: +runtime_dims: nodes: set_in: ar blocks: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.json index 5a824c94..c1e1dd05 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.json @@ -4,7 +4,7 @@ "name": "swf-nam", "parent": "sim-nam", "dependent_variable": "stage", - "dims": { + "runtime_dims": { "nja": { "set_in": "ar" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.toml index af3afca2..acb99fa5 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.toml @@ -4,10 +4,10 @@ name = "swf-nam" parent = "sim-nam" dependent_variable = "stage" -[dims.nja] +[runtime_dims.nja] set_in = "ar" -[dims.nodes] +[runtime_dims.nodes] set_in = "ar" [blocks.options.fields.list] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.yaml index 5080f9c9..9c551528 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-nam.yaml @@ -3,7 +3,7 @@ schema_version: 2.0.0.dev3 name: swf-nam parent: sim-nam dependent_variable: stage -dims: +runtime_dims: nja: set_in: ar nodes: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.json index 4431571e..1bbae1d5 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.toml index e9c9473f..282ba8c8 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.yaml index c4618aa7..2af13cc3 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-pcp.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.json b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.json index 3fcf388d..36d2adfa 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.json +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.json @@ -15,7 +15,9 @@ }, "naux": { "value": "len(auxiliary)" - }, + } + }, + "runtime_dims": { "nbound": { "set_in": "rp" }, diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.toml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.toml index 330e654f..c5f0e2fb 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.toml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.toml @@ -15,10 +15,10 @@ value = "len(auxiliary)" [dims.naux] value = "len(auxiliary)" -[dims.nbound] +[runtime_dims.nbound] set_in = "rp" -[dims.ncolbnd] +[runtime_dims.ncolbnd] set_in = "ar" [blocks.options.fields.auxiliary] diff --git a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.yaml b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.yaml index 1c244fab..13ad40a1 100644 --- a/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.yaml +++ b/autotest/dfns/__snapshots__/v2.0.0.dev3/swf-zdg.yaml @@ -12,6 +12,7 @@ dims: value: len(auxiliary) naux: value: len(auxiliary) +runtime_dims: nbound: set_in: rp ncolbnd: diff --git a/autotest/dfns/test_schema.py b/autotest/dfns/test_schema.py index 13cd6179..951c7b39 100644 --- a/autotest/dfns/test_schema.py +++ b/autotest/dfns/test_schema.py @@ -231,7 +231,7 @@ def test_component_fields_loaded(dfn_dir): fields = gwf_dis.get_fields() assert isinstance(fields, dict) assert len(fields) > 0 - # every value is a Field instance, every key matches the field's name + # every value is an InputField instance, every key matches the field's name for name, field in fields.items(): assert name == field.name # fields from all blocks are present (nlay is in dimensions, not options) @@ -524,7 +524,7 @@ def test_memory_output_attributes_chd_no_to_mvr(dev3_spec): assert simtomvr.output is None -# --- FieldBase.render() ----------------------------------------------------- +# --- InputFieldBase.render() ------------------------------------------------- def test_render_keyword(): diff --git a/autotest/dfns/test_schema_dimensions.py b/autotest/dfns/test_schema_dimensions.py index 601a4c14..5e479e4c 100644 --- a/autotest/dfns/test_schema_dimensions.py +++ b/autotest/dfns/test_schema_dimensions.py @@ -9,12 +9,13 @@ Array, Block, Dfns, - Dim, + InputDim, Integer, List, Model, Package, Record, + RuntimeDim, String, _names_in_expr, _resolve_derived_dims, @@ -70,8 +71,8 @@ def test_shape_expr_cyclic_resolution(): name="bad", blocks=None, dims={ - "a": Dim(value="b + 1", scope="component"), - "b": Dim(value="a + 1", scope="component"), + "a": InputDim(value="b + 1", scope="component"), + "b": InputDim(value="a + 1", scope="component"), }, ) with pytest.raises(ValueError, match="Cycle in"): @@ -82,7 +83,7 @@ def test_shape_expr_unknown_operand(): pkg = Package( name="bad", blocks=None, - dims={"nodes": Dim(value="ghost_dim * 2", scope="component")}, + dims={"nodes": InputDim(value="ghost_dim * 2", scope="component")}, ) with pytest.raises(ValueError, match="not a known dimension"): Dfns(components={"bad": pkg}) @@ -101,7 +102,7 @@ def test_resolve_derived_dims_sum_expr(): pkg = Package( name="test", blocks=pkg.blocks, - dims={"total_conn": Dim(value="sum(packagedata.nlakeconn)", scope="component")}, + dims={"total_conn": InputDim(value="sum(packagedata.nlakeconn)", scope="component")}, ) order = _resolve_derived_dims(pkg, set()) assert order == ["total_conn"] @@ -117,8 +118,8 @@ def test_resolve_derived_dims_cycle_error(): name="test", blocks=None, dims={ - "a": Dim(value="b + 1", scope="component"), - "b": Dim(value="a + 1", scope="component"), + "a": InputDim(value="b + 1", scope="component"), + "b": InputDim(value="a + 1", scope="component"), }, ) with pytest.raises(ValueError, match="Cycle in"): @@ -129,7 +130,7 @@ def test_resolve_derived_dims_unknown_operand_error(): pkg = Package( name="test", blocks=None, - dims={"nodes": Dim(value="mystery_dim * 2", scope="component")}, + dims={"nodes": InputDim(value="mystery_dim * 2", scope="component")}, ) with pytest.raises(ValueError, match="not a known dimension"): _resolve_derived_dims(pkg, set()) @@ -139,7 +140,7 @@ def test_resolve_derived_dims_invalid_expression_error(): pkg = Package( name="test", blocks=None, - dims={"nodes": Dim(value="nlay * (", scope="component")}, + dims={"nodes": InputDim(value="nlay * (", scope="component")}, ) with pytest.raises(ValueError, match="Invalid"): _resolve_derived_dims(pkg, set()) @@ -226,7 +227,7 @@ def test_dim_value_len_form(): pkg = Package( name="test", blocks={"options": block}, - dims={"auxiliary": Dim(value="len(auxiliary)", scope="component")}, + dims={"auxiliary": InputDim(value="len(auxiliary)", scope="component")}, ) Dfns(components={"test": pkg}) # no error @@ -235,7 +236,7 @@ def test_dim_value_integer_field_not_found(): pkg = Package( name="test", blocks=None, - dims={"nlay": Dim(value="nlay", scope="component")}, + dims={"nlay": InputDim(value="nlay", scope="component")}, ) with pytest.raises(ValueError, match="not found in component"): Dfns(components={"test": pkg}) @@ -247,7 +248,7 @@ def test_dim_value_array_field_requires_len(): pkg = Package( name="test", blocks={"options": block}, - dims={"auxiliary": Dim(value="auxiliary", scope="component")}, + dims={"auxiliary": InputDim(value="auxiliary", scope="component")}, ) with pytest.raises(ValueError, match="use len\\(auxiliary\\)"): Dfns(components={"test": pkg}) @@ -262,9 +263,9 @@ def _dim_block(*names: str) -> Block: def _make_shape_validation_ctx(dim_names: set[str], derived: dict | None = None): """Return (array, component, known_dims) for shape element tests.""" - dims: dict[str, Dim] = {n: Dim(value=n, scope="component") for n in dim_names} + dims: dict[str, InputDim] = {n: InputDim(value=n, scope="component") for n in dim_names} if derived: - dims.update({n: Dim(value=e, scope="component") for n, e in derived.items()}) + dims.update({n: InputDim(value=e, scope="component") for n, e in derived.items()}) blocks = {"dimensions": _dim_block(*dim_names)} if dim_names else None pkg = Package(name="test", blocks=blocks, dims=dims or None) gwf = Model(name="gwf-nam", blocks=None) @@ -285,7 +286,7 @@ def test_validate_shape_element_inherited_dim(): name="gwf-dis", parent="gwf-nam", blocks=None, - dims={"nodes": Dim(value="42", scope="model")}, + dims={"nodes": InputDim(value="42", scope="model")}, ) test_pkg = Package(name="gwf-test", parent="gwf-nam", blocks=None) gwf = Model(name="gwf-nam", blocks=None) @@ -469,9 +470,9 @@ def test_local_dims(): name="gwf-dis", blocks={"dimensions": block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), }, ) spec = Dfns(components={"gwf-dis": pkg}) @@ -486,16 +487,16 @@ def test_local_dims(): pkg3 = Package( name="test", blocks=None, - dims={"nodes": Dim(value="42", scope="component")}, + dims={"nodes": InputDim(value="42", scope="component")}, ) spec3 = Dfns(components={"test": pkg3}) assert spec3.local_dims("test") == {"nodes"} - # runtime dims (value=None) also included + # runtime dims also included pkg4 = Package( name="test", blocks=None, - dims={"nja": Dim(value=None, phase="ar", scope="component")}, + runtime_dims={"nja": RuntimeDim(set_in="ar", scope="component")}, ) spec4 = Dfns(components={"test": pkg4}) assert spec4.local_dims("test") == {"nja"} @@ -509,12 +510,12 @@ def test_input_dims_excludes_runtime(): parent="gwf-nam", blocks={"dimensions": block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), - "nodes": Dim(value="nlay * nrow * ncol", scope="model"), - "nja": Dim(value=None, phase="ar", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="model"), }, + runtime_dims={"nja": RuntimeDim(set_in="ar", scope="model")}, ) spec = Dfns(components={"gwf-dis": pkg}) assert spec.input_dims("gwf-dis") == {"nlay", "nrow", "ncol", "nodes"} @@ -533,7 +534,7 @@ def test_input_dims_excludes_runtime(): }, ) }, - dims={"nja": Dim(value=None, phase="ar", scope="component")}, + runtime_dims={"nja": RuntimeDim(set_in="ar", scope="component")}, ) with pytest.raises(ValueError, match="does not resolve to a known dim"): Dfns(components={"test": runtime_shaped}) @@ -545,10 +546,10 @@ def test_resolve_derived_dims(): name="test", blocks={"dimensions": block}, dims={ - "nlay": Dim(value="nlay", scope="component"), - "nrow": Dim(value="nrow", scope="component"), - "ncol": Dim(value="ncol", scope="component"), - "nodes": Dim(value="nlay * nrow * ncol", scope="component"), + "nlay": InputDim(value="nlay", scope="component"), + "nrow": InputDim(value="nrow", scope="component"), + "ncol": InputDim(value="ncol", scope="component"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="component"), }, ) order = _resolve_derived_dims(pkg, {"nlay", "nrow", "ncol"}) @@ -558,11 +559,11 @@ def test_resolve_derived_dims(): name="test", blocks={"dimensions": block}, dims={ - "nlay": Dim(value="nlay", scope="component"), - "nrow": Dim(value="nrow", scope="component"), - "ncol": Dim(value="ncol", scope="component"), - "nodes": Dim(value="nlay * nrow * ncol", scope="component"), - "nodouble": Dim(value="nodes * 2", scope="component"), + "nlay": InputDim(value="nlay", scope="component"), + "nrow": InputDim(value="nrow", scope="component"), + "ncol": InputDim(value="ncol", scope="component"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="component"), + "nodouble": InputDim(value="nodes * 2", scope="component"), }, ) order = _resolve_derived_dims(pkg, {"nlay", "nrow", "ncol"}) @@ -571,7 +572,7 @@ def test_resolve_derived_dims(): pkg = Package( name="test", blocks=None, - dims={"derived": Dim(value="nodes + 1", scope="component")}, + dims={"derived": InputDim(value="nodes + 1", scope="component")}, ) order = _resolve_derived_dims(pkg, {"nodes"}) assert order == ["derived"] @@ -583,10 +584,10 @@ def test_dim_validation(): name="gwf-dis", blocks={"dimensions": block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), - "nodes": Dim(value="nlay * nrow * ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="model"), }, ) spec = Dfns(components={"gwf-dis": pkg}) @@ -603,9 +604,9 @@ def test_local_dims_model_scoped(): name="gwf-dis", blocks={"dimensions": block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), }, ) spec = Dfns(components={"gwf-dis": pkg}) @@ -619,10 +620,10 @@ def test_inherited_dims(): parent="gwf-nam", blocks={"dimensions": dis_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), - "nodes": Dim(value="nlay * nrow * ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="model"), }, ) chd = _pkg("gwf-chd", parent="gwf-nam", blocks=None) @@ -641,8 +642,8 @@ def test_inherited_dims(): parent="gwf-nam", blocks={"dimensions": disv_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "ncpl": Dim(value="ncpl", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "ncpl": InputDim(value="ncpl", scope="model"), }, ) chd = _pkg("gwf-chd", parent="gwf-nam", blocks=None) @@ -659,8 +660,8 @@ def test_inherited_dims(): parent="gwf-nam", blocks={"dimensions": disu_block}, dims={ - "nodes": Dim(value="nodes", scope="model"), - "nja": Dim(value="nja", scope="model"), + "nodes": InputDim(value="nodes", scope="model"), + "nja": InputDim(value="nja", scope="model"), }, ) chd = _pkg("gwf-chd", parent="gwf-nam", blocks=None) @@ -679,16 +680,16 @@ def test_inherited_dims_excludes_own(): parent="gwf-nam", blocks={"dimensions": dis_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), }, ) chd = Package( name="gwf-chd", parent="gwf-nam", blocks={"dimensions": _dim_block("secret_dim")}, - dims={"secret_dim": Dim(value="secret_dim", scope="model")}, + dims={"secret_dim": InputDim(value="secret_dim", scope="model")}, ) gwf = Model(name="gwf-nam", blocks=None) spec = Dfns(components={"gwf-nam": gwf, "gwf-dis": dis, "gwf-chd": chd}) @@ -706,10 +707,10 @@ def _dis_dfns() -> Dfns: parent="gwf-nam", blocks={"dimensions": dis_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), - "nodes": Dim(value="nlay * nrow * ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="model"), }, ) return Dfns(components={"gwf-nam": gwf, "gwf-dis": dis}) @@ -729,10 +730,10 @@ def test_dims_includes_derived(): parent="gwf-nam", blocks={"dimensions": dis_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), - "nodes": Dim(value="nlay * nrow * ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="model"), }, ) spec = Dfns(components={"gwf-nam": gwf, "gwf-dis": dis}) @@ -758,9 +759,9 @@ def test_top_level_array(): parent="gwf-nam", blocks={"dimensions": dis_block, "griddata": grid_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), }, ) gwf = Model(name="gwf-nam", blocks=None) @@ -778,9 +779,9 @@ def test_array_in_record(): parent="gwf-nam", blocks={"dimensions": dis_block, "options": opt_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), }, ) gwf = Model(name="gwf-nam", blocks=None) @@ -818,9 +819,9 @@ def test_invalid_array_shape(): parent="gwf-nam", blocks={"dimensions": dis_block, "griddata": grid_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), }, ) gwf = Model(name="gwf-nam", blocks=None) @@ -837,10 +838,10 @@ def test_array_shape_resolves_via_derived_dim(): parent="gwf-nam", blocks={"dimensions": dis_block, "griddata": grid_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), - "nodes": Dim(value="nlay * nrow * ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="model"), }, ) gwf = Model(name="gwf-nam", blocks=None) @@ -855,10 +856,10 @@ def test_array_shape_resolves_sibling_dims(): parent="gwf-nam", blocks={"dimensions": dis_block}, dims={ - "nlay": Dim(value="nlay", scope="model"), - "nrow": Dim(value="nrow", scope="model"), - "ncol": Dim(value="ncol", scope="model"), - "nodes": Dim(value="nlay * nrow * ncol", scope="model"), + "nlay": InputDim(value="nlay", scope="model"), + "nrow": InputDim(value="nrow", scope="model"), + "ncol": InputDim(value="ncol", scope="model"), + "nodes": InputDim(value="nlay * nrow * ncol", scope="model"), }, ) chd_arr = Array(name="head", dtype="double", shape=["nlay", "nodes"]) @@ -895,3 +896,21 @@ def test_rightmost_inline_string_array_empty_shape_valid(): pkg = Package(name="gwf-test", blocks={"options": block}) gwf = Model(name="gwf-nam", blocks=None) Dfns(components={"gwf-nam": gwf, "gwf-test": pkg}) + + +def test_input_dims_visible_to_model_component_itself(): + """A model component can see a model-scoped input dim declared by its own child package. + + A model's own `parent` names the simulation, not the model, so without + _can_share_model's req_name special case a model could never see a dim + its own DIS package declares. + """ + dis = Package( + name="gwf-dis", + parent="gwf-nam", + blocks=None, + dims={"nodesuser": InputDim(value="42", scope="model")}, + ) + gwf = Model(name="gwf-nam", parent="sim-nam", blocks=None) + spec = Dfns(components={"gwf-nam": gwf, "gwf-dis": dis}) + assert "nodesuser" in spec.input_dims("gwf-nam") diff --git a/docs/md/dfnspec.md b/docs/md/dfnspec.md index bf547ab4..73dbdfd2 100644 --- a/docs/md/dfnspec.md +++ b/docs/md/dfnspec.md @@ -116,7 +116,8 @@ Component definitions consist of a number of attributes: - `blocks`: block definitions - `parent`: parent component(s) - `schema_version`: DFN schema version -- `dims`: named dimensions (field-backed or derived) available for use in array shapes +- `dims`: named dimensions resolvable from input fields, available for use in array shapes +- `runtime_dims`: named dimensions whose value is only known once MODFLOW runs, available for use in memory variable shapes - `memory`: API-accessible runtime variable definitions Components may refer to, i.e. be constrained by, other components. Cross-component constraints include parent-child relations, model-solution compatibility restrictions, and primary/foreign keys. @@ -159,7 +160,11 @@ Parent relationships are defined bottom-up with attribute `parent`: #### `dims` -`{string: Dim} (default: {})`. Named dimensions available for use in array and list shape expressions. Each entry has a `value` expression and a `scope` that controls visibility to other components. See [Dimensions](#dimensions). +`{string: InputDim} (default: {})`. Named dimensions resolvable from input fields at DFN-parse time, available for use in input field and memory variable shape expressions. Each entry has a `value` expression and a `scope` that controls visibility to other components. See [Dimensions](#dimensions). + +#### `runtime_dims` + +`{string: RuntimeDim} (default: {})`. Named dimensions whose value is only established once MODFLOW runs, never derivable from input fields. Available only in memory variable shape expressions — a sequential parser must know an array's size before reading it, so these can never size an input field. See [Dimensions](#dimensions). #### `memory` @@ -237,13 +242,13 @@ Blocks are treated differently depending on the structural composition of their #### `fields` -`{string: Field} (default: {})`. The block's fields, in definition order. +`{string: InputField} (default: {})`. The block's fields, in definition order. #### `header` -`Field | null (default: null)`. A field whose token attaches directly to the block's `begin ` line instead of appearing as a body row, e.g. `BEGIN PERIOD `. Its presence means the block may appear multiple times, each occurrence labeled by the header field's value. The canonical repeating block is the period block, whose header is the stress period number `iper`. +`InputField | null (default: null)`. A field whose token attaches directly to the block's `begin ` line instead of appearing as a body row, e.g. `BEGIN PERIOD `. Its presence means the block may appear multiple times, each occurrence labeled by the header field's value. The canonical repeating block is the period block, whose header is the stress period number `iper`. -Unlike `fields`, which is a `{string: Field}` mapping keyed by field name, `header` holds a single `Field` directly since there is at most one per block. +Unlike `fields`, which is a `{string: InputField}` mapping keyed by field name, `header` holds a single `InputField` directly since there is at most one per block. A block has no explicit `optional` attribute. Its optionality is derived from its fields: a block is optional if and only if all of its fields are optional (vacuously true for an empty block). @@ -504,7 +509,11 @@ A **non-empty `shape`** (exactly one element) names a declared dimension that bo ### Dimensions -Dimensions may be declared by a component with a `dims` map. Each entry in `dims` has a `value` expression, a `scope`, and an optional `set_in`: +Dimensions come in two kinds, declared in two separate maps, because the same name can legitimately mean different things in each. `gwf-dis` declares an input dim `nodes` (the full grid cell count a modeler writes, sizing input arrays like `TOP`/`BOTM`/`IDOMAIN`) and *also* a runtime dim of the same name, `nodes` (the active-cell count after IDOMAIN exclusion, what memory variables like `X`/`IBOUND`/`K11` are actually shaped by) — matching MODFLOW 6's own `NODES`/`NODESUSER` memory-manager scalars. Splitting `dims`/`runtime_dims` into separate maps is what makes this safe: the end-user-facing side (`dims`, rendered into MF6IO template text a modeler reads) keeps the plain name `nodes`, while `nodesuser` is reserved for the memory-manager/API side (`runtime_dims`). + +#### `dims` (InputDim) + +Each entry has a `value` expression and a `scope`: ```yaml dims: @@ -520,15 +529,9 @@ dims: auxiliary: value: "len(auxiliary)" # backed by self-sizing array field 'auxiliary' scope: component - nbound: - set_in: rp # runtime-only: set each stress period - njas: - set_in: ar # runtime-only: set once at grid allocation ``` -Dimensions may be used in the `shape` expression of `list` and `array` fields. - -#### Dimension sources +`InputDim` entries may be used in the `shape` expression of `list` and `array` input fields, and in memory variable shapes. The `value` attribute defines the dimension source as a Python expression. Three forms are distinguished: @@ -536,12 +539,28 @@ The `value` attribute defines the dimension source as a Python expression. Three - **`len(name)`** — backed by a self-sizing array field of that name. The dimension equals the runtime length of the array. - **Arithmetic expression** `nlay * nrow * ncol` — derived from other dims. May not use bare field names; all operands must be declared dimensions. -If `value` is absent, the dimension is **runtime-only**: its value cannot be derived from DFN input fields. The optional `set_in` attribute then indicates when MODFLOW first establishes the value: +#### `runtime_dims` (RuntimeDim) -- **`"ar"`** — set once during Allocate and Read (grid allocation). The value is constant for the lifetime of the simulation. Examples: `njas` (number of cell-to-cell connections, computed from grid topology), `nodes` (total active cells, when inherited from a discretization package), `ncolbnd` (number of bound columns, fixed by package structure). -- **`"rp"`** — reset at the start of each stress period from user input. Examples: `nbound` (number of active boundary entries in the current period). +Each entry has a `set_in` (required): + +```yaml +runtime_dims: + nbound: + set_in: rp # runtime-only: reset each stress period + ncv: + set_in: ar # runtime-only: set once at grid allocation + nodes: + set_in: ar # runtime-only: the active-cell count, after IDOMAIN exclusion + nodesuser: + set_in: ar # runtime-only: the full grid cell count, restated under its memory-manager name +``` -Runtime dims are valid in memory variable shapes but not in input field shapes. +`RuntimeDim` entries may be used only in memory variable shapes, never in input field shapes — a sequential parser must know an array's size before reading it, so an input array may not be sized by a dim whose value is only known at runtime. + +`set_in` indicates when MODFLOW first establishes the value: + +- **`"ar"`** — set once during Allocate and Read (grid allocation). The value is constant for the lifetime of the simulation. Examples: `nodes` (active cell count, inherited from a discretization package), `ncv` (advanced package control volume count), `ncolbnd` (number of bound columns, fixed by package structure). +- **`"rp"`** — reset at the start of each stress period from user input. Examples: `nbound` (number of active boundary entries in the current period). Canonical examples of dimensions: @@ -563,15 +582,26 @@ dims: nodes: {value: "nlay * ncpl", scope: model} ncelldim: {value: "2", scope: model} - # gwf-disu: njas is expressible because nja is a user-supplied DFN field + # gwf-disu: NODES is a user-supplied DFN field carrying the full, + # pre-IDOMAIN-reduction cell count, so it's kept as the input dim nodes + # (matching what a modeler writes). njas is expressible because nja is + # also a user-supplied DFN field. + nodes: {value: nodes} njas: {value: "(nja - nodes) / 2"} # any package with an auxiliary array auxiliary: {value: "len(auxiliary)"} +runtime_dims: # stress package runtime dims nbound: {set_in: rp} # active BCs this period, not derivable from input - njas: {set_in: ar} # cell connections, set at grid allocation (DIS/DISV) + ncv: {set_in: ar} # advanced package control volume count, no InputDim counterpart + + # gwf-dis (and every other discretization package): a memory variable's + # "nodes" reference always means this RuntimeDim, never the same-named + # InputDim above. + nodes: {set_in: ar} + nodesuser: {set_in: ar} ``` An inline array may have its size determined by an integer subfield in the same record, or if the record it is within is the item type of a list, by a column in another list. diff --git a/modflow_devtools/dfns/__init__.py b/modflow_devtools/dfns/__init__.py index 2e25a223..46a64c94 100644 --- a/modflow_devtools/dfns/__init__.py +++ b/modflow_devtools/dfns/__init__.py @@ -12,11 +12,11 @@ Blocks, Component, Dfns, - Dim, Double, - Field, - FieldBase, File, + InputDim, + InputField, + InputFieldBase, Integer, Keyword, List, @@ -27,6 +27,7 @@ Model, Package, Record, + RuntimeDim, Scalar, Simulation, String, @@ -52,12 +53,12 @@ "Component", "DfnRegistry", "Dfns", - "Dim", "Double", - "Field", - "FieldBase", "FieldType", "File", + "InputDim", + "InputField", + "InputFieldBase", "Integer", "Keyword", "List", @@ -70,6 +71,7 @@ "Package", "Record", "RemoteDfnRegistry", + "RuntimeDim", "Scalar", "Simulation", "String", diff --git a/modflow_devtools/dfns/migrate_to_v2_0_0_dev2.py b/modflow_devtools/dfns/migrate_to_v2_0_0_dev2.py index e9b97287..fc1d336e 100644 --- a/modflow_devtools/dfns/migrate_to_v2_0_0_dev2.py +++ b/modflow_devtools/dfns/migrate_to_v2_0_0_dev2.py @@ -154,9 +154,15 @@ def _fn(bname, fname, field): def _build_explicit_dims( parent: "str | list[str] | None", blocks: dict[str, v2.Block], -) -> dict[str, v2.Dim]: - """Build the dims section from a component's dimensions block.""" - dims: dict[str, v2.Dim] = {} +) -> dict[str, v2.InputDim]: + """Build the dims section from a component's dimensions block. + + ``nodes`` here is always the user-facing, pre-reduction grid cell count + (what sizes K/TOP/BOTM/IDOMAIN); see dfnspec.md's "Dimensions" section + for how this coexists with the runtime ``nodes``/``nodesuser`` dims dev3 + injects for memory variables. + """ + dims: dict[str, v2.InputDim] = {} dim_block = blocks.get("dimensions") if not dim_block: return dims @@ -164,23 +170,23 @@ def _build_explicit_dims( scope = _scope_for(parent) for fname, field in dim_block.fields.items(): if isinstance(field, v2.Integer): - dims[fname] = v2.Dim(value=fname, scope=scope) + dims[fname] = v2.InputDim(value=fname, scope=scope) if scope == "model": has = set(dims.keys()) if {"nlay", "nrow", "ncol"} <= has: - dims["ncpl"] = v2.Dim(value="nrow * ncol", scope="model") - dims["nodes"] = v2.Dim(value="nlay * nrow * ncol", scope="model") - dims["ncelldim"] = v2.Dim(value="3", scope="model") + dims["ncpl"] = v2.InputDim(value="nrow * ncol", scope="model") + dims["nodes"] = v2.InputDim(value="nlay * nrow * ncol", scope="model") + dims["ncelldim"] = v2.InputDim(value="3", scope="model") elif {"nlay", "ncpl"} <= has: - dims["nodes"] = v2.Dim(value="nlay * ncpl", scope="model") - dims["ncelldim"] = v2.Dim(value="2", scope="model") + dims["nodes"] = v2.InputDim(value="nlay * ncpl", scope="model") + dims["ncelldim"] = v2.InputDim(value="2", scope="model") elif {"nrow", "ncol"} <= has: - dims["ncpl"] = v2.Dim(value="nrow * ncol", scope="model") - dims["nodes"] = v2.Dim(value="nrow * ncol", scope="model") - dims["ncelldim"] = v2.Dim(value="2", scope="model") + dims["ncpl"] = v2.InputDim(value="nrow * ncol", scope="model") + dims["nodes"] = v2.InputDim(value="nrow * ncol", scope="model") + dims["ncelldim"] = v2.InputDim(value="2", scope="model") elif "nodes" in has: - dims["ncelldim"] = v2.Dim(value="1", scope="model") + dims["ncelldim"] = v2.InputDim(value="1", scope="model") return dims @@ -208,7 +214,7 @@ def _sanitize_list_shapes( def _resolve_dimensions( blocks: dict[str, v2.Block], -) -> tuple[dict[str, v2.Block], dict[str, v2.Dim]]: +) -> tuple[dict[str, v2.Block], dict[str, v2.InputDim]]: """ Detect self-sizing arrays whose name is referenced in another array's shape expression — those define a component-scoped dimension. @@ -219,7 +225,7 @@ def _resolve_dimensions( self_sizing: set[str] = set() shape_refs: set[str] = set() - def _scan(fields: Mapping[str, v2.Field]) -> None: + def _scan(fields: Mapping[str, v2.InputField]) -> None: for name, field in fields.items(): if isinstance(field, v2.Array): if not field.shape: @@ -244,11 +250,13 @@ def _scan(fields: Mapping[str, v2.Field]) -> None: # array has shape (nodes) and never references 'auxiliary' by name in a shape. if "auxiliary" in self_sizing: array_dim_names.add("auxiliary") - array_dims = {n: v2.Dim(value=f"len({n})", scope="component") for n in sorted(array_dim_names)} + array_dims = { + n: v2.InputDim(value=f"len({n})", scope="component") for n in sorted(array_dim_names) + } return blocks, array_dims -def _collect_item_int_fields(fields: Mapping[str, v2.Field]) -> set[str]: +def _collect_item_int_fields(fields: Mapping[str, v2.InputField]) -> set[str]: """ Return the names of Integer fields declared directly on a block's list-item record(s) (or item union arms), one level deep. These are candidate row @@ -261,7 +269,7 @@ def _scan_record(record: v2.Record) -> None: if isinstance(field, v2.Integer): names.add(fname) - def _scan(fields: Mapping[str, v2.Field]) -> None: + def _scan(fields: Mapping[str, v2.InputField]) -> None: for field in fields.values(): if isinstance(field, v2.Record): _scan_record(field) @@ -303,7 +311,7 @@ def _resolve_relations(blocks: dict[str, v2.Block]) -> dict[str, v2.Block]: pk_set: set[tuple[str, str]] = set() fk_map: dict[tuple[str, str], str] = {} - def _scan_fields(block_name: str, fields: Mapping[str, v2.Field]) -> None: + def _scan_fields(block_name: str, fields: Mapping[str, v2.InputField]) -> None: def _scan_record(record: v2.Record) -> None: for field in record.fields.values(): @@ -345,7 +353,9 @@ def _scan_record(record: v2.Record) -> None: if not fk_map and not pk_set: return blocks - def _resolve_fields(block_name: str, fields: Mapping[str, v2.Field]) -> dict[str, v2.Field]: + def _resolve_fields( + block_name: str, fields: Mapping[str, v2.InputField] + ) -> dict[str, v2.InputField]: def _resolve_record(record: v2.Record) -> v2.Record: updates: dict = {} @@ -595,7 +605,7 @@ def _apply_array_fk_backfill(name: str, blocks: dict[str, v2.Block]) -> dict[str def _fill_period_list_shapes( blocks: dict[str, v2.Block], - explicit_dims: dict[str, v2.Dim], + explicit_dims: dict[str, v2.InputDim], ) -> dict[str, v2.Block]: """ For period blocks whose List field has no shape expression, infer the shape @@ -624,7 +634,7 @@ def _item_array_dims(field: v2.List) -> set[str]: def _fill_named_list_shapes( blocks: dict[str, v2.Block], - explicit_dims: dict[str, v2.Dim], + explicit_dims: dict[str, v2.InputDim], ) -> dict[str, v2.Block]: """ For non-period named list blocks (e.g. packagedata) whose List field has no @@ -752,7 +762,7 @@ def _infer_list_shape_dims( v1_fields: OMD, scope: "Literal['component', 'model', 'simulation']", existing_dims: set[str], -) -> "tuple[dict[str, v2.Block], dict[str, v2.Dim]]": +) -> "tuple[dict[str, v2.Block], dict[str, v2.InputDim]]": """ For shapeless List fields whose original v1 recarray had a complex shape expression, translate that expression to a derived dim and restore the shape. @@ -770,7 +780,7 @@ def _infer_list_shape_dims( if shape: v1_shapes[(f["block"], f["name"])] = shape - derived: dict[str, v2.Dim] = {} + derived: dict[str, v2.InputDim] = {} new_blocks = dict(blocks) for bname, block in blocks.items(): @@ -789,7 +799,7 @@ def _infer_list_shape_dims( # Avoid clobbering an existing dim with the same name. if dim_name in existing_dims or dim_name in derived: continue - derived[dim_name] = v2.Dim(value=v2_expr, scope=scope) + derived[dim_name] = v2.InputDim(value=v2_expr, scope=scope) new_fields[fname] = field.model_copy(update={"shape": [dim_name]}) changed = True if changed: @@ -1185,7 +1195,7 @@ def to_v2_0_0_dev2(name: str, fields: OMD, meta: list[str]) -> v2.Component: parent = infer_parent(name, fields) - def _map_field(f: v1.Field) -> v2.Field: + def _map_field(f: v1.Field) -> v2.InputField: _name: str = f["name"] _type: str | None = f.get("type") shape_str: str | None = f.get("shape") or None @@ -1479,7 +1489,7 @@ def _lookup(rname: str) -> dict | None: None, ) - rec_fields: dict[str, v2.Field] = {} + rec_fields: dict[str, v2.InputField] = {} for i, sname in enumerate(subnames): if i == mode_idx: continue # folded into the File field at the path's position diff --git a/modflow_devtools/dfns/migrate_to_v2_0_0_dev3.py b/modflow_devtools/dfns/migrate_to_v2_0_0_dev3.py index 20d02b3c..61e9c5f0 100644 --- a/modflow_devtools/dfns/migrate_to_v2_0_0_dev3.py +++ b/modflow_devtools/dfns/migrate_to_v2_0_0_dev3.py @@ -357,6 +357,220 @@ def _apt_common_memory( } +# --------------------------------------------------------------------------- +# Exchange package connection memory variables +# Model-pair exchanges built on DisConnExchange (GWF-GWF, GWT-GWT, GWE-GWE) +# allocate NODEM1/NODEM2/IHC/CL1/CL2/HWVA from the EXCHANGEDATA recarray +# (cellidm1/cellidm2/ihc/cl1/cl2/hwva DFN fields), plus NAUX/AUXNAME_CST/ +# AUXVAR for auxiliary columns. Confirmed from DisConnExchange.f90 +# (allocate_scalars/allocate_arrays). These are the fields silently +# truncated by modflowapi's tuple-presence heuristic (they were previously +# uncataloged here entirely, so modflowapi had no declared shape to fall +# back on). +# +# The SWF-family exchanges (CHF-GWF, OLF-GWF) extend SwfGwfExchangeType +# rather than DisConnExchangeType; they still register connection nodes as +# NODEM1/NODEM2 (the Fortran fields are named nodeswf/nodegwf, but +# mem_allocate registers them under NODEM1/NODEM2 for API consistency with +# the DisConnExchange family) but replace IHC/CL1/CL2/HWVA with +# BEDLEAK/CFACT and do not support auxiliary variables (confirmed from +# exg-swfgwf.f90; the AUXVAR-handling code there is commented out). +# --------------------------------------------------------------------------- + + +def _disconn_exg_memory() -> "dict[str, v2.MemoryScalar | v2.MemoryArray]": + """Connection memory for DisConnExchange-derived exchanges: gwfgwf/gwtgwt/gwegwe.""" + return { + "nodem1": _mem_var( + "integer", + ["nexg"], + set_in="ar", + source="cellidm1", + description="Reduced node number in model 1 for each exchange, derived from CELLIDM1.", + ), + "nodem2": _mem_var( + "integer", + ["nexg"], + set_in="ar", + source="cellidm2", + description="Reduced node number in model 2 for each exchange, derived from CELLIDM2.", + ), + "ihc": _mem_var( + "integer", + ["nexg"], + set_in="ar", + source="ihc", + description=( + "Connection type flag for each exchange: 0 vertical, 1 horizontal, " + "2 horizontal for a vertically staggered grid." + ), + ), + "cl1": _mem_var( + "double", + ["nexg"], + set_in="ar", + source="cl1", + description="Distance between the center of the model 1 cell and its shared face.", + ), + "cl2": _mem_var( + "double", + ["nexg"], + set_in="ar", + source="cl2", + description="Distance between the center of the model 2 cell and its shared face.", + ), + "hwva": _mem_var( + "double", + ["nexg"], + set_in="ar", + source="hwva", + description=( + "Horizontal width of the connection if IHC > 0, or the area " + "perpendicular to flow of the vertical connection if IHC = 0." + ), + ), + "naux": _mem_var( + "integer", [], set_in="ar", readonly=True, description="Number of auxiliary variables." + ), + "auxname_cst": _mem_var( + "string", + ["naux"], + set_in="ar", + readonly=True, + description="Names of auxiliary variables.", + ), + "auxvar": _mem_var( + "double", + ["naux", "nexg"], + set_in="ar", + source="aux", + description="Auxiliary variable values for each exchange.", + ), + } + + +def _swf_gwf_exg_memory() -> "dict[str, v2.MemoryScalar | v2.MemoryArray]": + """Connection memory for SwfGwfExchange-derived exchanges: chfgwf/olfgwf.""" + return { + "nodem1": _mem_var( + "integer", + ["nexg"], + set_in="ar", + source="cellidm1", + description=( + "Reduced node number in the surface water model for each exchange, " + "derived from CELLIDM1. Registered as NODEM1 in memory though the " + "Fortran field is named NODESWF." + ), + ), + "nodem2": _mem_var( + "integer", + ["nexg"], + set_in="ar", + source="cellidm2", + description=( + "Reduced node number in the GWF model for each exchange, derived " + "from CELLIDM2. Registered as NODEM2 in memory though the Fortran " + "field is named NODEGWF." + ), + ), + "bedleak": _mem_var( + "double", + ["nexg"], + set_in="ar", + source="bedleak", + description="Bed leakance for each exchange.", + ), + "cfact": _mem_var( + "double", + ["nexg"], + set_in="ar", + source="cfact", + description="Factor used in the conductance calculation for each exchange.", + ), + } + + +# --------------------------------------------------------------------------- +# Transport Mover (MVT/MVE) memory variables +# gwt-mvt and gwe-mve are both generic instantiations of the single +# TspMvtType (tsp-mvt.f90) — their v1 DFNs are identical apart from a +# longname string. print_input/print_flows/save_flows are parsed by hand +# in read_options() (not routed through the IDM found-struct, so the v1 DFN +# carries no mf6internal annotation) but still land in the inherited +# NumericalPackageType scalars IPRPAK/IPRFLOW/IPAKCB. MAXPACKAGES is +# computed internally (count of packages with an active mover) and has no +# DFN field counterpart. IBUDGETOUT/IBUDCSV (output file unit numbers) and +# PAKNAMES (bookkeeping array of provider/receiver package names) are +# omitted, consistent with no other package in this catalog exposing raw +# file units. +# --------------------------------------------------------------------------- + + +def _mvt_memory() -> "dict[str, v2.MemoryScalar | v2.MemoryArray]": + return { + "iprpak": _mem_var( + "integer", + [], + set_in="ar", + source="print_input", + description="Flag controlling whether mover input is echoed to the listing file.", + ), + "iprflow": _mem_var( + "integer", + [], + set_in="ar", + source="print_flows", + description=( + "Flag controlling whether mover flow rates are printed to the listing file." + ), + ), + "ipakcb": _mem_var( + "integer", + [], + set_in="ar", + source="save_flows", + description="Flag controlling whether mover flows are written to the budget file.", + ), + "maxpackages": _mem_var( + "integer", + [], + set_in="ar", + readonly=True, + description=( + "Number of packages participating in the mover. " + "Computed from the packages that supply or receive moved water." + ), + ), + } + + +def _dis_node_maps() -> "dict[str, v2.MemoryScalar | v2.MemoryArray]": + """NODEUSER/NODEREDUCED, common to every discretization package.""" + return { + "nodeuser": _mem_var( + "integer", + ["nodes"], + set_in="ar", + readonly=True, + description=( + "Maps each packed (active-cell) node position to its full-grid " + "user node number. Index map for the runtime 'nodes' dimension." + ), + ), + "nodereduced": _mem_var( + "integer", + ["nodesuser"], + set_in="ar", + readonly=True, + description=( + "Maps each full-grid user node number to its packed (active-cell) " + "node position, or a nonpositive sentinel if the cell is inactive." + ), + ), + } + + # --------------------------------------------------------------------------- # Package-specific extra memory variables # For derived or renamed variables not covered by mf6internal or same-name @@ -364,6 +578,15 @@ def _apt_common_memory( # --------------------------------------------------------------------------- _EXTRA_MEMORY: dict[str, dict[str, "v2.MemoryScalar | v2.MemoryArray"]] = { + # Exchange connection data (see banner above). + "gwfgwf": _disconn_exg_memory(), + "gwtgwt": _disconn_exg_memory(), + "gwegwe": _disconn_exg_memory(), + "chfgwf": _swf_gwf_exg_memory(), + "olfgwf": _swf_gwf_exg_memory(), + # Transport mover (see banner above). + "mvt": _mvt_memory(), + "mve": _mvt_memory(), # NPF: k is loaded as K11; condsat and sat are derived/computed. "npf": { "k11": _mem_var( @@ -399,6 +622,10 @@ def _apt_common_memory( ), }, # DIS/DISV/DISU: area is computed from grid geometry, not a DFN field. + # + # NODEUSER/NODEREDUCED (see _dis_node_maps): confirmed from mem_allocate + # calls in Dis.f90, Dis2d.f90, Disv.f90, Disv1d.f90, Disv2d.f90, and + # Disu.f90 — every discretization package allocates both, uniformly. "dis": { "area": _mem_var( "double", @@ -407,6 +634,7 @@ def _apt_common_memory( readonly=True, description="Horizontal cell area, computed from grid geometry.", ), + **_dis_node_maps(), }, "disv": { "area": _mem_var( @@ -416,16 +644,21 @@ def _apt_common_memory( readonly=True, description="Horizontal cell area, computed from grid geometry.", ), + **_dis_node_maps(), }, "disu": { "area": _mem_var( "double", - ["nodes"], + ["nodesuser"], set_in="ar", readonly=True, description="Horizontal cell area, computed from grid geometry.", ), + **_dis_node_maps(), }, + "dis2d": _dis_node_maps(), + "disv1d": _dis_node_maps(), + "disv2d": _dis_node_maps(), # SFR: packagedata field names differ from Fortran memory variable names. "sfr": { "length": _mem_var( @@ -1202,32 +1435,40 @@ def to_v2_0_0_dev3(name: str, fields: OMD, meta: list[str]) -> v2.Component: memory[var_name] = mv.model_copy(update={"source": None}) # Step 6: inject dims for any shape elements used by memory variables that - # are not already declared in the component's dims section. Shape elements - # that resolve to existing dims or can be derived from fields are left alone; - # everything else is injected as a runtime dim (value=None, set_in=). - # Special cases: - # naux → derived from len(auxiliary) when that field exists - # njas (disu) → expressible as (nja - nodes) / 2 since nja is a DFN field + # are not already declared in the component's dims/runtime_dims sections. + # Shape elements that resolve to an existing dim (input or runtime) are + # left alone; everything else is injected as a RuntimeDim. Special cases: + # naux → derived from len(auxiliary) when that field exists (InputDim) + # njas (disu) → expressible as (nja - nodes) / 2, both DFN fields (InputDim) # nbound → set_in "rp" (reset each stress period from period input) # all others → set_in "ar" (established at grid allocation, then constant) - existing_dims = dict(component.dims or {}) - if pkg_short == "disu" and "nja" in existing_dims and "nodes" in existing_dims: - existing_dims.setdefault("njas", v2.Dim(value="(nja - nodes) / 2")) + existing_input_dims = dict(component.dims or {}) + existing_runtime_dims = dict(component.runtime_dims or {}) + if pkg_short == "disu" and "nja" in existing_input_dims and "nodes" in existing_input_dims: + existing_input_dims.setdefault("njas", v2.InputDim(value="(nja - nodes) / 2")) if memory: all_field_names = set(component.get_fields(recurse=True).keys()) mem_shape_dims = {elem for mv in memory.values() for elem in getattr(mv, "shape", [])} - for dim_name in sorted(mem_shape_dims - set(existing_dims.keys())): + # "nodes" deliberately names both an InputDim (the full, pre-reduction grid + # count that sizes input arrays) and a RuntimeDim (the post-IDOMAIN-reduction + # active-cell count that sizes memory variables like NODEUSER) on the + # discretization packages themselves — see _build_explicit_dims. A memory + # variable's own "nodes" shape reference always means the RuntimeDim sense, + # so it must not be treated as already satisfied by the same-named InputDim. + known = (set(existing_input_dims) - {"nodes"}) | set(existing_runtime_dims) + for dim_name in sorted(mem_shape_dims - known): if dim_name == "naux" and "auxiliary" in all_field_names: - existing_dims[dim_name] = v2.Dim(value="len(auxiliary)") + existing_input_dims[dim_name] = v2.InputDim(value="len(auxiliary)") elif dim_name == "nbound": - existing_dims[dim_name] = v2.Dim(value=None, set_in="rp") + existing_runtime_dims[dim_name] = v2.RuntimeDim(set_in="rp") else: - existing_dims[dim_name] = v2.Dim(value=None, set_in="ar") + existing_runtime_dims[dim_name] = v2.RuntimeDim(set_in="ar") return component.model_copy( update={ "schema_version": "2.0.0.dev3", "memory": memory or None, - "dims": existing_dims or None, + "dims": existing_input_dims or None, + "runtime_dims": existing_runtime_dims or None, } ) diff --git a/modflow_devtools/dfns/schema.py b/modflow_devtools/dfns/schema.py index b37c2bf2..4c3b0880 100644 --- a/modflow_devtools/dfns/schema.py +++ b/modflow_devtools/dfns/schema.py @@ -1,6 +1,6 @@ import ast import re -from collections.abc import Mapping +from collections.abc import Callable, Mapping from os import PathLike from pathlib import Path from typing import Annotated, Any, Literal, cast @@ -20,7 +20,7 @@ CURRENT_SCHEMA_VERSION = "2.0.0.dev3" -class FieldBase(BaseModel): +class InputFieldBase(BaseModel): name: str longname: str | None = None description: str | None = None @@ -72,14 +72,14 @@ def render(self, *, inline: bool = False) -> str: every other field type renders identically either way. ``List`` has no inline form and raises if called with ``inline=True``. """ - return _render_field(cast("Field", self), inline=inline) + return _render_field(cast("InputField", self), inline=inline) -class Keyword(FieldBase): +class Keyword(InputFieldBase): type: Literal["keyword"] = PydanticField(default="keyword", frozen=True) -class String(FieldBase): +class String(InputFieldBase): type: Literal["string"] = PydanticField(default="string", frozen=True) valid: list[str] | None = None case_sensitive: bool = False @@ -89,7 +89,7 @@ class String(FieldBase): fk_ref: str | None = None -class Integer(FieldBase): +class Integer(InputFieldBase): type: Literal["integer"] = PydanticField(default="integer", frozen=True) valid: list[int] | None = None time_series: bool = False @@ -100,12 +100,12 @@ class Integer(FieldBase): node: bool = False -class Double(FieldBase): +class Double(InputFieldBase): type: Literal["double"] = PydanticField(default="double", frozen=True) time_series: bool = False -class File(FieldBase): +class File(InputFieldBase): type: Literal["file"] = PydanticField(default="file", frozen=True) direction: Literal["in", "out"] @@ -116,7 +116,7 @@ class File(FieldBase): ] -class Array(FieldBase): +class Array(InputFieldBase): type: Literal["array"] = PydanticField(default="array", frozen=True) dtype: Literal["keyword", "integer", "double", "string"] shape: list[str] = [] @@ -138,25 +138,25 @@ def _check_index_dtype(self) -> "Array": return self -class Record(FieldBase): +class Record(InputFieldBase): type: Literal["record"] = PydanticField(default="record", frozen=True) fields: "dict[str, Scalar | Array | Record | Union]" = PydanticField(default_factory=dict) @property - def children(self) -> "dict[str, Field]": + def children(self) -> "dict[str, InputField]": return self.fields # type: ignore[return-value] -class Union(FieldBase): +class Union(InputFieldBase): type: Literal["union"] = PydanticField(default="union", frozen=True) arms: "dict[str, Scalar | Array | Record]" = PydanticField(default_factory=dict) @property - def children(self) -> "dict[str, Field]": + def children(self) -> "dict[str, InputField]": return self.arms # type: ignore[return-value] -class List(FieldBase): +class List(InputFieldBase): type: Literal["list"] = PydanticField(default="list", frozen=True) tagged: Literal[False] = PydanticField(default=False, frozen=True) item: "Record | Union" @@ -181,11 +181,12 @@ def _check_shape_length(self) -> "List": return self @property - def children(self) -> "dict[str, Field]": + def children(self) -> "dict[str, InputField]": + # item.name duplicates the List's own name, so it's not a useful key here. return self.item.children -Field = Annotated[ +InputField = Annotated[ Keyword | String | Integer | Double | File | Array | Record | Union | List, PydanticField(discriminator="type"), ] @@ -197,7 +198,7 @@ def children(self) -> "dict[str, Field]": def _collect_fields( - fields: "dict[str, Field]", items: "list[tuple[str, Field]]", *, recurse: bool + fields: "dict[str, InputField]", items: "list[tuple[str, InputField]]", *, recurse: bool ) -> None: for name, field in fields.items(): items.append((name, field)) @@ -216,7 +217,8 @@ def _render_file(field: "File") -> str: return f"{field.name.upper()} {keyword} <{field.name}>" -def _tag(field: "Field", inner: str) -> str: +def _tag(field: "InputField", inner: str) -> str: + """Prefix `inner` with the field's uppercased name if it's tagged.""" return f"{field.name.upper()} {inner}" if field.tagged else inner @@ -236,7 +238,15 @@ def _render_rows(item: "Record | Union") -> list[str]: return [f"<{item.name}>"] -def _render_field(field: "Field", *, inline: bool = False) -> str: +def _render_field(field: "InputField", *, inline: bool = False) -> str: + """Render a field's own text, relative to its own first line (no block indent). + + Backs ``InputFieldBase.render()`` — see that docstring for the ``inline`` + semantics. Kept as a free function (rather than inlined per-subclass) + so ``Record``/``Union``/``List`` can recurse over arbitrary child field + types via a single ``match``. + """ + def _wrap(token: str) -> str: return f"[{token}]" if field.optional else token @@ -285,11 +295,19 @@ def _wrap(token: str) -> str: return f"{rows[0]}\n{rows[0]}\n..." -def _should_render(field: "Field", *, developmode: bool) -> bool: - # always omit removed/deprecated fields +def _should_render(field: "InputField", *, developmode: bool) -> bool: + """Whether a field belongs in render() output. + + Removed/deprecated fields are never current syntax, so they're always + excluded (MF6 no longer parses a removed field at all, and a deprecated one + is discouraged even where still accepted) — there's no flag to see them in + render() output, matching mf6io.pdf. Fields flagged `InputField.developmode` + (which subsumes v1's `dev_`-name convention; see `_map_field` in the + migration) are internal/undocumented and excluded by default, but callers + doing internal tooling can opt in via the `developmode` parameter. + """ if field.removed is not None or field.deprecated is not None: return False - # optionally omit developmode fields return developmode or not field.developmode @@ -388,26 +406,35 @@ def _validate_len_call(call: ast.Call, component: "ComponentBase", expr: str) -> _Hook = Literal["ar", "mc", "rp", "ad", "fc", "ca", "cq"] -class Dim(BaseModel): - """A named dimension backed by a field reference or derived from an expression. +class InputDim(BaseModel): + """A named dimension resolvable from input fields at DFN-parse time. ``value`` specifies the dimension size, directly or indirectly, and can be: - ``nlay``: an integer field - ``len(auxiliary)``: the runtime length of a self-sizing array field - ``nlay * ncol``: the result of an arithmetic expression, e.g. of other dims - If ``value`` is None, the dimension is runtime-only: its value cannot be - derived from DFN input fields. ``set_in`` then indicates the simulation hook - in which the value is first set by MODFLOW (e.g. ``"ar"`` for dims that are - set during grid allocation, ``"rp"`` for dims reset each stress period). + Valid in both input field shapes and memory variable shapes. + """ + + value: str + scope: Literal["component", "model", "simulation"] = "component" + + +class RuntimeDim(BaseModel): + """A named dimension whose value is established by MODFLOW at runtime and + cannot be derived from DFN input fields. + + ``set_in`` indicates the simulation hook in which the value is first + established (e.g. ``"ar"`` for dims set during grid allocation, ``"rp"`` + for dims reset each stress period). - Runtime dims may appear in memory variable shape expressions but not in input - field shapes expressions. + Valid only in memory variable shapes, never in input field shapes, since + a sequential parser must know an array's size before reading it. """ - value: str | None = None + set_in: _Hook scope: Literal["component", "model", "simulation"] = "component" - set_in: _Hook | None = None def _parents_as_set(parent: "str | list[str] | None") -> set[str]: @@ -419,12 +446,32 @@ def _parents_as_set(parent: "str | list[str] | None") -> set[str]: def _receives_from( requester_parent: "str | list[str] | None", provider_parent: "str | list[str] | None", + requester_name: str | None = None, ) -> bool: + """ + Return True if the requesting component (requester_parent) can be in the + same model as the providing component (provider_parent). + + The provider's parent identifies which model it belongs to (a concrete + ``-nam`` name, e.g. ``"gwf-nam"``). The requester's parent + determines whether it can be in that model: an explicit match, or a generic + type like ``"model"`` or ``"package"`` meaning any model. + + ``requester_name``, if given, additionally makes a model component itself + (e.g. ``"gwf-nam"``) able to receive from its own child packages: a + model's own ``parent`` names the simulation, not the model, so without + this a model could never see a dim its own DIS package declares (e.g. + the discretization package's ``nodesuser``, referenced by the model's + own runtime ``nodes`` dim). + """ provider_parents = _parents_as_set(provider_parent) model_contexts = {p for p in provider_parents if p.endswith("-nam") and p != "sim-nam"} if not model_contexts: return False + if requester_name is not None and requester_name in model_contexts: + return True + requester_parents = _parents_as_set(requester_parent) for rp in requester_parents: if rp in ("model", "package", "*"): @@ -447,9 +494,6 @@ def _resolve_derived_dims(component: "ComponentBase", known_dims: set[str]) -> l deps: dict[str, set[str]] = {} for name, dim_def in all_dims.items(): - if dim_def.value is None: - deps[name] = set() - continue value = dim_def.value try: tree = ast.parse(value, mode="eval") @@ -509,8 +553,8 @@ def _resolve_derived_dims(component: "ComponentBase", known_dims: set[str]) -> l class Block(BaseModel): name: str - fields: dict[str, Field] - header: "Field | None" = None + fields: dict[str, InputField] + header: "InputField | None" = None @model_validator(mode="after") def _check_field_order(self) -> "Block": @@ -534,7 +578,7 @@ def _serialize(self, handler: Any) -> dict[str, Any]: data = handler(self) data.pop("name", None) # name is the dict key in ComponentBase.blocks # Unlike `fields`, `header` isn't stored in a name-keyed dict, so its - # `name` (stripped by FieldBase._serialize under strip_names) must be + # `name` (stripped by InputFieldBase._serialize under strip_names) must be # restored here or it can't be recovered on load. if self.header is not None and isinstance(data.get("header"), dict): data["header"] = {"name": self.header.name, **data["header"]} @@ -564,7 +608,7 @@ def render(self, *, developmode: bool = False) -> str: def get_fields(self, recurse: bool = False) -> OMD: """Fields keyed by name, including `header`; `recurse` descends into children.""" - items: list[tuple[str, Field]] = [] + items: list[tuple[str, InputField]] = [] _collect_fields(self.fields, items, recurse=recurse) if self.header is not None: _collect_fields({self.header.name: self.header}, items, recurse=recurse) @@ -622,7 +666,8 @@ class ComponentBase(BaseModel): schema_version: str | None = None name: str parent: str | list[str] | None = None - dims: dict[str, Dim] | None = None + dims: dict[str, InputDim] | None = None + runtime_dims: dict[str, RuntimeDim] | None = None blocks: dict[str, Block] | None = None memory: dict[str, MemoryVariable] | None = None @@ -634,7 +679,7 @@ def _serialize(self, handler: Any) -> dict[str, Any]: return data def get_fields(self, recurse: bool = False) -> OMD: - items: list[tuple[str, Field]] = [] + items: list[tuple[str, InputField]] = [] for block in (self.blocks or {}).values(): items.extend(block.get_fields(recurse=recurse).items(multi=True)) return OMD(items) @@ -1186,84 +1231,68 @@ def children(self, name: str) -> "dict[str, Component]": return {n: c for n, c in self.components.items() if c.parent == name} def local_dims(self, component_name: str) -> set[str]: - """All dim names declared in this component's dims section, including runtime dims.""" - return set((self.components[component_name].dims or {}).keys()) - - def runtime_dims(self, component_name: str) -> set[str]: - """Runtime-only dim names declared locally (value=None).""" - return { - name - for name, dim in (self.components[component_name].dims or {}).items() - if dim.value is None - } - - def inherited_dims(self, component_name: str) -> set[str]: - """ - Dim names visible to ``component_name`` from other components. - - - ``"simulation"`` scope: always visible. - - ``"model"`` scope: visible when the requesting component can share a - model with the dim-defining component, determined purely from parent - attributes (no hardcoded model-type strings). - - ``"component"`` scope: visible when the dim-defining component is - explicitly listed as a parent of the requesting component (subpackage). - """ + """All dim names declared in this component, both input and runtime.""" + component = self.components[component_name] + return set((component.dims or {}).keys()) | set((component.runtime_dims or {}).keys()) + + def local_runtime_dims(self, component_name: str) -> set[str]: + """Runtime dim names declared locally.""" + return set((self.components[component_name].runtime_dims or {}).keys()) + + def _inherited_dim_names( + self, + component_name: str, + dicts: "Callable[[Component], dict[str, InputDim] | dict[str, RuntimeDim] | None]", + ) -> set[str]: + """Names from ``dicts(c)`` on every other component, filtered by scope visibility.""" inherited: set[str] = set() component = self.components[component_name] req_parent = component.parent for cname, c in self.components.items(): if cname == component_name: continue - for dim_name, dim in (c.dims or {}).items(): + for dim_name, dim in (dicts(c) or {}).items(): match dim.scope: case "simulation": inherited.add(dim_name) case "model": - if _receives_from(req_parent, c.parent): + if _receives_from(req_parent, c.parent, requester_name=component_name): inherited.add(dim_name) case "component": if cname in _parents_as_set(req_parent): inherited.add(dim_name) return inherited + def inherited_dims(self, component_name: str) -> set[str]: + """ + Dim names (input and runtime) visible to ``component_name`` from other components. + + - ``"simulation"`` scope: always visible. + - ``"model"`` scope: visible when the requesting component can share a + model with the dim-defining component, determined purely from parent + attributes (no hardcoded model-type strings). + - ``"component"`` scope: visible when the dim-defining component is + explicitly listed as a parent of the requesting component (subpackage). + """ + return self._inherited_dim_names( + component_name, lambda c: c.dims + ) | self._inherited_dim_names(component_name, lambda c: c.runtime_dims) + def input_dims(self, component_name: str) -> set[str]: """ - Non-runtime dim names visible to ``component_name``, valid in input field shapes. + Input dim names visible to ``component_name``, valid in input field shapes. - Excludes runtime dims (value=None): a sequential parser must know an - array's size before reading it, so input arrays may not be sized by a - dim whose value is only known at runtime. + Excludes runtime dims: a sequential parser must know an array's size + before reading it, so input arrays may not be sized by a dim whose + value is only known at runtime. """ - local = { - name - for name, dim in (self.components[component_name].dims or {}).items() - if dim.value is not None - } - inherited: set[str] = set() - component = self.components[component_name] - req_parent = component.parent - for cname, c in self.components.items(): - if cname == component_name: - continue - for dim_name, dim in (c.dims or {}).items(): - if dim.value is None: - continue - match dim.scope: - case "simulation": - inherited.add(dim_name) - case "model": - if _receives_from(req_parent, c.parent): - inherited.add(dim_name) - case "component": - if cname in _parents_as_set(req_parent): - inherited.add(dim_name) - return local | inherited + local = set((self.components[component_name].dims or {}).keys()) + return local | self._inherited_dim_names(component_name, lambda c: c.dims) def dims(self, component_name: str) -> set[str]: """ - All dim names visible to ``component_name`` for shape resolution, - including runtime dims (value=None). Used for memory variable shape - validation. + All dim names (input and runtime) visible to ``component_name`` for + shape resolution. Used for memory variable shape validation. """ return self.local_dims(component_name) | self.inherited_dims(component_name)