• Aucun résultat trouvé

Using the airGRteaching R package for hydrology courses using lumped hydrological models

N/A
N/A
Protected

Academic year: 2021

Partager "Using the airGRteaching R package for hydrology courses using lumped hydrological models"

Copied!
2
0
0

Texte intégral

(1)

HAL Id: hal-02607859

https://hal.inrae.fr/hal-02607859

Submitted on 16 May 2020

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Using the airGRteaching R package for hydrology courses using lumped hydrological models

O. Delaigue, G. Thirel, L. Coron, P. Brigode

To cite this version:

O. Delaigue, G. Thirel, L. Coron, P. Brigode. Using the airGRteaching R package for hydrology courses using lumped hydrological models. EGU General Assembly 2018, Apr 2018, Vienna, Austria. pp.1, 2018. �hal-02607859�

(2)

Using the airGRteaching R package for hydrology courses

using lumped hydrological models

Olivier Delaigue

1

, Guillaume Thirel

1

, Laurent Coron

2

, Pierre Brigode

3

1

IRSTEA – Hydrology Research Group (HYCAR) – Antony, France

2

EDF – PMC Hydrometeorological Center – Toulouse, France

3

Nice-Sophia-Antipolis University – G´eoazur UMR 7329 – Sophia-Antipolis, France

air

teaching

airGRteaching (Delaigue et al., 2018) is an add-on package to the airGR package (Coron et al., 2017). It includes the GR rainfall-runoff models and the CemaNeige

snow melt and accumulation model. This package is easy to use and provides graphical devices to help students to explore data and analyse modelling results.

Why using airGRteaching for teaching hydrological modelling?

I It offers an interactive interface to showcase the rainfall-runoff model components

I It can be run with your own data

I It uses fast-running conceptual GR models (annual to hourly time steps)

I Free and open-source, available on all platforms (Linux, Mac OS & Windows)

airGRteaching functionalities

I very low programming skills needed

I only three functions to complete a hydrological modelling exercise:

. data preparation (requires few input variables)

. model calibration

. flow simulation

I plotting functions to help students to explore observed data and to interpret results:

. static graphs (’graphics’ package)

. interactive graphs (’dygraphs’ package)

. plot functions automatically recognize the airGRteaching objects

I a ’Shiny’ graphical interface for (only daily models available):

. displaying the impact of model parameters on hydrographs

. manual and automatic model calibration

. state variable visualisation

Getting started with the package

I Documentation available with the R command: vignette("airGRteaching")

I airGR Website: https://webgr.irstea.fr/en/airGR/

Download the airGRteaching package

I Freely available on the Comprehensive Archive Network:

https://CRAN.R-project.org/package=airGRteaching/

Effects of the different action buttons on the ’Shiny’ interface

Data preparation, calibration and simulation with the GR5J model (+ CemaNeige snow model)

library(airGRteaching, quietly = TRUE)

## data.frame of observed data

data(L0123002)

BasinObs2 <- BasinObs[, c("DatesR", "P", "E", "Qmm", "T")]

## Preparation of observed data for modelling

PREP <- PrepGR(ObsDF = BasinObs2, HydroModel = "GR5J", CemaNeige = TRUE,

ZInputs = median(BasinInfo$HypsoData), HypsoData = BasinInfo$HypsoData)

## Calibration step

CAL <- CalGR(PrepGR = PREP, CalCrit = "KGE", verbose = FALSE,

WupPer = NULL, CalPer = c("1990-01-01", "1993-12-31"))

## Plot the parameter values and the criterion during calibration

plot(CAL, which = "iter")

## Plot the time series of observed and simulated flows

plot(CAL, which = "ts", main = "Calibration step")

## Simulation step using the result of the automatic calibration method

SIM <- SimGR(PrepGR = PREP, CalGR = CAL, EffCrit = "NSE",

WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))

## Crit. NSE[Q] = 0.8376

## Plot giving an overview of the model outputs

plot(SIM) 1 0 20 60 100 450 500 550 600 X1

prod. store capacity [mm]

0 20 60 100 0.0 0.5 1.0 1.5 X2 intercatchment e xch. coef . [mm/d] 0 20 60 100 50 60 70 80 90 X3

routing store capacity [mm]

0 20 60 100 1.0 1.2 1.4 1.6 1.8 X4 UH time constant [d] 0 20 60 100 0.38 0.42 0.46 X5 intercatchment e xch. threshold [−] 0 20 60 100 0.70 0.80 0.90 C1 w eight f or sno wpack ther mal state [−] 0 20 60 100 2.0 2.5 3.0 3.5 C2 degree−da y melt coef . [mm/degC/d] 0 20 40 60 80 100 120 0.75 0.80 0.85 0.90 KGE

Evolution of parameters and efficiency criterion during the iterations of the steepest−descent step

library(airGRteaching, quietly = TRUE)

## data.frame of observed data

data(L0123002)

BasinObs2 <- BasinObs[, c("DatesR", "P", "E", "Qmm", "T")]

## Preparation of observed data for modelling

PREP <- PrepGR(ObsDF = BasinObs2, HydroModel = "GR5J", CemaNeige = TRUE,

ZInputs = median(BasinInfo$HypsoData), HypsoData = BasinInfo$HypsoData)

## Calibration step

CAL <- CalGR(PrepGR = PREP, CalCrit = "KGE", verbose = FALSE,

WupPer = NULL, CalPer = c("1990-01-01", "1993-12-31"))

## Plot the parameter values and the criterion during calibration

plot(CAL, which = "iter")

## Plot the time series of observed and simulated flows

plot(CAL, which = "ts", main = "Calibration step")

## Simulation step using the result of the automatic calibration method

SIM <- SimGR(PrepGR = PREP, CalGR = CAL, EffCrit = "NSE",

WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))

## Crit. NSE[Q] = 0.8376

## Plot giving an overview of the model outputs

plot(SIM)

1

library(airGRteaching, quietly = TRUE)

## data.frame of observed data

data(L0123002)

BasinObs2 <- BasinObs[, c("DatesR", "P", "E", "Qmm", "T")]

## Preparation of observed data for modelling

PREP <- PrepGR(ObsDF = BasinObs2, HydroModel = "GR5J", CemaNeige = TRUE,

ZInputs = median(BasinInfo$HypsoData), HypsoData = BasinInfo$HypsoData)

## Calibration step

CAL <- CalGR(PrepGR = PREP, CalCrit = "KGE", verbose = FALSE,

WupPer = NULL, CalPer = c("1990-01-01", "1993-12-31"))

## Plot the parameter values and the criterion during calibration

plot(CAL, which = "iter")

## Plot the time series of observed and simulated flows

plot(CAL, which = "ts", main = "Calibration step")

## Simulation step using the result of the automatic calibration method

SIM <- SimGR(PrepGR = PREP, CalGR = CAL, EffCrit = "NSE",

WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))

## Crit. NSE[Q] = 0.8376

## Plot giving an overview of the model outputs

plot(SIM) 1 70 30 precip . [mm/d] solid liquid 01/1994 01/1995 01/1996 01/1997 01/1998 −10 0 10 20 temp . [ ° C] mean layers 01/1994 01/1995 01/1996 01/1997 01/1998 0 400 800 1200 sno w pack [mm] mean layers 01/1994 01/1995 01/1996 01/1997 01/1998 0 5 10 15 20 flo w [mm/d] 01/1994 01/1995 01/1996 01/1997 01/1998 observed simulated 150 0

Jan Mar May Jul Sep Nov

0

150

30−days rolling mean

precip . & flo w regime [mm/month] 0 0.2 0.4 0.6 0.8 1 non−exceedance prob. [−] 0.5 2 5 flo w [mm/d] observed simulated log scale 0.5 1 2 5 10 0.5 2 5 observed flow [mm/d] sim ulated flo w [mm/d] log scale

’Model diagram’ & ’State variables’ panels of the ’Shiny’ interface

Future developments

I Additional models in the ’Shiny’ interface (GR2M & GR4H)

I New plots to visualize snow simulation in the ’Shiny’ interface

References

I Coron, L., Thirel, G., Delaigue, O., Perrin, C. & Andr´eassian, V. (2017). The suite of lumped GR hydrological models in an R package. Environmental Modelling & Software 94, 166–171. DOI: 10.1016/j.envsoft.2017.05.002.

I Delaigue, O., Coron, L. & Brigode, P. (2018). airGRteaching: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models (’Shiny’ Interface Included). R package version 0.2.2.2. URL:

https://webgr.irstea.fr/en/airGR/.

I Delaigue, O., Thirel, G., Coron, L. & Brigode, P. (under review). airGR and airGRteaching: two open-source tools for rainfall-runoff modeling and teaching hydrology. HIC2018 proceedings, 13th International conference of Hydroinformatics, July 2018, Palermo, Italy.

National Research Institute of Science and Technology

for Environment and Agriculture HYDR

O

Références

Documents relatifs

L’activité d’écriture fait donc intervenir à la fois la mémoire à long terme (pour activer des connaissances sur les textes), la mémoire de travail à long terme (pour tenir

Keywords Hydrological modelling, Sahel, land cover, demographic model, soil water holding capacity, environmental

Despite the varying environmental and climatic conditions of the West African Sahel, we show that it is possible to increase the performance of the GR2M model simulations by

To make external solvers easily available to all users, independently of their platform or processing power, we have made available at Irill a solver farm that can be used in the

Combining our different maps, we can summarize the state of the art in the calmodulin field, the six publications to read for the beginners in the field and the putative trends

ConR (1) calculates key geographic range parameters (AOO and EOO) and estimates the number of locations sensu IUCN needed for an assessment under criterion B; (2) uses

Algorithms from and for Nature and Life: Classification and Data Analysis, chapter Clustering Ordinal Data via Latent Variable Models, pages 127–135. Springer International

The vignette discuss the detailed biological/clinical analysis strategy used at Institut Curie and presents an application to a gene expression