diff --git a/Readme.md b/Readme.md index 5c46ac35..e06f0e21 100644 --- a/Readme.md +++ b/Readme.md @@ -4,7 +4,7 @@ Modflow-setup Modflow-setup is a Python package for automating the setup of MODFLOW groundwater models from grid-independent source data including shapefiles, rasters, and other MODFLOW models that are geo-located. Input data and model construction options are summarized in a single configuration file. Source data are read from their native formats and mapped to a regular finite difference grid specified in the configuration file. An external array-based [Flopy](https://github.com/modflowpy/flopy) model instance with the desired packages is created from the sampled source data and configuration settings. MODFLOW input can then be written from the flopy model instance. -### Version 0.5 +### Version 0.6 ![Tests](https://github.com/doi-usgs/modflow-setup/workflows/Tests/badge.svg) [![codecov](https://codecov.io/gh/doi-usgs/modflow-setup/branch/develop/graph/badge.svg?token=aWN47DYeIv)](https://codecov.io/gh/doi-usgs/modflow-setup) [![PyPI version](https://badge.fury.io/py/modflow-setup.svg)](https://badge.fury.io/py/modflow-setup) diff --git a/docs/source/release-history.rst b/docs/source/release-history.rst index 139c8655..d3139d42 100644 --- a/docs/source/release-history.rst +++ b/docs/source/release-history.rst @@ -2,6 +2,17 @@ Release History =============== +Version 0.6.0 (2025-01-06) +---------------------------------------- + +* Add support for local grid refinement (LGR) in a subset of the parent model layers. + * Replace parent_start/end layer configuration input with "vertical_refinement" in each parent layer (int, list or dict), which gets translated to ncppl input to the Flopy Lgr utility. + * Child model bottom and parent model top are exactly aligned with no overlap or gaps in numerical grid. + * On setup of the LGR grid, the parent model cell tops/bottoms are collapsed to zero thickness within the child model area(s). + * Recharge, SFR and non-Well basic stress boundary conditions are only applied to the Child model (assuming that these represent surface or near-surface features that should only be represented in the child model). + * Wells with > 50% of their open interval intersecting the child model domain get assigned to the child model. + * Wells with > 50% of their open interval intersecting the parent model get assigned to the parent model. + Version 0.5.0 (2024-03-08) ---------------------------------------- * Improvements to rotated grid generation diff --git a/mfsetup/mover.py b/mfsetup/mover.py index bb61182a..2309b2f9 100644 --- a/mfsetup/mover.py +++ b/mfsetup/mover.py @@ -164,18 +164,20 @@ def neighbors(i, j): for parent_reach, inset_reach in parent_to_inset.items(): if parent_reach in inset_to_parent.values(): parent_to_inset_distance = parent_to_inset_distances[parent_reach] - inset_to_parent_distance = inset_to_parent_distances[inset_reach] - if inset_to_parent_distance < parent_to_inset_distance: - delete_parent_to_inset_items.add(parent_reach) - elif parent_to_inset_distance < inset_to_parent_distance: - del inset_to_parent[inset_reach] - else: - raise ValueError("Circular connection between SFR Packages in the Mover Package input.\n" - f"Connection distance between the end of parent reach {parent_reach} " - f"in parent model and start of inset reach {inset_reach} in inset model " - f"is equal to\nthe distance between the end of inset reach {inset_reach} " - f"and start of parent reach {parent_reach}.\nCheck input linework." - ) + if inset_to_parent_distances.get(inset_reach) is not None: + inset_to_parent_distance = inset_to_parent_distances[inset_reach] + if inset_to_parent_distance < parent_to_inset_distance: + delete_parent_to_inset_items.add(parent_reach) + elif parent_to_inset_distance < inset_to_parent_distance: + del inset_to_parent[inset_reach] + else: + raise ValueError( + "Circular connection between SFR Packages in the Mover Package input.\n" + f"Connection distance between the end of parent reach {parent_reach} " + f"in parent model and start of inset reach {inset_reach} in inset model " + f"is equal to\nthe distance between the end of inset reach {inset_reach} " + f"and start of parent reach {parent_reach}.\nCheck input linework." + ) for parent_reach in delete_parent_to_inset_items: del parent_to_inset[parent_reach] return parent_to_inset, inset_to_parent