Skip to content

Commit

Permalink
Update Master to Pastas 1.2 (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulcollenteur committed Aug 17, 2023
2 parents 5424a28 + 1906713 commit f0df7e1
Show file tree
Hide file tree
Showing 22 changed files with 1,419 additions and 419 deletions.
1 change: 1 addition & 0 deletions doc/api/index.rst
Expand Up @@ -18,6 +18,7 @@ left-hand menu you will find the different categories of the API documentation.
rfunc
recharge
solver
objective_functions
modelplots.Plotting
modelcompare.CompareModels
timeseries.TimeSeries
Expand Down
8 changes: 4 additions & 4 deletions doc/benchmarks/noisemodel.ipynb

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions doc/conf.py
Expand Up @@ -35,8 +35,8 @@
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"IPython.sphinxext.ipython_console_highlighting", # lowercase didn't work
"nbsphinx",
"numpydoc",
"myst_nb",
"sphinxcontrib.bibtex",
"sphinx_design",
"sphinx.ext.autosectionlabel",
Expand All @@ -52,7 +52,7 @@

# General information about the project.
project = "Pastas"
copyright = "{}, R.A. Collenteur, M. Bakker, R. Calje, F. Schaars".format(year)
copyright = "{}, The Pastas Team".format(year)
author = "R.A. Collenteur, M. Bakker, R. Calje, F. Schaars"

# The version.
Expand Down Expand Up @@ -170,7 +170,7 @@
"matplotlib": ("https://matplotlib.org/stable", None),
}

# -- nbsphinx options---------- -------------------------------------------------------
# -- myst_nb options ------------------------------------------------------------------

nbsphinx_allow_errors = True # Allow errors in notebooks, to see the error online
nbsphinx_execute = "auto"
nb_execution_allow_errors = True # Allow errors in notebooks, to see the error online
nb_execution_mode = "auto"
42 changes: 21 additions & 21 deletions doc/examples/index.rst
Expand Up @@ -45,11 +45,11 @@ Basics

`Modeling with different timesteps`_

.. _Preprocessing user-provided time series: prepare_timeseries.ipynb
.. _A basic model: basic_model.ipynb
.. _Fixating parameters while fitting: fix_parameters.ipynb
.. _Calibration: calibration_options.ipynb
.. _Modeling with different timesteps: modeling_timestep.ipynb
.. _Preprocessing user-provided time series: prepare_timeseries.html
.. _A basic model: basic_model.html
.. _Fixating parameters while fitting: fix_parameters.html
.. _Calibration: calibration_options.html
.. _Modeling with different timesteps: modeling_timestep.html

Stressmodels
------------
Expand All @@ -64,11 +64,11 @@ Stressmodels

`Changing response functions`_

.. _Adding surface water levels: adding_rivers.ipynb
.. _Adding pumping wells: adding_wells.ipynb
.. _Adding multiple wells: multiple_wells.ipynb
.. _Adding trends: adding_trends.ipynb
.. _Changing response functions: changing_responses.ipynb
.. _Adding surface water levels: adding_rivers.html
.. _Adding pumping wells: adding_wells.html
.. _Adding multiple wells: multiple_wells.html
.. _Adding trends: adding_trends.html
.. _Changing response functions: changing_responses.html

Non-linear (Recharge) Models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -81,10 +81,10 @@ Non-linear (Recharge) Models

`Modeling snow`_

.. _Threshold non-linearities: threshold_non_linear.ipynb
.. _Non-linear recharge models: non_linear_recharge.ipynb
.. _Estimating recharge: recharge_estimation.ipynb
.. _Modeling snow: snowmodel.ipynb
.. _Threshold non-linearities: threshold_non_linear.html
.. _Non-linear recharge models: non_linear_recharge.html
.. _Estimating recharge: recharge_estimation.html
.. _Modeling snow: snowmodel.html


Model Evaluation
Expand All @@ -100,11 +100,11 @@ Model Evaluation

`MCMC uncertainty`_

.. _Comparing models visually: comparing_models.ipynb
.. _Diagnostic checking: diagnostic_checking.ipynb
.. _`Reducing autocorrelation`: timestep_analysis.ipynb
.. _Uncertainty quantification: uncertainty.ipynb
.. _MCMC uncertainty: uncertainty_emcee.ipynb
.. _Comparing models visually: comparing_models.html
.. _Diagnostic checking: diagnostic_checking.html
.. _`Reducing autocorrelation`: timestep_analysis.html
.. _Uncertainty quantification: uncertainty.html
.. _MCMC uncertainty: uncertainty_emcee.html


Applications
Expand All @@ -114,8 +114,8 @@ Applications

`Groundwater signatures`_

.. _Standardized Groundwater Index: standardized_groundwater_index.ipynb
.. _Groundwater signatures: signatures.ipynb
.. _Standardized Groundwater Index: standardized_groundwater_index.html
.. _Groundwater signatures: signatures.html


STOWA Manual (Dutch only)
Expand Down
63 changes: 35 additions & 28 deletions doc/examples/multiple_wells.ipynb
Expand Up @@ -28,6 +28,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -68,6 +69,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -95,6 +97,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -119,6 +122,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -138,6 +142,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -159,6 +164,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -176,6 +182,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -208,6 +215,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -226,6 +234,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -242,6 +251,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -252,15 +262,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"metadata": {},
"outputs": [],
"source": [
"ml.plots.decomposition();"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -282,6 +291,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -303,6 +313,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -321,11 +332,12 @@
"metadata": {},
"outputs": [],
"source": [
"w = ps.WellModel(list(extraction_ts.values()), \"Wells\", distances)\n",
"w = ps.WellModel(list(extraction_ts.values()), \"WellModel\", distances)\n",
"ml_wm.add_stressmodel(w)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -344,6 +356,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -361,6 +374,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -373,10 +387,11 @@
"metadata": {},
"outputs": [],
"source": [
"ml_wm.plots.stacked_results(figsize=(10, 8));"
"ml_wm.plots.stacked_results(figsize=(10, 8), stacklegend=True);"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -391,9 +406,9 @@
"metadata": {},
"outputs": [],
"source": [
"wm = ml_wm.stressmodels[\"Wells\"]\n",
"wm = ml_wm.stressmodels[\"WellModel\"]\n",
"for i, name in enumerate(relevant_extractions.keys()):\n",
" # get parameters\n",
" # get parameters (note use of stressmodel for this)\n",
" p = wm.get_parameters(model=ml_wm, istress=i)\n",
" # calculate gain\n",
" gain = wm.rfunc.gain(p) * 1e6 / 365.25\n",
Expand All @@ -403,6 +418,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -449,13 +465,15 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Compare individual StressModels and WellModel"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -472,6 +490,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -489,7 +508,7 @@
"ml_wm.name = \"WellModel\"\n",
"\n",
"# plot well stresses together on same plot:\n",
"smdict = {0: [\"Recharge\"], 1: [\"Extraction_2\", \"Extraction_3\", \"Wells\"]}\n",
"smdict = {0: [\"Recharge\"], 1: [\"Extraction_2\", \"Extraction_3\", \"WellModel\"]}\n",
"\n",
"# comparison plot\n",
"mc = ps.CompareModels([ml, ml_wm])\n",
Expand All @@ -503,30 +522,18 @@
")\n",
"mc.axes[\"con1\"].legend(loc=(0, 1), frameon=False, ncol=4);"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.9.7"
},
"vscode": {
"interpreter": {
"hash": "dace5e1b41a98a8e52d2a8eebc3b981caf2c12e7a76736ebfb89a489e3b62e79"
}
"name": "python"
}
},
"nbformat": 4,
Expand Down

0 comments on commit f0df7e1

Please sign in to comment.