MF6model class

class mfsetup.mf6model.MF6model(simulation=None, modelname='model', parent=None, cfg=None, exe_name='mf6', load=False, version='mf6', lgr=False, **kwargs)[source]

Bases: MFsetupMixin, ModflowGwf

Class representing a MODFLOW-6 model.

get_flopy_external_file_input(var)[source]

Repath intermediate external file input to the external file path that MODFLOW will use. Copy the file because MF6 flopy reads and writes to the same location.

Parameters:
varstr

key in self.cfg[‘intermediate_data’] dict

Returns:
inputdict or list of dicts

MODFLOW6 external file input format {‘filename’: <filename>}

get_package_list()[source]

Replicate this method in flopy.modflow.Modflow.

get_raster_statistics_for_cells(top, stat='mean')[source]

Compute zonal statics for raster pixels within each model cell.

get_raster_values_at_cell_centers(raster, out_of_bounds_errors='coerce')[source]

Sample raster values at centroids of model grid cells.

property idomain

3D array indicating which cells will be included in the simulation. Made a property so that it can be easily updated when any packages it depends on change.

classmethod load_from_config(yamlfile, load_only=None)[source]

Load a model from a configuration file and set of MODFLOW files.

Parameters:
yamlfilepathlike

Modflow setup YAML format configuration file

load_onlylist

List of package abbreviations or package names corresponding to packages that flopy will load. default is None, which loads all packages. the discretization packages will load regardless of this setting. subpackages, like time series and observations, will also load regardless of this setting. example list: [‘ic’, ‘maw’, ‘npf’, ‘oc’, ‘ims’, ‘gwf6-gwf6’]

Returns:
mmfsetup.MF6model instance
property perioddata

DataFrame summarizing stress period information. Columns: ============== ========================================= start_datetime Start date of each model stress period end_datetime End date of each model stress period time MODFLOW elapsed time, in days* per Model stress period number perlen Stress period length (days) nstp Number of timesteps in stress period tsmult Timestep multiplier steady Steady-state or transient oc Output control setting for MODFLOW parent_sp Corresponding parent model stress period ============== =========================================

setup_chd(**kwargs)[source]

Set up the CHD Package.

setup_drn(**kwargs)[source]

Set up the Drain Package.

setup_ghb(**kwargs)[source]

Set up the General Head Boundary Package.

setup_ic(**kwargs)[source]

Sets up the IC package.

setup_ims()[source]

Sets up the IMS package.

setup_lak(**kwargs)[source]

Sets up the Lake package.

setup_npf(**kwargs)[source]

Sets up the NPF package.

setup_obs(**kwargs)[source]

Sets up the OBS utility.

setup_oc(**kwargs)[source]

Sets up the OC package.

setup_rch(**kwargs)[source]

Sets up the RCH package.

setup_riv(rivdata=None, **kwargs)[source]

Set up the River Package.

setup_simulation_mover(gwfgwf)[source]

Set up the MODFLOW-6 water mover package at the simulation level. Automate set-up of the mover between SFR packages in LGR parent and inset models. todo: automate set-up of mover between SFR and lakes (within a model).

Parameters:
gwfgwfFlopy ModflowGwfgwf package instance

Notes

Other uses of the water mover need to be configured manually using flopy.

setup_sto(**kwargs)[source]

Sets up the STO package.

setup_tdis(**kwargs)[source]

Sets up the TDIS package.

setup_wel(**kwargs)[source]

Set up the Well Package.

write_input()[source]

Write the model input.