SwnModflow#

Constructors#

SwnModflow([logger])

Surface water network adaptor for MODFLOW.

SwnModflow.from_swn_flopy(swn, model[, ...])

Create a MODFLOW SFR structure from a surface water network.

SwnModflow.from_pickle(path[, swn, model])

Read a pickled format from a file.

Properties#

SwnModflow.model

Flopy model object.

SwnModflow.segments

Geo dataframe of segments.

SwnModflow.diversions

[Geo] dataframe of diversions.

SwnModflow.reaches

Geo dataframe of model cell-by-cell reaches.

SwnModflow.segment_data

Dataframe of segment data.

SwnModflow.segment_data_ts

Dict of dataframes of time-varying segment data.

Reach data generation#

SwnModflow.set_reach_data_from_array(name, array)

Set reach data from an array that matches the model (nrow, ncol).

SwnModflow.set_reach_data_from_segments(...)

Set reach data based on segment series (or scalar).

SwnModflow.set_reach_slope([method, min_slope])

Set slope for reaches.

Segment data generation#

SwnModflow.new_segment_data()

Generate empty segment data.

SwnModflow.default_segment_data([hyd_cond1, ...])

High-level function to set default segment_data for MODFLOW SFR.

SwnModflow.set_segment_data_from_scalar(...)

Set segment data from a scalar.

SwnModflow.set_segment_data_from_segments(...)

Set segment data from a series indexed by segments.

SwnModflow.set_segment_data_from_diversions(...)

Set segment data from a series indexed by diversions.

Other packages#

SwnModflow.set_package_obj(package[, auxiliary])

Set MODFLOW package data to flopy model.

SwnModflow.package_period_frame(package, style)

Return DataFrame of stress period data for MODFLOW packages.

SwnModflow.write_package_period(package, fname)

Write PERIOD file for MODFLOW packages, to be used within OPEN/CLOSE.

SwnModflow.flopy_package_period(package[, ...])

Return dict of lists of lists for flopy's stress_period_data.

Utilities#

SwnModflow.get_location_frame_reach_info(loc_df)

Get reach information to location data frame, matched by segnum.

SwnModflow.route_reaches(start, end, *[, ...])

Return a list of reach identifiers that connect a pair of reaches.