flopy.mf6.data.mfdata module

class MFData(sim_data, model_or_sim, structure, enable=True, path=None, dimensions=None, *args, **kwargs)[source]

Bases: DataInterface

Base class for all data. This class contains internal objects and methods that most end users will not need to access directly.

Parameters:
  • sim_data (MFSimulationData) – container class for all data for a MF6 simulation

  • structure (MFDataStructure) – defines the structure of the data

  • enable (bool) – whether this data is currently being used

  • path (tuple) – tuple describing path to the data generally in the format (<model>, <package>, <block>, <data>)

  • dimensions (DataDimensions) – object used to retrieve dimension information about data

  • *args (exists to support different child class parameter sets) – with extra init parameters

  • **kwargs (exists to support different child class parameter sets) – with extra init parameters

_current_key

current key defining specific transient dataset to be accessed

Type:

str

new_simulation(sim_data)[source]

points data object to a new simulation

layer_shape() : tuple

returns the shape of the layered dimensions

Notes

Examples

property array
aux_var_names()[source]
property data_type
property dtype
export(f, **kwargs)[source]
find_dimension_size(dimension_name)[source]
get_description(description=None, data_set=None)[source]
is_valid()[source]
layer_shape()[source]
load(first_line, file_handle, block_header, pre_data_comments=None, external_file_info=None)[source]
property model
property name
new_simulation(sim_data)[source]
property path
property plottable
class MFMultiDimVar(sim_data, model_or_sim, structure, enable=True, path=None, dimensions=None)[source]

Bases: MFData

property data_type
property plottable
class MFTransient(*args, **kwargs)[source]

Bases: object

Parent class for transient data. This class contains internal objects and methods that most end users will not need to access directly.

Parameters:
  • *args – Parameters present to support multiple child class interfaces

  • **kwargs – Parameters present to support multiple child class interfaces

_current_key

current key defining specific transient dataset to be accessed

Type:

str

_data_storage

dictionary of DataStorage objects

Type:

dict

add_transient_key(transient_key)[source]

verifies the validity of the transient key about to be added

get_data_prep(transient_key)[source]

called prior to the child class getting data. ensures that the data retrieved will come from the dataset of a specific transient_key

_set_data_prep(transient_key)[source]

called prior to the child class setting data. ensures that the data set will go to the dataset of a specific transient_key

_get_file_entry_prep(transient_key)[source]

called prior to the child class getting the file entry. ensures that the file entry only reflects the data from a specific transient_key

_load_prep(first_line, file_handle, block_header, pre_data_comments)[source]

called prior to the child class loading data from a file. figures out what transient_key to store the data under

_append_list_as_record_prep(record, transient_key)[source]

called prior to the child class appending a list to a record. ensures that the list gets appended to the record associated with the key transient_key

_update_record_prep(transient_key)[source]

called prior to the child class updating a record. ensures that the record being updated is the one associated with the key transient_key

get_active_key_list() : list

returns a list of the active transient keys

_verify_sp(sp_num) : bool

returns true of the stress period sp_num is within the expected range of stress periods for this model

Notes

Examples

add_transient_key(transient_key)[source]
get_active_key_dict()[source]
get_active_key_list()[source]
get_data_prep(transient_key=0)[source]
update_transient_key(old_transient_key, new_transient_key)[source]