flopy icon indicating copy to clipboard operation
flopy copied to clipboard

bug: FloPy load throws error reading .nam file for a USG model

Open SamanTavakoli opened this issue 2 years ago • 1 comments

Describe the bug FloPy throws an error attemping to load a USG model. The USG model has LPF package for model properties.

To Reproduce ml = flopy.modflow.Modflow.load("SV_SWI_uni_01j.nam" ,version = "mfusg", verbose = True, check = False)

File D:\Software\Anaconda3\lib\site-packages\flopy\modflow\mf.py:811 in load
dis = disnamdata.package.load(

AttributeError: 'NoneType' object has no attribute 'load'

SamanTavakoli avatar Jan 31 '23 21:01 SamanTavakoli

I'll have to add a trap for this case, but the correct way to load mfusg models is:

flopy.mfusg.MfUsg.load()

Give that a shot.

cnicol-gwlogic avatar Jan 31 '23 21:01 cnicol-gwlogic

I think this can be closed, the deprecation of USG support was turned into an error with https://github.com/modflowpy/flopy/commit/696a209416f91bc4a9e61b4392f4218e9bd83408

wpbonelli avatar May 01 '24 14:05 wpbonelli