flopy.mf6.mfbase module

class ExtFileAction[source]

Bases: enum.Enum

An enumeration.

copy_all = 1
copy_none = 2
copy_relative_paths = 3
exception FlopyException(error, location='')[source]

Bases: Exception

General Flopy Exception

exception MFDataException(model=None, package=None, path=None, current_process=None, data_element=None, method_caught_in=None, org_type=None, org_value=None, org_traceback=None, message=None, debug=None, mfdata_except=None)[source]

Bases: Exception

Exception related to MODFLOW input/output data

class MFFileMgmt(path)[source]

Bases: object

Class containing MODFLOW path data

Parameters:path (string) – path on disk to the simulation
sim_path

path to the simulation

Type:string
model_relative_path

dictionary of relative paths to each model folder

Type:OrderedDict
get_model_path : (key : string) : string

returns the model working path for the model key

set_sim_path : string

sets the simulation working path

add_ext_file(file_path, model_name)[source]
copy_files(copy_relative_only=True)[source]
get_model_path(key, last_loaded_path=False)[source]
get_sim_path(last_loaded_path=False)[source]
get_updated_path(external_file_path, model_name, ext_file_action)[source]
resolve_path(path, model_name, last_loaded_path=False, move_abs_paths=False)[source]
set_last_accessed_model_path()[source]
set_last_accessed_path()[source]
set_sim_path(path)[source]

set the file path to the simulation files

Parameters:path (string) – full path or relative path from working directory to simulation folder

Examples

self.simulation_data.mfdata.set_sim_path()

static string_to_file_path(fp_string)[source]
strip_model_relative_path(model_name, path)[source]
static unique_file_name(file_name, lookup)[source]
class MFFilePath(file_path, model_name)[source]

Bases: object

isabs()[source]
exception MFInvalidTransientBlockHeaderException(error)[source]

Bases: Exception

Exception related to parsing a transient block header

class PackageContainer(simulation_data, name)[source]

Bases: object

Base class for any class containing packages.

Parameters:
  • simulation_data (SimulationData) – the simulation’s SimulationData object
  • name (string) – name of the package container object
_packagelist

packages contained in the package container

Type:list
package_type_dict

dictionary of packages by package type

Type:dictionary
package_name_dict

dictionary of packages by package name

Type:dictionary
package_key_dict

dictionary of packages by package key

Type:dictionary
package_factory : (package_type : string, model_type : string) :
MFPackage subclass
Static method that returns the appropriate package type object based on the package_type and model_type strings
get_package : (name : string) : MFPackage or [MfPackage]

finds a package by package name, package key, package type, or partial package name. returns either a single package, a list of packages, or None

register_package : (package : MFPackage) : (tuple, PackageStructure)

base class method for package registration

static get_module(package_file_path)[source]
static get_module_val(module, item, attrb)[source]
get_package(name=None)[source]

Get a package.

Parameters:name (str) – Name of the package, ‘RIV’, ‘LPF’, etc.
Returns:pp
Return type:Package object
static get_package_file_paths()[source]
static model_factory(model_type)[source]
package_dict
static package_factory(package_type, model_type)[source]
package_names
register_package(package)[source]
class PackageContainerType[source]

Bases: enum.Enum

An enumeration.

model = 2
package = 3
simulation = 1
exception ReadAsArraysException(error)[source]

Bases: Exception

Attempted to load ReadAsArrays package as non-ReadAsArraysPackage

exception StructException(error, location)[source]

Bases: Exception

Exception related to the package file structure

class VerbosityLevel[source]

Bases: enum.Enum

An enumeration.

normal = 2
quiet = 1
verbose = 3