{ "cells": [ { "cell_type": "markdown", "id": "b3f5de9d", "metadata": {}, "source": [ "(_saint_priest)=\n", "# How to simulate groundwater levels with multiple influences ?\n", "\n", "This example demonstrates how to simulate groundwater level varations in Rameau using multiple influences. It takes back a case study in France located near the Saint-Priest town described in \n", "two reports ([82-SGN-1000-STO](https://infoterre.brgm.fr/rapports/82-SGN-1000-STO.pdf) and\n", "[83-SGN-843-STO](https://infoterre.brgm.fr/rapports/83-SGN-843-STO.pdf)) and applied here with Rameau.\n", "This case study concerns groundwater level reactions due to the shutdown of a mining site.\n", "\n", "The mine is characterized by the water level in the well named P3 and the overflow flow rate in a drainage gallery. The aquifer located near the minig site is characterized by water levels in two piezometers named A and B. The objective is to modelized groundwater level variations in A and B.\n", "\n", "Each of these piezometers is modeled independently based on time series of :\n", "\n", "- rainfall and PET near the site,\n", "- water level in well P3,\n", "- flow rate in the drainage gallery.\n", "\n", "Simulations are performed on a daily basis over the period from March 1981 to\n", "February 1983 (730 days). The piezometric data from boreholes A and B and well\n", "P3, available once or twice a week, were therefore interpolated on a daily\n", "basis. The piezometric data from boreholes A and B are available for the 547-day\n", "period from the end of August 1981 to the end of February 1983. The period from\n", "March to August 1981, during which data are available, is used for initializing \n", "the model." ] }, { "cell_type": "markdown", "id": "d65755dc", "metadata": {}, "source": [ "## Simulation in the borehole A" ] }, { "cell_type": "markdown", "id": "4f3de4bf", "metadata": {}, "source": [ "### The TOML configuration file\n", "\n", "```{literalinclude} modelA.toml\n", ":language: toml\n", "```" ] }, { "cell_type": "code", "execution_count": null, "id": "ccdc2e1e", "metadata": {}, "outputs": [], "source": [ "import rameau as rm\n", "import pandas as pd \n", "import matplotlib.pyplot as plt\n", "\n", "modelA = rm.Model.from_toml(\"modelA.toml\")\n", "simA = modelA.run_optimization()\n", "\n", "print(simA.get_opti_metrics('watertable'))" ] }, { "cell_type": "markdown", "id": "7d3099ea", "metadata": {}, "source": [ "## Simulation in the borehole B" ] }, { "cell_type": "markdown", "id": "6c7e1863", "metadata": {}, "source": [ "### The TOML configuration file\n", "\n", "```{literalinclude} modelB.toml\n", ":language: toml\n", "```" ] }, { "cell_type": "code", "execution_count": null, "id": "5b1eb613", "metadata": {}, "outputs": [], "source": [ "modelB = rm.Model.from_toml(\"modelB.toml\")\n", "simB = modelB.run_optimization()\n", "\n", "print(simB.get_opti_metrics('watertable'))" ] }, { "cell_type": "code", "execution_count": null, "id": "b04f4085", "metadata": {}, "outputs": [], "source": [ "# Get the watertable simulation from optimization A\n", "wtl_simA = simA.get_output(\"watertable\")\n", "\n", "# Get the watertable simulation from optimization B\n", "wtl_simB = simB.get_output(\"watertable\")\n", "\n", "# Get the watertable observation\n", "wtl_obsA = modelA.get_input(\"groundwaterobs\")\n", "\n", "# Get the watertable observation\n", "wtl_obsB = modelB.get_input(\"groundwaterobs\")\n", "\n", "# Plot watertable\n", "df = pd.DataFrame(\n", " {\n", " \"Obs A\":wtl_obsA.iloc[:, 0],\n", " \"Sim A\":wtl_simA.iloc[:, 0],\n", " \"Obs B\":wtl_obsB.iloc[:, 0],\n", " \"Sim B\":wtl_simB.iloc[:, 0],\n", " }\n", ")\n", "df.loc[\"1981-07-01\":].plot(\n", " grid=True,\n", " title=\"Simulated and observed groundwater levels\",\n", " ylabel=\"m NGF\",\n", " style=[\"b-\", \"r-\", \"b+\", \"r+\"]\n", ")\n", "plt.show() " ] } ], "metadata": { "kernelspec": { "display_name": "dev", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 5 }