modflowpy / flopy

A Python package to create, run, and post-process MODFLOW-based models.
https://flopy.readthedocs.io
Other
517 stars 313 forks source link

Problems reading a transient SFR output file #198

Closed Hperea closed 7 years ago

Hperea commented 7 years ago

Can I read a transient SFR output file with Flopy? I could read only the first stress period of the ouput TXT file. Is there another option to read this file? I appreciate any help. Thanks,

Hugo Perea

aleaf commented 7 years ago

Hi Hugo, The SfrFile class can do this. I just submitted a pull request to fix a bug in reading transient output. See the sfr package example for how to read in the file (scroll to the bottom)

Hperea commented 7 years ago

Hi Aleaf,

I have used the new SfrFile class but I got a problem reading the SFR output file. I got the folloging error:

time += [ts[1]] * np.abs(self.nstrm) TypeError: bad operand type for abs(): 'NoneType'

It looks like there is not value coming out from the function get_nstrm(df). Please, see attached SFR output file. PHXTran1_sfr_flows.txt

aleaf commented 7 years ago

Hi Hugo, I think I found the issue: https://github.com/modflowpy/flopy/pull/202