gsflow.builder.modflow_builder Module

class gsflow.builder.modflow_builder.ModflowBuilder(modelgrid, dem_data, model_name, defaults=None)[source]

Class for building Modflow model objects using built in Defaults.

ModflowBuilder builds a steady state model using default values from gsflow.builder.Defaults or a user supplied Defaults object.

The user can then edit the Modflow package objects to customize their model runs. (ex. create transient model), etc…

supported packages include : DIS, BAS, UPW, UZF, SFR, NWT, OC

Parameters
modelgridgsflow.builder.FishnetGenerator

Structured grid object from FishnetGenerator or from flopy.discretization.StructuredGrid

dem_datanp.ndarray

numpy array of dimension (nrow, ncol) of DEM elevations

model_namestr

model name ex. “my_test_model”

defaultsgsflow.builder.Defaults

optional parameter, user can supply a gsflow.builder.Defaults instance to ModflowBuilder to use a custom set of default values

Attributes
model

Returns the gsflow.modflow.Modflow model object

Methods

build_all(self, reach_data, segment_data, …)

Method to build all supported modflow packages

build_bas6(self[, ibound])

Method to build the BAS6 package

build_dis(self[, botm])

Method to build the dis package using defaults

build_nwt(self)

Method to build a SIMPLE nwt solver instance

build_oc(self)

Method to build a simple one stress period OC object

build_sfr(self, reach_data, segment_data)

Method to build a default version of the SFR package

build_upw(self)

Method to build a default version of the UPW package

build_uzf(self, irunbnd[, finf, iuzfbnd])

Method to build a UZF package object using built in defaults

build_all(self, reach_data, segment_data, irunbnd, finf=None, botm=None, ibound=None, iuzfbnd=None)[source]

Method to build all supported modflow packages

Parameters
reach_datanp.recarray

flopy’s ModflowSfr2 reach data parameter

segment_datanp.recarray

flopy’s ModflowSfr2 segment data parameter

irunbndnp.ndarray

flopy’s ModflowUZF1 irunbnd parameter (runoff connection to streams)

finfnp.ndarray

UZF1’s finf array which describes precipitation for recharge

botmnp.ndarray

bottom elevation for single layer model

iboundnp.ndarray

ibound array of active model cells

iuzfbndnp.ndarray

uzf ibound array of active model cells

Returns
gsflow.modflow.Modflow object
build_bas6(self, ibound=None)[source]

Method to build the BAS6 package

Parameters
iboundint, np.ndarray

array of active modflow cells within the model, >0 for active, 0 for inactive

Returns
flopy.modflow.ModflowBas object
build_dis(self, botm=None)[source]

Method to build the dis package using defaults

Parameters
botmfloat, int, np.ndarray

Model botm elevations for discretization file. If botm is None then botm elevation is set 50 length units below DEM elevation

Returns
flopy.modflow.ModflowDis object
build_nwt(self)[source]

Method to build a SIMPLE nwt solver instance

Returns
flopy.modflow.ModflowNwt
build_oc(self)[source]

Method to build a simple one stress period OC object

Returns
flopy.modflow.ModflowOc
build_sfr(self, reach_data, segment_data)[source]

Method to build a default version of the SFR package

Parameters
reach_datanp.recarray

reach data recarray for ModflowSfr2

segment_datanp.recarray

segment data recarray for ModflowSfr2

Returns
flopy.modflow.ModflowSfr2
build_upw(self)[source]

Method to build a default version of the UPW package

Returns
flopy.modflow.ModflowUpw
build_uzf(self, irunbnd, finf=None, iuzfbnd=None)[source]

Method to build a UZF package object using built in defaults

Parameters
irunbndnp.ndarray

flopy’s ModflowUZF1 irunbnd parameter (runoff connection to streams)

finfnp.ndarray

optional finf array of precipitation

iuzfbndnp.ndarray

uzf ibound array of active unsaturated zone model cells

Returns
flopy.modflow.ModflowUzf
property model

Returns the gsflow.modflow.Modflow model object