gsflow.prms.prms_model Module

class gsflow.prms.prms_model.PrmsModel(control, parameters=None, data=None, day=None)[source]

PrmsModel loading class

Parameters
controlControlFile object
parametersPrmsParameters object
dataPrmsData object
daydict

dictionary of PrmsDay objects

Examples

load from file

>>> import gsflow
>>> prms = gsflow.prms.PrmsModel.load_from_file("gsflow.control")

create new object

>>> control = gsflow.ControlFile.load_from_file("gsflow.control")
>>> prms = gsflow.prms.PrmsModel(control, parmaters=None, data=None)
Attributes
control_file

Returns the control file path

Methods

export_nc(self, f, modflow, \*\*kwargs)

Method to export input data to a NetCdf file

get_StatVar(self)

Method to get statvar output

load_from_file(control_file[, model_ws])

PrmsModel load method from a control file

property control_file

Returns the control file path

export_nc(self, f, modflow, **kwargs)[source]

Method to export input data to a NetCdf file

Parameters
fstr or fp.export.NetCdf

filename to write the parameter to (*.nc)

modflowobject

fp.modflow.Modflow or gsflow.modflow.Modflow object

Notes

NetCdf export relies on flopy, so and will only work for GSFLOW models where PRMS has the same discretization as the modflow grid

get_StatVar(self)[source]

Method to get statvar output

Returns
pd.DataFrame of the stat_var file
static load_from_file(control_file, model_ws=None)[source]

PrmsModel load method from a control file

Parameters
control_filestr

control file path and name

model_wsstr

optional method to set the model_ws

Returns
PrmsModel object