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

Potential bug when loading USG model #1072

Closed
DataGeoranger opened this issue Mar 8, 2021 · 6 comments · Fixed by #1145
Closed

Potential bug when loading USG model #1072

DataGeoranger opened this issue Mar 8, 2021 · 6 comments · Fixed by #1145

Comments

@DataGeoranger
Copy link

Hey Team,

I tried to use the flopy.modflow.Modflow.load to load my existing robust USG model. It gave me error says " not enough values to unpack (expected 3, got 1)" and screenshot below. I further confirmed the error using USGS test example - folder '01B_nestedgrid_gnc'. Could you please help? Thanks!

Jack Wang

image

@DataGeoranger
Copy link
Author

DataGeoranger commented Mar 8, 2021

Just want to clarify, the USGS example I referred above is an USG model when I downloaded the USG program from USGS website. The version is mfusg1_5 and under the folder called "test". "..\mfusg1_5\test".
3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
numpy version: 1.19.2
matplotlib version: 3.3.1
pandas version: 1.1.3
flopy version: 3.3.4
@langevin-usgs Hey Chris, just wonder if you could help with this issue. Thank you!

@cnicol-gwlogic
Copy link
Contributor

Just want to clarify, the USGS example I referred above is an USG model when I downloaded the USG program from USGS website. The version is mfusg1_5 and under the folder called "test". "..\mfusg1_5\test".
3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
numpy version: 1.19.2
matplotlib version: 3.3.1
pandas version: 1.1.3
flopy version: 3.3.4
@langevin-usgs Hey Chris, just wonder if you could help with this issue. Thank you!

I've been meaning to fix this. I'll have a crack if no-one else does.

@langevin-usgs
Copy link
Contributor

Hey @cnicol-gwlogic, would be great if you could take a crack at this! Thank you. Feel free to ping me if you want to discuss.

@langevin-usgs
Copy link
Contributor

After briefly looking at the error message, the problem appears to be in the checker. I believe there is a simple way to turn off the checker during load (check=False). This would be worth a shot, though I suspect there could be other issues.

@cnicol-gwlogic
Copy link
Contributor

No worries @langevin-usgs - good point, check=False is the quick/easy work-around. I submitted a PR regardless, as I occasionally come across problems related to this. EVT/RCH loading still needs to be addressed for mfusg models, but this needs a bit of thought. Cheers.

@DataGeoranger
Copy link
Author

DataGeoranger commented Mar 16, 2021

@langevin-usgs @cnicol-gwlogic Thank you both for the tips and help. set check = False works for me when I try it on USGS usg model example. For my USG model, I had to set Forgive = True as well and then it will load model successfully. I do have a CLN package, wonder if that's why?
If the model doesn't pass a checker, will that limit me using some of the flopy utils? Because I tried to use the write_shapefile function and it didn't work either after I load the USG model.
mf._modelgrid.write_shapefile(os.path.join(proj_dir, '3.GIS/shp/s31_usg.shp'), epsg=epsg)
image

jdhughes-usgs pushed a commit that referenced this issue Jul 9, 2021
* 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
* pakbase sidestep np jagged array deprecation warning
* add mfusg load tests to t016

Co-authored-by: Mike Taves <mwtoews@gmail.com>

Resolves #1072
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
3 participants