Skip to content

Commit

Permalink
Merge pull request #139 from jdhughes-usgs/flopy-1-2-updates
Browse files Browse the repository at this point in the history
update flopy 1 and 2 notebooks
  • Loading branch information
mnfienen authored Mar 23, 2024
2 parents 150a877 + 5cb46aa commit a1dd405
Show file tree
Hide file tree
Showing 3 changed files with 287 additions and 262 deletions.
18 changes: 9 additions & 9 deletions notebooks/part1_flopy/01-Flopy-intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"source": [
"![](data/flopylogo_sm.png)\n",
"\n",
"# 01: Introduction to Flopy\n",
"# 01: Introduction to FloPy\n",
"\n",
"The second part of this course focuses on [Flopy](https://github.com/modflowpy/flopy), a Python package for creating, running, and post-processing MODFLOW-based groundwater flow and transport models. Why would we want this? MODFLOW—especially older versions—has idiosyncratic input and output that can be difficult to work with directly. Flopy translates MODFLOW input and output into the general Python data structures we explored in the first part of the course, making it easier to script groundwater modeling workflows with the entire scientific Python ecosysem.\n",
"The second part of this course focuses on [FloPy](https://github.com/modflowpy/flopy), a Python package for creating, running, and post-processing MODFLOW-based groundwater flow and transport models. Why would we want this? MODFLOW—especially older versions—has idiosyncratic input and output that can be difficult to work with directly. FloPy translates MODFLOW input and output into the general Python data structures we explored in the first part of the course, making it easier to script groundwater modeling workflows with the entire scientific Python ecosysem.\n",
"\n",
" Flopy was originally developed by [Mark Bakker and others](https://ngwa.onlinelibrary.wiley.com/doi/10.1111/gwat.12413) for working with MODFLOW 2005 (including MODFLOW-NWT) and earlier versions of MODFLOW. [Flopy has since been expanded](https://doi.org/10.1111/gwat.13327) to support [MODFLOW 6](https://github.com/MODFLOW-USGS/modflow6), the current version of MODFLOW that includes general support for structured and unstructured grids, tight coupling of multiple models within a simulation, and a redesigned input structure that is meant to be more intuitive and human-readable. Flopy support for MODFLOW 6 is tightly coupled to the MODFLOW 6 code, in that the relevant Flopy code is auto-generated via definition files that describe the MODFLOW 6 models and packages. As a result, MODFLOW 2005-style and MODFLOW 6 functionality within Flopy is mostly distinct, and accessed through different subpackages—`flopy.modflow` and `flopy.mf6` respectively. \n",
" FloPy was originally developed by [Mark Bakker and others (2016)](https://ngwa.onlinelibrary.wiley.com/doi/10.1111/gwat.12413) for working with MODFLOW 2005 (including MODFLOW-NWT) and earlier versions of MODFLOW. [FloPy has since been expanded](https://doi.org/10.1111/gwat.13327) to support [MODFLOW 6](https://github.com/MODFLOW-USGS/modflow6), the current version of MODFLOW that includes general support for structured and unstructured grids, tight coupling of multiple models within a simulation, and a redesigned input structure that is meant to be more intuitive and human readable. FloPy support for MODFLOW 6 is tightly coupled to the MODFLOW 6 code, in that the relevant FloPy code is auto-generated from text files (_definition files_) that describe MODFLOW 6 models and packages. As a result, MODFLOW 2005-style and MODFLOW 6 functionality within FloPy is accessed through different subpackages—`flopy.modflow` and `flopy.mf6` respectively. \n",
"\n",
"For example, to instantiate a MODFLOW-NWT instance, one would enter:\n"
"For example, to instantiate a MODFLOW-NWT model instance, one would enter:\n"
]
},
{
Expand Down Expand Up @@ -47,7 +47,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As you can see, in addition to the different subpackage accessors, the syntax is different between the two versions. In general, the syntax for the `flopy.modflow` and `flopy.mf6` subpackages follows the respective MODFLOW versions they support. For example, `ModflowGwf` is simply a [CamelCase](https://en.wikipedia.org/wiki/Camel_case) representation of the MODFLOW 6 Groundwater Flow (GWF) model. Similarly, the Discretization Package (for the GWF model) class is named `ModflowGwfdis`. Arguments to the `ModflowGwfdis` constructor follow the input variables to MODFLOW 6."
"As you can see, in addition to the different FloPy subpackages, the syntax is different between the two versions. In general, the syntax for the `flopy.modflow` and `flopy.mf6` subpackages follows the respective MODFLOW versions they support. For example, `ModflowGwf` is simply a [CamelCase](https://en.wikipedia.org/wiki/Camel_case) representation of the MODFLOW 6 Groundwater Flow (GWF) model. Similarly, the Discretization Package (for the GWF model) class is named `ModflowGwfdis`. Arguments to the `ModflowGwfdis` constructor follow the input variables to MODFLOW 6."
]
},
{
Expand Down Expand Up @@ -76,7 +76,7 @@
"\n",
"Other Flopy subpackages (`flopy.modpath`, `flopy.mt3d`, etc) provide varying levels of support for previous versions of MODFLOW or related software such as MODPATH and MT3D; or general (Flopy-wide) support for discretization, exporting or other processing (`flopy.discretization`, `flopy.export`, `flopy.utils`, etc.).\n",
"\n",
"This class will focus almost exclusively on Flopy support for MODFLOW 6. Examples and documentation for using Flopy in other contexts is available in the [Flopy online documentation](https://flopy.readthedocs.io/en/stable/index.html)."
"This class will focus almost exclusively on FloPy support for MODFLOW 6. Examples and documentation for using FloPy in other contexts is available in the [FloPy online documentation](https://flopy.readthedocs.io/en/stable/index.html). The [Examples gallery](https://flopy.readthedocs.io/en/stable/examples.html) are a resource that can be used to quickly learn the underlying capabilities of FloPy."
]
},
{
Expand All @@ -87,7 +87,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "pyclass-docs",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -101,9 +101,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading

0 comments on commit a1dd405

Please sign in to comment.