This repository contains a worked example of the Pleasant Lake problem (Fienen et al., 2022) that demonstrates the use of the Flopy Python Package to assemble a MODFLOW 6 groundwater flow model with external array input and advanced boundary conditions.
There are two ways to run the example:
- online via Binder
- Locally on your computer, after creating a suitable python environment
- Download and install the 64-bit Anaconda python distribution or Miniconda
- Anaconda comes with a larger selection of popular data science and scientific packages, making it ideal for those who use python frequently for scientific computing.
- Miniconda is a minimal installer with a much smaller footprint, making it ideal for those who only want to run this example.
- Make sure to install Anaconda or Miniconda to your username (not at the system level).
-
Create a Conda environment
Open an Anaconda Command Prompt on Windows or a terminal window on OSX and point it to the location of
environment.yml
and enter:conda env create -f environment.yml
Note: if the above line executes too slowly, try installing Mamba and using that instead, i.e.
mamba env create -f environment.yml
-
Activate the environment
Open an Anaconda Command Prompt on Windows or a terminal window on OSX and enter:
conda activate flopy_example
-
Run the Notebook
Make sure that the command window with the conda environment activated is pointed at this folder, or any higher location in the file system. Then enter:
jupyter notebook
A new browser tab should pop up with the Jupyter file browser. Navigate to
worked_flopy_example.ipynb
and click on it. For more information on Jupyter Notebooks, refer to the documentation: https://jupyter.org.Note: Running the model through Flopy (as in the Notebook) requires specification of the MODFLOW executable. In the example, we assume that a MODFLOW 6 executable named
"mf6"
is visible in the system path at the location of this folder (see theexe_name
argument in Notebook cell 5). Executables for MODFLOW 6 for linux, mac and windows are included in thebin/
folder.
Fienen, M.N., Haserodt, M.J., Leaf, A.T., Westenbroek, S.M., 2022, Simulation of Regional Groundwater Flow and Groundwater/Lake Interactions in the Central Sands, Wisconsin: U.S. Geological Survey Scientific Investigations Report 2022-5046, http://doi.org/10.3133/sir20225046
Groundwater Technology Spotlight article:
Leaf, A.T. and Fienen, M.N. (2022), Flopy – the Python interface for MODFLOW. Groundwater (in revision), xx: xxx-xxx. https://doi.org/10.1111/gwat.xxxxx
USGS Software release citation:
Leaf, A.T. and Fienen, M.N. (2022). Pleasant Lake worked Flopy example, version 0.1, U.S. Geological Survey Software Release (IP-143803; in review), 1 Sept 2022. https://doi.org/10.5066/P9EFHF9H
This software is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The software has not received final approval by the U.S. Geological Survey (USGS). No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. The software is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the software. It is the responsibility of the user to check the accuracy of the results.
Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.