Loading USG-Transport models into FloPy from file

193 Views Asked by At

I have built a MODFLOW USG-Transport model with FloPy and I want to load the model from file.
I tried using:

Load model from nam file
mu = flopy.modflow.Modflow.load('%s.nam'%(model_name))

but I get the following error:

File "C:\Users\Emma\anaconda3\envs\myenv\lib\site-packages\flopy\utils\util_array.py", line 2696, in load_txt
    num_items = nrow * ncol
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' 

Is this because it is an unstructured model and does anyone have any advice on how to load my model?

cheers Emma

1

There are 1 best solutions below

0
On

Maybe this can help you:

mu = flopy.modflow.Modflow.load(
    'model_name', 
    model_ws='The absolute path of the model name file(.nam/.mfn))',
    version='mfusg',
    exe_name='The absolute path of the mfusg.exe'
)

I am new to flopy, hope it will be helpful.