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.
Is there an issue in the latest build in how the get_dataframe() function is parsing the columns of the file? Or something inherently different with executing this function under the new build?
Thanks!