I'm trying to extract the simulated heads from a MODFLOW-USG binary head-save file, so I'm using flopy as follows:
modelname = 'Model'
import flopy.utils.binaryfile as bf
# Create the headfile object
headobj = bf.HeadFile(modelname+'.hds')
head = headobj.get_data()
However, with the last line I got the following error:
ValueError: cannot reshape array of size 17349 into shape (17338,8670)
The list of records is
(1, 1, 1., 1., b' HEADU', 1, 8669, 1)
(1, 1, 1., 1., b' HEADU', 8670, 17338, 2)
What is the correct way to load the heads from an existing MODFLOW-USG model with flopy?
If I pass
text='headu'
to theHeadFile
constructor, then I can read the headsave file for a pretty simple MODFLOW-USG model: