Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(utils/check) file check for mfusg unstructured models #1145

Merged
merged 5 commits into from
Jul 9, 2021
Merged

fix(utils/check) file check for mfusg unstructured models #1145

merged 5 commits into from
Jul 9, 2021

Conversation

cnicol-gwlogic
Copy link
Contributor

mfusg file checking did not previously work

  • add get_neighbors function clause for mfusg unstructured grids (in check class, but not mf6check)
  • add modflow/mfdisu/_get_neighboring_nodes function
  • fix pakbase/_check_flowp hk and vka for unstructured cases
  • modify modflow/mfbas/check function to cater for mfusg unstructured grids, in addition to
    structured modflow grids
  • modify t016_test.py to cater for modflow/mfdisu/_get_neighboring_nodes function

Resolves #1072, although issues still need to be addressed to enable loading RCH and EVT, so users will need to use "load_only=[]" to avoid trying to load those for now.

@cnicol-gwlogic
Copy link
Contributor Author

cnicol-gwlogic commented Jul 5, 2021

Chris - I rejigged this PR based on your review of #1076. I decided not to move the get_neighbors function to the grid classes because these seem designed to be independent of the model class, and I would need access to the model class / disu for get_neighbors. I was wary of changing this but let me know if you still prefer it to be moved out of utils/check.

mfusg file checking did not previously work
* add get_neighbors function clause for mfusg unstructured grids (in check class, but not mf6check)
* add modflow/mfdisu/_get_neighboring_nodes function
* fix pakbase/_check_flowp hk and vka for unstructured cases
* modify modflow/mfbas/check function to cater for mfusg unstructured grids, in addition to
  structured modflow grids
* modify t016_test.py to cater for modflow/mfdisu/_get_neighboring_nodes function

Resolves #1072
@codecov
Copy link

codecov bot commented Jul 5, 2021

Codecov Report

Merging #1145 (dc8ea3a) into develop (e77536f) will increase coverage by 1.507%.
The diff coverage is 96.551%.

❗ Current head dc8ea3a differs from pull request most recent head 7a6dc0b. Consider uploading reports for the commit 7a6dc0b to get more accurate results

@@              Coverage Diff              @@
##           develop     #1145       +/-   ##
=============================================
+ Coverage   72.068%   73.576%   +1.507%     
=============================================
  Files          225       225               
  Lines        51962     50878     -1084     
=============================================
- Hits         37448     37434       -14     
+ Misses       14514     13444     -1070     
Impacted Files Coverage Δ
flopy/utils/check.py 85.142% <90.476%> (+1.214%) ⬆️
flopy/modflow/mf.py 68.421% <100.000%> (+0.279%) ⬆️
flopy/modflow/mfbas.py 88.000% <100.000%> (+0.096%) ⬆️
flopy/modflow/mfdisu.py 81.764% <100.000%> (+0.783%) ⬆️
flopy/pakbase.py 82.352% <100.000%> (+0.222%) ⬆️
flopy/utils/__init__.py 100.000% <100.000%> (ø)
flopy/modflow/mfswi2.py 62.461% <0.000%> (-9.847%) ⬇️
flopy/modflow/mfoc.py 91.732% <0.000%> (-2.953%) ⬇️
flopy/modflow/mfbcf.py 87.939% <0.000%> (-2.011%) ⬇️
flopy/utils/datafile.py 72.811% <0.000%> (-1.383%) ⬇️
... and 62 more

@langevin-usgs
Copy link
Contributor

Hey @cnicol-gwlogic, I took a quick look through this, and it looks like you've made some nice improvements. Is there one or more simple tests that show that this is all working as intended? Or do you think the t016_test is sufficient?

@cnicol-gwlogic
Copy link
Contributor Author

Hi @langevin-usgs, yep sorry - should have thought of that, given that's how I was testing the changes at my end. doh.See last commit. I've got a couple more tests ready for another PR that will add RCH and EVT loading capability. Cheers.

@jdhughes-usgs jdhughes-usgs merged commit 345e0fb into modflowpy:develop Jul 9, 2021
@cnicol-gwlogic cnicol-gwlogic deleted the fix_utils_check branch August 11, 2021 04:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential bug when loading USG model
4 participants