Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Oscar Corvi
LEAVE_II
Commits
5c1c14ac
Commit
5c1c14ac
authored
Jul 16, 2021
by
Oscar Corvi
Browse files
true number of run in simpler_model.ipynb
parent
d575c97f
Pipeline
#230909
passed with stage
in 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
notebooks/Finished_project/simpler_model/simpler_model.ipynb
View file @
5c1c14ac
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "
thrown-remainder
",
"id": "
stable-fields
",
"metadata": {},
"source": [
"# **Location of the stress factor in potential evapo-transpiration models**"
...
...
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
"id": "
growing-least
",
"id": "
respective-above
",
"metadata": {
"slideshow": {
"slide_type": "slide"
...
...
@@ -62,7 +62,7 @@
},
{
"cell_type": "markdown",
"id": "
removed-former
",
"id": "
thousand-account
",
"metadata": {},
"source": [
"# Part II - Functions set up"
...
...
@@ -70,7 +70,7 @@
},
{
"cell_type": "markdown",
"id": "
expressed-party
",
"id": "
female-rapid
",
"metadata": {},
"source": [
"## Importing relevant packages"
...
...
@@ -79,7 +79,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "p
eaceful-orange
",
"id": "p
ointed-planning
",
"metadata": {},
"outputs": [
{
...
...
@@ -145,7 +145,7 @@
},
{
"cell_type": "markdown",
"id": "
transsexual-prison
",
"id": "
relative-material
",
"metadata": {},
"source": [
"## Path of the different files (pre-defined python functions, sympy equations, sympy variables)"
...
...
@@ -154,7 +154,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "
oriental-trai
l",
"id": "
alpine-musica
l",
"metadata": {
"tags": [
"parameters"
...
...
@@ -185,7 +185,7 @@
},
{
"cell_type": "markdown",
"id": "
imported-domestic
",
"id": "
dedicated-bookmark
",
"metadata": {},
"source": [
"## Importing the sympy variables and equations defined in the theory.ipynb notebook"
...
...
@@ -194,7 +194,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "
czech-indianapolis
",
"id": "
growing-subject
",
"metadata": {},
"outputs": [
{
...
...
@@ -291,7 +291,7 @@
},
{
"cell_type": "markdown",
"id": "
dominant-genealogy
",
"id": "
arranged-personal
",
"metadata": {},
"source": [
"## Importing the performance assessment functions defined in the analysis_function.py file"
...
...
@@ -300,7 +300,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "
distinguished-penny
",
"id": "
powerful-encounter
",
"metadata": {},
"outputs": [
{
...
...
@@ -350,7 +350,7 @@
},
{
"cell_type": "markdown",
"id": "
identical-portugues
e",
"id": "
funky-tribut
e",
"metadata": {},
"source": [
"## Data import, preprocess and shape for the computations"
...
...
@@ -358,7 +358,7 @@
},
{
"cell_type": "markdown",
"id": "
fallen-juvenile
",
"id": "
disabled-month
",
"metadata": {},
"source": [
"### Get the different files where data are stored\n",
...
...
@@ -369,7 +369,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "
mediterranean-reading
",
"id": "
orange-quilt
",
"metadata": {},
"outputs": [
{
...
...
@@ -399,7 +399,7 @@
},
{
"cell_type": "markdown",
"id": "
bacterial-storage
",
"id": "
owned-chosen
",
"metadata": {},
"source": [
"### Define and test a function that process the fPAR data\n",
...
...
@@ -409,7 +409,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "
following-patrick
",
"id": "
blind-worth
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -448,7 +448,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "s
erious-ocea
n",
"id": "s
wedish-burde
n",
"metadata": {},
"outputs": [
{
...
...
@@ -574,7 +574,7 @@
},
{
"cell_type": "markdown",
"id": "
powerful-degree
",
"id": "
familiar-shannon
",
"metadata": {},
"source": [
"### fPARSet function\n",
...
...
@@ -584,7 +584,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "
opposite-installation
",
"id": "
rotary-candy
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -615,7 +615,7 @@
},
{
"cell_type": "markdown",
"id": "
usual-malawi
",
"id": "
analyzed-festival
",
"metadata": {},
"source": [
"### DataChose function\n",
...
...
@@ -636,7 +636,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "
incident-fraction
",
"id": "
approved-belgium
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -729,7 +729,7 @@
},
{
"cell_type": "markdown",
"id": "
second-drink
",
"id": "
interested-cliff
",
"metadata": {},
"source": [
"## Compile the different functions defined in the symbolic domain\n",
...
...
@@ -738,7 +738,7 @@
},
{
"cell_type": "markdown",
"id": "
assisted-complement
",
"id": "
governmental-spine
",
"metadata": {},
"source": [
"### Water stress functions"
...
...
@@ -747,7 +747,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "
ancient-party
",
"id": "
comprehensive-asset
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -768,7 +768,7 @@
},
{
"cell_type": "markdown",
"id": "
forward-gauge
",
"id": "
loving-sherman
",
"metadata": {},
"source": [
"### Soil water potential"
...
...
@@ -777,7 +777,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "
south-maker
",
"id": "
comic-barrel
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -793,7 +793,7 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "c
omplex-minneapolis
",
"id": "c
apital-processing
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -810,7 +810,7 @@
},
{
"cell_type": "markdown",
"id": "
brown-convertibl
e",
"id": "
lucky-adelaid
e",
"metadata": {},
"source": [
"### Penman-Monteith"
...
...
@@ -819,7 +819,7 @@
{
"cell_type": "code",
"execution_count": 13,
"id": "
recovered-diabetes
",
"id": "
funded-mount
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -838,7 +838,7 @@
{
"cell_type": "code",
"execution_count": 14,
"id": "
legendary-archives
",
"id": "
whole-velvet
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -866,7 +866,7 @@
{
"cell_type": "code",
"execution_count": 15,
"id": "
engaging-pontiac
",
"id": "
attempted-theme
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -888,7 +888,7 @@
{
"cell_type": "code",
"execution_count": 16,
"id": "
surrounded-budget
",
"id": "
metropolitan-iraqi
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -910,7 +910,7 @@
{
"cell_type": "code",
"execution_count": 17,
"id": "
entire-channel
",
"id": "
binding-oakland
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -932,7 +932,7 @@
{
"cell_type": "code",
"execution_count": 18,
"id": "
dependent-intersection
",
"id": "
fleet-saint
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -960,7 +960,7 @@
{
"cell_type": "code",
"execution_count": 19,
"id": "
declared-major
",
"id": "
breathing-gateway
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -991,7 +991,7 @@
{
"cell_type": "code",
"execution_count": 20,
"id": "
faced-atmosphere
",
"id": "
extra-celebration
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1020,7 +1020,7 @@
{
"cell_type": "code",
"execution_count": 21,
"id": "
general-still
",
"id": "
outdoor-oliver
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1054,7 +1054,7 @@
{
"cell_type": "code",
"execution_count": 22,
"id": "
composed-boundary
",
"id": "
advised-partner
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1077,7 +1077,7 @@
{
"cell_type": "code",
"execution_count": 23,
"id": "l
ined-pupp
y",
"id": "l
esser-centur
y",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1095,7 +1095,7 @@
},
{
"cell_type": "markdown",
"id": "
outstanding-accident
",
"id": "
assisted-furniture
",
"metadata": {},
"source": [
"### Assign the different compiled functions to variables functions (create the functions in python)"
...
...
@@ -1104,7 +1104,7 @@
{
"cell_type": "code",
"execution_count": 24,
"id": "
oriented-greensboro
",
"id": "
respected-ballot
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1132,7 +1132,7 @@
{
"cell_type": "code",
"execution_count": 25,
"id": "
heard-terrorism
",
"id": "
dramatic-integral
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1161,7 +1161,7 @@
},
{
"cell_type": "markdown",
"id": "
ancient-astronomy
",
"id": "
progressive-child
",
"metadata": {},
"source": [
"## Functions to run the different models\n",
...
...
@@ -1170,7 +1170,7 @@
},
{
"cell_type": "markdown",
"id": "i
nfectious-brook
",
"id": "i
mperial-midwest
",
"metadata": {},
"source": [
"### Varying surface resistance model"
...
...
@@ -1179,7 +1179,7 @@
{
"cell_type": "code",
"execution_count": 26,
"id": "
drawn-sheriff
",
"id": "
visible-silicon
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1242,7 +1242,7 @@
},
{
"cell_type": "markdown",
"id": "
continued-examination
",
"id": "
still-colonial
",
"metadata": {},
"source": [
"### Constant surface conductance model"
...
...
@@ -1251,7 +1251,7 @@
{
"cell_type": "code",
"execution_count": 27,
"id": "
white-therap
y",
"id": "
macro-energ
y",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1315,7 +1315,7 @@
},
{
"cell_type": "markdown",
"id": "
expensive-tract
",
"id": "
tight-comedy
",
"metadata": {},
"source": [
"### Benchmark Penman-Monteith model"
...
...
@@ -1324,7 +1324,7 @@
{
"cell_type": "code",
"execution_count": 28,
"id": "
historical-vocabulary
",
"id": "
cubic-naples
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1384,7 +1384,7 @@
{
"cell_type": "code",
"execution_count": 29,
"id": "
derived-regression
",
"id": "
attached-confidence
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1443,7 +1443,7 @@
},
{
"cell_type": "markdown",
"id": "
scientific-vancouver
",
"id": "
worth-fossil
",
"metadata": {},
"source": [
"### Modified version of the PM equation\n",
...
...
@@ -1459,7 +1459,7 @@
{
"cell_type": "code",
"execution_count": 30,
"id": "
handed-devi
ce
s
",
"id": "
regulation-performan
ce",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1523,7 +1523,7 @@
{
"cell_type": "code",
"execution_count": 31,
"id": "e
arly-passion
",
"id": "e
ngaged-chick
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1587,7 +1587,7 @@
},
{
"cell_type": "markdown",
"id": "
champion-criterion
",
"id": "
third-growth
",
"metadata": {},
"source": [
"### Priestley and Taylor model"
...
...
@@ -1596,7 +1596,7 @@
{
"cell_type": "code",
"execution_count": 32,
"id": "
lyric-pres
ent
at
ion",
"id": "
conv
ention
al-spider
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1652,7 +1652,7 @@
{
"cell_type": "code",
"execution_count": 33,
"id": "
identified-stock
",
"id": "
raised-theater
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1707,7 +1707,7 @@
},
{
"cell_type": "markdown",
"id": "
fourth-suspension
",
"id": "
affiliated-amino
",
"metadata": {},
"source": [
"### Inverse modelling\n",
...
...
@@ -1717,7 +1717,7 @@
{
"cell_type": "code",
"execution_count": 34,
"id": "
objective-nursery
",
"id": "
spare-height
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1771,7 +1771,7 @@
},
{
"cell_type": "markdown",
"id": "
simple-consequence
",
"id": "
centered-writing
",
"metadata": {},
"source": [
"## Calibration algorithm"
...
...
@@ -1780,7 +1780,7 @@
{
"cell_type": "code",
"execution_count": 35,
"id": "
aggregate-while
",
"id": "
modern-faith
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1802,7 +1802,7 @@
{
"cell_type": "code",
"execution_count": 36,
"id": "
elementary-reply
",
"id": "
another-moisture
",
"metadata": {
"jupyter": {
"source_hidden": true
...
...
@@ -1937,7 +1937,7 @@
},
{
"cell_type": "markdown",
"id": "
registered-newark
",
"id": "
vocal-renaissance
",
"metadata": {},
"source": [
"Use the global optimizer from the `scipy.optimize` package. Minimize the squared residual :\n",
...
...
@@ -1949,7 +1949,7 @@
{
"cell_type": "code",
"execution_count": 37,
"id": "
indian-sequence
",
"id": "
wanted-tyler
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -1968,7 +1968,7 @@
},
{
"cell_type": "markdown",
"id": "a
ggregate-penalty
",
"id": "a
ccepted-breath
",
"metadata": {},
"source": [
"# Part III - Experiments"
...
...
@@ -1976,7 +1976,7 @@
},
{
"cell_type": "markdown",
"id": "
quarterly-works
",
"id": "
needed-denial
",
"metadata": {},
"source": [
"## One site, one year\n",
...
...
@@ -1986,7 +1986,7 @@
{
"cell_type": "code",
"execution_count": 38,
"id": "
greater-scottish
",
"id": "
chicken-lyric
",
"metadata": {},
"outputs": [
{
...
...
@@ -10673,7 +10673,7 @@
{
"cell_type": "code",
"execution_count": 39,
"id": "
collect-python
",
"id": "
greater-better
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -10683,7 +10683,7 @@
},
{
"cell_type": "markdown",
"id": "
smaller-shield
",
"id": "
developmental-posting
",
"metadata": {},
"source": [
"### Calibrate all the models using the optimized function defined above"
...
...
@@ -10692,7 +10692,7 @@
{
"cell_type": "code",
"execution_count": 40,
"id": "
daily-singing
",
"id": "
electronic-bundle
",
"metadata": {},
"outputs": [
{
...
...
@@ -10714,7 +10714,7 @@
},
{
"cell_type": "markdown",
"id": "
comparative-decimal
",
"id": "
intermediate-mobile
",
"metadata": {},
"source": [
"### Compute the model results with the optimimum parameters"
...
...
@@ -10723,7 +10723,7 @@
{
"cell_type": "code",
"execution_count": 41,
"id": "re
movable-spice
",
"id": "
g
re
at-biography
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -10739,7 +10739,7 @@
},
{
"cell_type": "markdown",
"id": "or
ganizational-european
",
"id": "
p
or
table-andrews
",
"metadata": {},
"source": [
"### Aggregate the results in a single matrix"
...
...
@@ -10748,7 +10748,7 @@
{
"cell_type": "code",
"execution_count": 42,
"id": "
loaded-fundamental
",
"id": "
assumed-finnish
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -10791,7 +10791,7 @@
},
{
"cell_type": "markdown",
"id": "
first-disorder
",
"id": "
distributed-accused
",
"metadata": {},
"source": [
"### Plot the time serie"
...
...
@@ -10800,7 +10800,7 @@
{
"cell_type": "code",
"execution_count": 43,
"id": "
secret-surgeon
",
"id": "
republican-triple
",
"metadata": {
"slideshow": {
"slide_type": "slide"
...
...
@@ -10898,7 +10898,7 @@
},
{
"cell_type": "markdown",
"id": "
periodic-minnesota
",
"id": "
guilty-bathroom
",
"metadata": {},
"source": [
"### Compute the model performance \n",
...
...
@@ -10908,7 +10908,7 @@
{
"cell_type": "code",
"execution_count": 44,
"id": "
moderate-edgar
",
"id": "
representative-brighton
",
"metadata": {},