Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading SFR Budget File with sfroutputfile Module of flopy #861

Closed
craig-cooledge opened this issue Apr 29, 2020 · 2 comments
Closed

Comments

@craig-cooledge
Copy link

Hi Folks,

I am using the sfroutputfile module in flopy to read the SFR budget output file to a pandas dataframe. The code shown below worked under a previous build of flopy (v3.2.12) executed with python27. Trying to execute the code again with Python3 and flopy v3.3.0 produces an error when calling the get_dataframe() function.

`import os
import numpy as np
import pandas as pd
import flopy as fp
import flopy.utils.binaryfile as bf
from flopy.utils.sfroutputfile import SfrFile

inSFROut = './OUT_TR/SPV.sfrbud'
loadSFROut = SfrFile(inSFROut)
df = loadSFROut.get_dataframe()`

Error:
ValueError: invalid literal for int() with base 10: '5.5742E+01'

The value shown in the error is the first entry in the FLOW INTO STRM. RCH. column (column 6) of the SFR output file. The function seems to be looking for an integer in this column but is finding the value shown.

Thanks,
Craig

@jlarsen-usgs
Copy link
Contributor

@ccooledge

Hi Craig,

I'll take a look at the issue. Will you zip or 7zip a copy of your SFR output file and share it here.

Thanks!

@craig-cooledge
Copy link
Author

See attached. Thanks for taking a look!
SPV_TR_V001.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants