Skip to content

feat(input): full grid TAS and loader integration - #3172

Draft
mjreno wants to merge 8 commits into
MODFLOW-ORG:developfrom
mjreno:full_grid_tas
Draft

mjreno wants to merge 8 commits into
MODFLOW-ORG:developfrom
mjreno:full_grid_tas

Conversation

@mjreno

@mjreno mjreno commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Full-grid time-array series for grid array input

Adds time-array series (TAS) support for grid array (READARRAYGRID) period input, and integrates the IDM grid array loader with it. Branched from #3159 (TVK/TVS write stamps).

Grid array loader. The loader has two modes. The package dfn fixes the mode, not the user:

  • Compressed: the dfn defines MAXBOUND (optional or required), e.g. CHDG, WELG, DRNG, RIVG, GHBG. The PERIOD block defines boundary cells, and the package reads them as a list (NODEULIST, NBOUND).
  • Full grid: the dfn doesn't define MAXBOUND. The PERIOD block changes values on a fixed grid, and the package reads arrays by user node.

The loader is a shared base type with one type per mode.

Persistence rules, compressed:

  • Boundary cells are the active cells where every main array given in the block is defined. A block with only aux arrays keeps the boundary cells.
  • An array not given in the block carries forward per cell. A new boundary cell is then an input error.
  • An aux array given in the block must be defined at every boundary cell.
  • An empty block removes all boundaries and series links.

Persistence rules, full grid:

  • A defined value at an active cell replaces the stored value. DNODATA and inactive cells leave it unchanged.
  • An array not given, or an empty block, changes nothing. Values persist per cell until changed.

Time-array series:

  • Both modes: TAS arrays cover the full grid, and a linked array updates each time step until it's given again.
    • Compressed: a linked main array's series array at the period start sets the boundary cells, with the other main arrays, and a series DNODATA value at a boundary cell is an error.
    • Full grid: a series DNODATA value leaves the cell unchanged.
  • No full-grid option in utl-tas.dfn: the consuming package decides the array shape. READARRAYGRID packages always read full-grid arrays, and the mode follows the package dfn, so it isn't a user choice.
  • DNODATA isn't scaled: neither FACTOR nor SFAC scales it.
  • Rounding: series records are matched to period and time-step times with a tolerance (shared TAS code; RCHA/EVTA/SPCA results unchanged).
  • Write stamps: full-grid values are stamped as given in a block or written by a series (fix(tvk,tvs): stop re-applying earlier input at later periods and time steps #3159), so packages apply values only when they're written.

TVKG:

  • a full-grid utility for time-varying K, used locally to develop and test full-grid mode; K22/K33 ratios can't be read from NetCDF. Currently included in this PR, but it may be removed before merging if no use cases are apparent.

Also:

  • NetCDF export of full-grid input writes the stored values each period; grid arrays linked to a series are written as fill.
  • SWI TVG package integration and testing tbd locally.

Checklist of items for pull request

  • Replaced section above with description of pull request
  • Added new test or modified an existing test
  • Ran ruff on new and modified python scripts in .doc, autotests, doc, distribution, pymake, and utils subdirectories.
  • Formatted new and modified Fortran source files with fprettify
  • Added doxygen comments to new and modified procedures
  • Updated meson files, makefiles, and Visual Studio project files for new source files
  • Updated definition files
  • Added a release note to doc/ReleaseNotes/items/ with a plain-language description of the bug fix, change, or feature; required for changes that may affect users
  • Updated input and output guide
  • Removed checklist items not relevant to this pull request

For additional information see instructions for contributing and instructions for developing.

@mjreno
mjreno marked this pull request as draft November 16, 2026 13:08
@mjreno mjreno added this to the 6.9.0 milestone Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant