An example for the MF6RTM (Modflow 6 Reactive Transport Model) package for a simple Aquifer Storage and Recovery (ASR) use case over a 3D grid (DISV).
This repository provides a single Modflow 6 simulation for a 3D unstructured layered grid (5 layers each with 1032 cells) specified with the Discretization by Vertices (DISV) Package centered on a single ASR well specified with the WEL package. This simulation serves as a unified foundation to develop and test:
- A range different geochemical scenarios
- Reproducible workflows for setting up and simulating scenarios
- Utilites to facilitate workflows
- Improvements to the
mf6rtmpackage
Many Jupyter Notebooks are automatically paired with .py files via Jupytext. Editing one file should automatically sync code and markdown to the other file with every open or save.
If using VS Code, install the the Jupytext Sync extension for maximum benefit.
We recommend using pixi, the next-generation reproducible package management tool built on conda tooling.
A major benefit is that Pixi itself can be installed on any platform, including linux supercomputers, with a shell script and without needing a pre-existing Python environment.
If you are new to pixi but familiar with conda, this Switching from Conda documentation succinctly compares similarities and differences.
Alternately, use a conda environment with the same dependencies.
Follow Pixi Installation instructions for your platform.
From this Github page, click on the green "Code" dropdown button near the upper right. Select to either "Open in GitHub Desktop" (i.e. git clone) or "Download ZIP". We recommend using GitHub Desktop, to most easily receive updates, stage commits, and resolve merge conficts.
Place your copy of this repo in any convenient location on your computer.
Create a project-specific environment and workspace from the pixi.toml or pyproject.toml manifest file.
From your terminal or console, navigate to the directory of the repository you just cloned. To install the development environment, execute the following command:
pixi installTo activate the newly created environment, execute the following command:
pixi shellNote that VSCode does not always detect your new pixi environments, so you may need to Manually Select the Interpreter:
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P). - Type and select "Python: Select Interpreter".
- Select "Enter interpreter path..." and then "Find...".
- Navigate to your project's pixi environment directory. The default path is usually within your project folder at
.pixi/envs/default/bin/python (or Scripts\python.exe on Windows). - Select the
pythonorpython.exeexecutable.
Installing the Pixi Code VSCode extension might also help.
Follow these steps to install using the conda package manager.
We recommend installing the light-weight Miniconda that includes Python, the conda environment and package management system, and their dependencies.
If you have already installed the Anaconda Distribution, you can use it to complete the next steps, but you may need to update to the latest version.
If you are on Windows, we recommend initializing conda for all your command prompt terminals, by opening the "Anaconda Prompt" console and typing this command:
conda init --allFrom this Github page, click on the green "Code" dropdown button near the upper right. Select to either "Open in GitHub Desktop" (i.e. git clone) or "Download ZIP". We recommend using GitHub Desktop, to most easily receive updates.
Place your copy of this repo in any convenient location on your computer.
We recommend creating a custom virtual environment with the same software dependencies that we've used in development and testing, as listed in the environment.yml file.
Create a project-specific environment using this conda command in your terminal or Anaconda Prompt console. If necessary, replace environment.yml with the full file pathway to the environment.yml file in the local cloned repository.
conda env create --file environment.ymlAlternatively, use the faster libmamba solver with:
conda env create -f environment.yml Activate the environment using the instructions printed by conda after the environment is created successfully.
To update your environment run the following command:
conda env update --file environment.yml --prune