Skip to content

Commit 95d60cd

Browse files
committed
more tweaks to modflow setup examples; remove note from 03 notebooks about not being able to access output on model.output objects in a different python session
1 parent d4e0b1f commit 95d60cd

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

notebooks/part1_flopy/03_Loading_and_visualizing_models.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,6 @@
497497
"\n",
498498
"With MODFLOW 6 models, we can get the output from the model object, without having to reference the output files.\n",
499499
"\n",
500-
"<div class=\"alert alert-block alert-info\"> <b>NOTE</b> This approach only works if you ran the model using Flopy, as above. If the model was run separately at the command line, or in a previous Python session, the output needs to be read from the files (as below).</div>\n",
501-
"\n",
502-
"\n",
503500
"In Flopy, MODFLOW binary output is read using objects that represent the various file types."
504501
]
505502
},
@@ -1131,7 +1128,7 @@
11311128
],
11321129
"metadata": {
11331130
"kernelspec": {
1134-
"display_name": "Python 3 (ipykernel)",
1131+
"display_name": "pyclass",
11351132
"language": "python",
11361133
"name": "python3"
11371134
},

notebooks/part1_flopy/08_Modflow-setup-demo.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@
269269
"# Iterative model solution\n",
270270
"ims:\n",
271271
" options:\n",
272-
" complexity: 'moderate'\n",
272+
" complexity: 'complex'\n",
273273
" nonlinear:\n",
274-
" outer_dvclose: 1.e-2\n",
274+
" outer_dvclose: 1.e-1\n",
275275
" outer_maximum: 200\n",
276276
"\n",
277277
"# Observation (OBS) Utility\n",

notebooks/part1_flopy/08b_Modflow-setup-lgr-demo.ipynb

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"source": [
77
"# 08b: Modflow-setup local grid refinement (LGR) demonstration\n",
88
"\n",
9-
"[Modflow-setup](https://github.com/DOI-USGS/modflow-setup) is a Python package for rapid, automated construction of MODFLOW models. Often in modeling projects, construction of the basic model structure (discretization, boundary conditions, etc) consumes a lot of time that could be spent on effective history matching, uncertainty quantification and forecast scenario development. While scripting with Flopy can speed construction of the basic model in a way that is robust and repeatable, it still takes time—with each project, new code must be developed or re-worked, dependencies managed, the idiosyncrasies of various interfaces recalled, and inevitable mistakes checked for and debugged. \n",
10-
"\n",
11-
"Modflow-setup aims to speed up construction of the basic model in a way that is robust and repeatable. Grid-independent source data such as shapefiles and rasters are specified in a single configuration file, along with the desired packages and their options. Modflow-setup reads the configuration and the source data, and within a few minutes, produces an external array-based MODFLOW model that is amenable to parameter estimation and uncertainty quantification using PEST (e.g. [White et al, 2021](https://doi.org/10.1016/j.envsoft.2021.105022)). Detailed description of Modflow-setup is provided by [Leaf and Fienen (2022)](https://www.frontiersin.org/articles/10.3389/feart.2022.903965) and in [online documentation](https://doi-usgs.github.io/modflow-setup/latest/).\n",
9+
"[Modflow-setup](https://github.com/DOI-USGS/modflow-setup) is a Python package for automating construction of MODFLOW models from grid-independent source data including shapefiles, rasters, and other MODFLOW models that are geo-located. Input data and model construction options are summarized in a single configuration file in the [YAML](https://en.wikipedia.org/wiki/YAML) format. Source data are read from their native formats and mapped to a regular finite difference grid specified in the configuration file. An external array-based Flopy model instance with the desired packages is created from the sampled source data and configuration settings. Since every modeling problem is different, the Flopy model instance can be further modified in the same script, using Flopy or other Python packages. MODFLOW input can then be written from the flopy model instance.\n",
1210
"\n",
1311
"#### Example problem\n",
1412
"Here we demonstrate Modflow-setup with a simplified version of the Pleasant Lake model published by Fienen et al (2022), who used a multi-scale modeling approach to evaluate the effects of agricultural groundwater abstraction on the ecology of Pleasant Lake in central Wisconsin, USA. The original report and model files are available at the links below. Figure 1 shows the original published model, which included a coarse (200 meter resolution) \"parent\" model tightly coupled to a 20 meter resolution local grid refinement (LGR) inset (sub)model (see for example, Mehl and others, 2006; Langevin and others, 2017). The parent model was designed to capture the transient effects of agricultural pumping; the inset model was created to simulate groundwater/lake interactions at a finer scale. To incorporate the effects of distant boundaries, the parent model was in turn loosely coupled to a larger transient regional model via specified head boundaries along the model parameter. \n",
@@ -18,6 +16,11 @@
1816
"* Uniform, rectilinear grids are used for the parent and inset models, which greatly simplifies model construction, diagnostics, postprocessing and visualization\n",
1917
"* With the parent and inset models tightly coupled at the matrix (inner iteration) level, little or no model solution efficiency is lost vs. an unstructured discretization approach.\n",
2018
"\n",
19+
"##### Disadvantages\n",
20+
"* Two models must be managed, which nearly doubles the number of files for the project\n",
21+
"* Any code for visualizing the whole model must iterate through the models in the simulation; additional complexity is often needed to stitch the two models together, for example in making the seamless water table contours here. This also makes it harder to re-use code between the LGR simulation and other single-model simulations.\n",
22+
"* Particles and mass transport can't be simulated across the boundary between the parent model and local grid refinement area.\n",
23+
"\n",
2124
"<img src=\"https://github.com/doi-usgs/modflow-setup/blob/develop/docs/source/_static/fig1_pleasant_lake_model.jpg?raw=true\" align=\"center\">\n",
2225
"\n",
2326
"**Figure 1**: The full Pleasant Lake model domain with location map, showing the relationship between the regional, parent and LGR inset models, as well as the irrigation wells considered.\n",
@@ -44,13 +47,13 @@
4447
"* The Lake package is created from a polygon feature, bathymetry raster, stage-area-volume file and climate data from [PRISM](https://prism.oregonstate.edu/).\n",
4548
"* Lake package observations are set up automatically (with an output file for each lake)\n",
4649
"\n",
47-
"As we'll see below, Modflow-setup does all of this automatically, based on input specified in two configuration files (for the parent and inset models) that can be viewed with VSCode or any YAML-aware text editor:\n",
50+
"As we'll see below, Modflow-setup does all of this automatically, based on input specified in two configuration files(for the parent and inset models) that can be viewed with VSCode or any YAML-aware text editor.\n",
4851
" \n",
49-
"``data/pleasant_lgr_parent.yml`` \n",
50-
"``data/pleasant_lgr_inset.yml`` \n",
52+
"[data/pleasant_lgr_parent.yml](data/pleasant_lgr_parent.yml) \n",
53+
"[data/pleasant_lgr_inset.yml](data/pleasant_lgr_inset.yml)\n",
5154
"\n",
5255
"\n",
53-
"#### A final note if you want to try Modflow-setup for your project\n",
56+
"**Note:** \n",
5457
"The example here is presented in an interactive Jupyter Notebook format primarily for illustrative purposes. Typically, the best way to use Modflow-setup is within a python script (`*.py` file) that runs from start to finish. To get started with Modflow-setup on your project, see the [10 Minutes to Modflow-setup](https://doi-usgs.github.io/modflow-setup/latest/10min.html) guide, which includes template configuration files and model build scripts that you can download.\n",
5558
"\n"
5659
]

notebooks/part1_flopy/solutions/03_Loading_and_visualizing_models-solutions.ipynb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,6 @@
519519
"\n",
520520
"With MODFLOW 6 models, we can get the output from the model object, without having to reference the output files.\n",
521521
"\n",
522-
"<div class=\"alert alert-block alert-info\"> <b>NOTE</b> This approach only works if you ran the model using Flopy, as above. If the model was run separately at the command line, or in a previous Python session, the output needs to be read from the files (as below).</div>\n",
523-
"\n",
524-
"\n",
525522
"In Flopy, MODFLOW binary output is read using objects that represent the various file types."
526523
]
527524
},

0 commit comments

Comments
 (0)