flopy.utils.sfroutputfile Module

class flopy.utils.sfroutputfile.SfrFile(filename, geometries=None, verbose=False)

Read SFR package results from text file (ISTCB2 > 0)

Parameters:

filename : string

Name of the sfr output file

verbose : bool

Write information to the screen. Default is False.

Examples

>>> import flopy
>>> sfq = flopy.utils.SfrFile('mymodel.sfq')
get_dataframe()

Read the whole text file into a pandas dataframe.

static get_nstrm(df)

Get the number of SFR cells from the results dataframe.

get_results(segment, reach)

Get results for a single reach or sequence of segments and reaches.

Parameters:

segment : int or sequence of ints

Segment number for each location.

reach : int or sequence of ints

Reach number for each location

Returns:

results : dataframe

Dataframe of same format as SfrFile.df, but subset to input locations.

get_skiprows()

Get the number of rows to skip at the top.

get_times()

Parse the stress period/timestep headers.