gsflow.builder.builder_defaults Module¶
-
class
gsflow.builder.builder_defaults.
ControlFileDefaults
(f=None)[source]¶ Defaults class that reads and formats JSON based default files into an object oriented interface for GSFLOW control file.
- Parameters
- fNone, str
json file name, if None reads in pyGSFLOW’s default JSON parameters
- Attributes
record_names
Method to get a list of record names
Methods
add_default
(self, name, dtype, record)Method to add or edit an existing default record
delete_default
(self, name)Method to remove a default from the Defaults object
get_default
(self, name)Method to get a default parameter object
load_defaults
(self)Json load method
to_dict
(self[, to_json])Method to transform the data into a plain dictionary
write_defaults_file
(self, f)Method to write a new JSON defaults file
-
add_default
(self, name, dtype, record)[source]¶ Method to add or edit an existing default record
- Parameters
- namestr
parameter/dimension name
- dtypeint
gsflow dtype
- recordint, float, str, list, np.ndarray
-
delete_default
(self, name)[source]¶ Method to remove a default from the Defaults object
- Parameters
- namestr
default record name
-
get_default
(self, name)[source]¶ Method to get a default parameter object
- Parameters
- name: str
- Returns
- _DefaultRecord object
-
load_defaults
(self)¶ Json load method
-
property
record_names
¶ Method to get a list of record names
-
to_dict
(self, to_json=False)[source]¶ Method to transform the data into a plain dictionary
- Returns
- dict
-
write_defaults_file
(self, f)¶ Method to write a new JSON defaults file
- Parameters
- fstr
json file name
-
class
gsflow.builder.builder_defaults.
Defaults
(f=None)[source]¶ Defaults class that reads and formats JSON based default files into an object oriented interface.
- Parameters
- fNone, str
json file name, if None reads in pyGSFLOW’s default JSON parameters
- Attributes
record_names
Method to get a list of record names
Methods
load_defaults
(self)Json load method
to_dict
(self[, to_json])Method to transform the data into a plain dictionary
write_defaults_file
(self, f)Method to write a new JSON defaults file
-
load_defaults
(self)¶ Json load method
-
property
record_names
¶ Method to get a list of record names
-
to_dict
(self, to_json=False)[source]¶ Method to transform the data into a plain dictionary
- Returns
- dict
-
write_defaults_file
(self, f)¶ Method to write a new JSON defaults file
- Parameters
- fstr
json file name
-
class
gsflow.builder.builder_defaults.
ModflowDefaults
(f)[source]¶ Defaults class that reads and formats JSON based default files into an object oriented interface for FloPy modflow.
- Parameters
- fNone, str
json file name, if None reads in pyGSFLOW’s default JSON parameters
- Attributes
record_names
Method to get a list of record names
Methods
add_default
(self, pkg_name, name, data[, …])Method to add or edit an existing default record
delete_default
(self, pkg_name[, name])Method to remove a default from the Defaults object
get_default
(self, pkg_name, name)Method to get a default parameter object
load_defaults
(self)Json load method
to_dict
(self[, to_json])Method to transform the data into a plain dictionary
write_defaults_file
(self, f)Method to write a new JSON defaults file
-
add_default
(self, pkg_name, name, data, sfr_block=None)[source]¶ Method to add or edit an existing default record
- Parameters
- pkg_namestr
modflow three leter package name
- namestr
parameter/dimension name
- datalist, int, or np.ndarray
list, int, or numpy array of data
- sfr_blockstr
if pkg is sfr use sfr block to set to ‘pkg’, ‘reach’, or ‘segment’
-
delete_default
(self, pkg_name, name=None)[source]¶ Method to remove a default from the Defaults object
- Parameters
- namestr
default record name
-
get_default
(self, pkg_name, name)[source]¶ Method to get a default parameter object
- Parameters
- name: str
- Returns
- _PrmsDefaultRecord object
-
load_defaults
(self)¶ Json load method
-
property
record_names
¶ Method to get a list of record names
-
to_dict
(self, to_json=False)[source]¶ Method to transform the data into a plain dictionary
- Returns
- dict
-
write_defaults_file
(self, f)¶ Method to write a new JSON defaults file
- Parameters
- fstr
json file name
-
class
gsflow.builder.builder_defaults.
PrmsDefaults
(f)[source]¶ Defaults class that reads and formats JSON based default files into an object oriented interface for PRMS.
- Parameters
- fNone, str
json file name, if None reads in pyGSFLOW’s default JSON parameters
- Attributes
record_names
Method to get a list of record names
Methods
add_default
(self, name, data[, dtype, dimension])Method to add or edit an existing default record
delete_default
(self, name)Method to remove a default from the Defaults object
get_default
(self, name)Method to get a default parameter object
load_defaults
(self)Json load method
to_dict
(self[, to_json])Method to transform the data into a plain dictionary
write_defaults_file
(self, f)Method to write a new JSON defaults file
-
add_default
(self, name, data, dtype=None, dimension=None)[source]¶ Method to add or edit an existing default record
- Parameters
- namestr
parameter/dimension name
- datalist, int, or np.ndarray
list, int, or numpy array of data
- dtypeint or None
prms dtype, None if it’s in the dimension block
- dimensionstr or None
prms dimension type. ex. nssr, nhru, one, etc…
-
delete_default
(self, name)[source]¶ Method to remove a default from the Defaults object
- Parameters
- namestr
parameters/dimension name
-
get_default
(self, name)[source]¶ Method to get a default parameter object
- Parameters
- name: str
- Returns
- _PrmsDefaultRecord object
-
load_defaults
(self)¶ Json load method
-
property
record_names
¶ Method to get a list of record names
-
to_dict
(self, to_json=False)[source]¶ Method to transform the data into a plain dictionary
- Returns
- dict
-
write_defaults_file
(self, f)¶ Method to write a new JSON defaults file
- Parameters
- fstr
json file name