Skip to content

Commit d047dfd

Browse files
committed
Adding head observations to flopy 02 build postprocess model nb
1 parent ae854e0 commit d047dfd

File tree

2 files changed

+346
-54
lines changed

2 files changed

+346
-54
lines changed

notebooks/part1_flopy/02-Building-Post-Processing-MODFLOW6.ipynb

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,24 @@
295295
"outputs": [],
296296
"source": []
297297
},
298+
{
299+
"cell_type": "markdown",
300+
"metadata": {},
301+
"source": [
302+
"#### Add head observations \n",
303+
"\n",
304+
"Define observations of head at a couple locations in the model. This is helpful to track continuous output at those locations and will write out CSV files that are easy to process for parameter estimation or other purposes. An observation package is in utilities (`OSB`) for the model is created using the `flopy.mf6.ModflowUtlobs()` method. Use `Shift-Tab` to see the optional variables that can be specified although a key format issue may be missing. A description of the data required by the `OBS` package (`flopy.mf6.ModflowUtlobs()`) can be found in the MODFLOW 6 [ReadTheDocs document](https://modflow6.readthedocs.io/en/latest/_mf6io/utl-obs.html). \n",
305+
"\n",
306+
"Pro Tip: The `continous` object must be a dictionary with `keys` being filenames in which to write the output, and `values` should be a list of lists with each list representing an observation location including a name, obstype, and cell location. For example `['obswell1','head',(0,4,4)]`."
307+
]
308+
},
309+
{
310+
"cell_type": "code",
311+
"execution_count": null,
312+
"metadata": {},
313+
"outputs": [],
314+
"source": []
315+
},
298316
{
299317
"cell_type": "markdown",
300318
"metadata": {},
@@ -425,25 +443,30 @@
425443
]
426444
},
427445
{
428-
"cell_type": "code",
429-
"execution_count": null,
446+
"cell_type": "markdown",
430447
"metadata": {},
431-
"outputs": [],
432-
"source": []
448+
"source": [
449+
"#### Read in the output from the observation package"
450+
]
433451
},
434452
{
435453
"cell_type": "code",
436454
"execution_count": null,
437455
"metadata": {},
438456
"outputs": [],
439-
"source": []
457+
"source": [
458+
"import pandas as pd\n",
459+
"obs_results = pd.read_csv(ws + '/head_obs.csv')"
460+
]
440461
},
441462
{
442463
"cell_type": "code",
443464
"execution_count": null,
444465
"metadata": {},
445466
"outputs": [],
446-
"source": []
467+
"source": [
468+
"obs_results"
469+
]
447470
}
448471
],
449472
"metadata": {

0 commit comments

Comments
 (0)