{ "cells": [ { "metadata": {}, "cell_type": "markdown", "source": [ "# Exercise 3: Update a `gwrefpy`model with new data\n", "\n", "This notebook introduces how to create and fit a simple `gwrefpy` model. \n", "\n", "This notebook can be downloaded from the source code [here](https://github.com/andersretznerSGU/gwrefpy/blob/main/docs/tutorial/exercises/1_exerciese1.ipynb).\n", "\n", "```{warning}\n", "This exercise is not completed yet.\n", "```" ], "id": "da019a3e0a3820ec" }, { "metadata": {}, "cell_type": "markdown", "source": "## 1. Import the gwrefpy package", "id": "402830e86ed13f04" }, { "cell_type": "code", "execution_count": null, "id": "initial_id", "metadata": { "collapsed": true }, "outputs": [], "source": [ "import gwrefpy as gr\n", "import numpy as np\n", "import pandas as pd" ] }, { "metadata": {}, "cell_type": "markdown", "source": "## 2. Create some sample data", "id": "74d8f6918785d91d" }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": [ "# Create some example data\n", "n_days = 100\n", "dates = pd.date_range(\"2020-01-01\", periods=n_days, freq=\"D\")\n", "\n", "# Observed and reference values with some noise\n", "values_obs1 = ( 25.75 + 0.7 * np.sin(np.linspace(0, 4 * np.pi, n_days)) + np.random.normal(0, 0.1, n_days))\n", "values_obs1 = pd.Series(values_obs1, index=dates)\n", "values_ref1 = (18.75 + 0.3 * np.sin(np.linspace(0, 4 * np.pi, n_days)) + np.random.normal(0, 0.05, n_days))\n", "values_ref1 = pd.Series(values_ref1, index=dates)" ], "id": "ed232a2ee85d4dbd" }, { "metadata": {}, "cell_type": "markdown", "source": "## 3. Create a Well objects", "id": "30c4c7cf4957476c" }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": "# Create your well objects here", "id": "de002510d9d1a6d1" }, { "metadata": {}, "cell_type": "markdown", "source": "## 4. Create a Model object", "id": "428ed7f690f31e80" }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": "# Create your model object here", "id": "7eb7bf69b43128c5" }, { "metadata": {}, "cell_type": "markdown", "source": "## 5. Fit the model", "id": "9638b4e81e91cb57" }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": "# Perform the model fitting here", "id": "b21ff8970a3bed8c" }, { "metadata": {}, "cell_type": "markdown", "source": "## 6. Plot the results", "id": "2411337ab0ebf279" }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": "# Plot the results here", "id": "bbad3bade29c6b91" } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 5 }