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: improve rotated inset support #79

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

aleaf
Copy link
Collaborator

@aleaf aleaf commented Mar 8, 2024

  • add support for generating grids with a specified rotation around features of interest
  • add support for rotated LGR models (LGR parent and inset with same rotation)
  • generalize logic of snapping inset grids to parent grids to ensure that the inset grid is symmetrical about nearfield features of interest when it is created from those (using a buffer; instead of by specifying offset and nrow, ncol)
  • other clean-up refactoring and improvements to testing

* load at least the dis, tdis and sto package (MF6 models only) in initial setup of parent model, to ensure that the modeltime.steady_state values are accurate
* handle different MF6/'old' Flopy behavior with dis.nlay
* kruft removal
feat(mf6model.py): allow specification of LGR inset configuration directly (as additional YAML or a dictionary in-memory) for easier testing
fix(mf6model.py):
* handle Flopy issue with .modeltime attribute displaying True for each period in steady_state dict with an entry
* fix error in stress period data setup when loading time dis information from parent model (when it isn't specified in inset model config); by removing perlen=1 from defaults
…patial reference against DIS package; and override_dis_package_input configuration option for when an existing model lacks valid sr information in the DIS package
* add support for generating grids with a specified rotation around features of interest
* add support for rotated LGR models (LGR parent and inset with same rotation)
* generalize logic of snapping inset grids to parent grids to ensure that the inset grid is symmetrical about nearfield features of interest when it is created from those (using a buffer; instead of by specifying offset and nrow, ncol)
* fix(grid.py::setup_structured_grid): some issues with delr/delc input, esp. when model.setup_grid is called more than once.
* refactor(grid.py::setup_structured_grid): kruft removal
* improved testing and error checking for various rotated grid cases:
  * inset and TMR parent with same rotation
  * inset rotated relative to TMR parent
  * LGR inset rotated relative to LGR parent (not allowed; raise error)
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 95.08197% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 89.31%. Comparing base (d2d459e) to head (80d649d).

Files Patch % Lines
mfsetup/grid.py 91.01% 8 Missing ⚠️
mfsetup/discretization.py 92.30% 1 Missing ⚠️
mfsetup/mf6model.py 83.33% 1 Missing ⚠️
mfsetup/mfmodel.py 96.77% 1 Missing ⚠️
mfsetup/tests/test_pfl_mfnwt_inset.py 66.66% 1 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #79      +/-   ##
===========================================
+ Coverage    89.14%   89.31%   +0.16%     
===========================================
  Files           64       64              
  Lines        12396    12545     +149     
===========================================
+ Hits         11050    11204     +154     
+ Misses        1346     1341       -5     

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

@aleaf aleaf merged commit 63ba038 into DOI-USGS:develop Mar 8, 2024
5 checks passed
@aleaf aleaf deleted the feat_rotated_inset_support branch August 8, 2024 19:26
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