flopy.mf6.data.mfdatautil module¶
- class ArrayTemplateGenerator(path)[source]¶
Bases:
flopy.mf6.data.mfdatautil.TemplateGenerator
Class that builds a data template for MFArrays. This is a generic class that is initialized with a path that identifies the data to be built.
- Parameters
path (string) – tuple containing path of data is described in dfn files (<model>,<package>,<block>,<data name>)
- empty: (model: MFModel, layered: bool, data_storage_type_list: bool,
default_value: int/float) : variable
Builds a template for the data you need to specify for a specific data type (ie. “hk”) in a specific model. The data type and dimensions is determined by “path” during initialization of this class and the model is passed in to this method as the “model” parameter. If the data is transient a dictionary containing a single stress period will be returned. If “layered” is set to true, data will be returned as a list ndarrays, one for each layer. data_storage_type_list is a list of DataStorageType, one type for each layer. If “default_value” is specified the data template will be populated with that value, otherwise each ndarray in the data template will be populated with np.empty (0 or 0.0 if the DataStorageType is a constant).
- class DataSearchOutput(path_to_data=None, data_header=None)[source]¶
Bases:
object
- property transient¶
- class ListTemplateGenerator(path)[source]¶
Bases:
flopy.mf6.data.mfdatautil.TemplateGenerator
Class that builds a data template for MFLists. This is a generic class that is initialized with a path that identifies the data to be built.
- Parameters
path (string) – tuple containing path of data is described in dfn files (<model>,<package>,<block>,<data name>)
- empty: (maxbound: int, aux_vars: list, boundnames: bool, nseg: int) :
dictionary
Builds a template for the data you need to specify for a specific data type (ie. “stress_period_data”) in a specific model. The data type is determined by “path” during initialization of this class. If the data is transient a dictionary containing a single stress period will be returned. The number of entries in the recarray are determined by the “maxbound” parameter. The “aux_vars” parameter is a list of aux var names to be used in this data list. If boundnames is set to true and boundname field will be included in the recarray. nseg is only used on list data that contains segments. If timeseries is true, a template that is compatible with time series data is returned.
- class MFComment(comment, path, sim_data, line_number=0)[source]¶
Bases:
object
Represents a variable in a MF6 input file
- Parameters
comment (string or list) – comment to be displayed in output file
path (string) – tuple representing location in the output file
line_number (integer) – line number to display comment in output file
- comment¶
comment to be displayed in output file
- Type
string or list
- path¶
tuple representing location in the output file
- Type
string
- line_number¶
line number to display comment in output file
- Type
integer
- write : (file)
writes the comment to file
- get_file_entry(eoln_suffix=True)[source]¶
returns the comment text in the format to write to package files
- is_empty(include_whitespace=True)[source]¶
checks to see if comment is just an empty string ‘’. if include_whitespace is set to false a string with only whitespace is considered empty
- is_comment(text, include_empty_line=False) : bool
returns true if text is a comment. an empty line is considered a comment if include_empty_line is true.
Notes
Examples
- class MFDocString(description)[source]¶
Bases:
object
Helps build a python class doc string
- Parameters
description (string) – description of the class
- indent¶
indent to use in doc string
- Type
string
- description¶
description of the class
- Type
string
- parameter_header¶
header for parameter section of doc string
- Type
string
- parameters¶
list of docstrings for class parameters
- Type
list
- add_parameter : (param_descr : string, beginning_of_list : bool)
adds doc string for a parameter with description ‘param_descr’ to the end of the list unless beginning_of_list is True
- get_doc_string : () : string
builds and returns the docstring for the class
- class TemplateGenerator(path)[source]¶
Bases:
object
Abstract base class for building a data template for different data types. This is a generic class that is initialized with a path that identifies the data to be built.
- Parameters
path (string) – tuple containing path of data is described in dfn files (<model>,<package>,<block>,<data name>)