flopy.utils.sfroutputfile module
- class SfrFile(filename, geometries=None, verbose=False)[source]
Bases:
object
Read SFR package results from text file (ISTCB2 > 0)
- Parameters:
filename (str) – Name of the sfr output file
geometries (any) – Ignored
verbose (any) – Ignored
Notes
Indexing starts at one for: layer, row, column, segment, reach. Indexing starts at zero for: i, j, k, and kstpkper.
Examples
>>> import flopy >>> sfq = flopy.utils.SfrFile('mymodel.sfq')
- property df
- dtypes = {'column': <class 'int'>, 'layer': <class 'int'>, 'reach': <class 'int'>, 'row': <class 'int'>, 'segment': <class 'int'>}
- get_dataframe()[source]
Read the whole text file into a pandas dataframe.
- Returns:
df – SFR output as a pandas dataframe
- Return type:
pandas dataframe
- static get_nstrm(df)[source]
Get the number of SFR cells from the results dataframe.
- Returns:
nrch – Number of SFR cells
- Return type: