Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat vertical lgr #84

Merged
merged 5 commits into from
Aug 6, 2024
Merged

Feat vertical lgr #84

merged 5 commits into from
Aug 6, 2024

Conversation

aleaf
Copy link
Collaborator

@aleaf aleaf commented Aug 6, 2024

Support for LGR inset/child models that are nested in a subset of the parent model layers.

aleaf added 5 commits July 25, 2024 14:03
…on-well BCs within LGR areas. (assumes that CHD, DRN, GHB, and RIV cells all represent surface or near-surface features that should be represented in the LGR child model(s) and not the parent model).
…tually returning the next layer above because of incorrect sorting. Include the model top when filling missing layers, in case there are all nans in the botm array; introducing nans into the top can cause issues with partical vertical LGR.

feat(with partical vertical LGR:make_lgr_idomain): refactor vertical refinement input to use nccpl (list of LGR child layers in each parent layer), to allow for setup of LGR idomain with partial vertical refinement.
…botm to wells: dictionary input option to facilitate easier testing. LGR parent models, remove wells with >50% of their open interval within the LGR child area; LGR child models, remove wells with <50% of their open interval within the LGR child area. This ensures that pumping wells aren't included twice in a partial vertical LGR case (due to the automated well rellocation routines). Add any dropped wells to dropped_wells_file.
…subset of parent 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
* add some additional checks/error traps for invalid refinement input
* ensure that child model bottom and parent model top are aligned (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) (parent model top is also set to child model bottom(s) in the child model area(s)); because of this, some additional logic is needed to disable the "original model top" functionality that is used in the context of the lake package to ensure that supplied bathymetry is always subtracted from the original top (the land surface) in the context of repeated model setups. A better fix would be to ensure that this functionality is only active when the Lake Package is being built.
* prevent recharge, SFR and non-Well basic stress boundary conditions from being populated in any parts of the parent model below a child model (assuming that these represent surface or near-surface features that should be represented only in the child model)
* wells with > 50% of their open interval within the child model domain get assigned to the child model
* wells with > 50% of their open interval in the parent model get assigned to the parent model
* added some additional functionality to allow the child model bottom to coincide with a sub-divided parent model bottom (between two supplied raster surfaces)
* added some additional testing for LGR grid setup and boundary condition handling for models with partial vertical LGR.
@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 95.68106% with 13 lines in your changes missing coverage. Please review.

Project coverage is 89.40%. Comparing base (45683b6) to head (0ed7ef6).

Files Patch % Lines
mfsetup/sourcedata.py 86.66% 6 Missing ⚠️
mfsetup/tests/test_lgr.py 97.72% 3 Missing ⚠️
mfsetup/mf6model.py 96.42% 2 Missing ⚠️
mfsetup/obs.py 91.66% 1 Missing ⚠️
mfsetup/wells.py 97.36% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #84      +/-   ##
===========================================
+ Coverage    89.26%   89.40%   +0.13%     
===========================================
  Files           63       64       +1     
  Lines        12553    12818     +265     
===========================================
+ Hits         11206    11460     +254     
- Misses        1347     1358      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aleaf aleaf merged commit c303cf1 into DOI-USGS:develop Aug 6, 2024
8 checks passed
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.

2 participants