Package Package airGR airGR License License GPL 2 GPL 2

1 Introduction

1.1 Scope

The Michel’s calibration strategy (Calibration_Michel() function) is the calibration algorithm proposed in airGR. However, other optimization methods can be used in combination with airGR. We show here how to use different R packages to perform parameter estimation.

In this page, we use the GR4J model to illustrate the different optimization strategies. In particular, we assume that the R global environment contains input climate data, observed discharge and functions from the Get Started page, as shown below. Please note that the calibration period is defined in the CreateRunOptions() function .

Regarding the different optimization strategies presented here, we refer to each package for in-depth information about the description of the methods used.

Please note that this page is only for illustration purposes and does not provide any guidance about which optimization strategies is recommended for the family of the GR models.

1.2 Definition of the necessary function

Parameter estimation can be performed by defining a function that takes a parameter set as input and returns the value of the performance criterion. There are two important steps: the transformation of parameters to real space and the computation of the value of the performance criterion. Here we choose to minimize the root mean square error.

The change of the repository from the “real” parameter space to a “transformed” space ensures homogeneity of displacement in the different dimensions of the parameter space during the step-by-step procedure of the calibration algorithm of the model.

In addition, we need to define the lower and upper bounds of the four GR4J parameters in the transformed parameter space:

2 Local optimization

We start with a local optimization strategy by using the PORT routines (using the nlminb() of the stats package) and by setting a starting point in the transformed parameter space:

The RMSE value reaches a local minimum value after 35 iterations.

We can also try a multi-start approach to test the consistency of the local optimization. Here we use the same grid used for the filtering step of the Michel’s calibration strategy (Calibration_Michel() function). For each starting point, a local optimization is performed.

We can then extract the best parameter sets and the value of the performance criteria:

As can be seen below, the optimum performance criterion values (column objective) can differ from the global optimum value in many cases, resulting in various parameter sets.

##        X1             X2              X3              X4       
##  Min.   :5.55   Min.   :0.124   Min.   :-0.04   Min.   :-8.24  
##  1st Qu.:5.55   1st Qu.:0.124   1st Qu.: 0.00   1st Qu.:-8.24  
##  Median :5.55   Median :0.887   Median : 4.48   Median :-8.24  
##  Mean   :5.68   Mean   :0.632   Mean   : 2.98   Mean   :-5.82  
##  3rd Qu.:5.95   3rd Qu.:0.887   3rd Qu.: 4.48   3rd Qu.:-1.97  
##  Max.   :5.95   Max.   :0.887   Max.   : 4.48   Max.   : 0.01  
##       RMSE      
##  Min.   :0.786  
##  1st Qu.:0.786  
##  Median :0.786  
##  Mean   :0.922  
##  3rd Qu.:1.163  
##  Max.   :1.223

The existence of several local minima illustrates the importance of defining an appropriate starting point or of using a multi-start strategy or a global optimization strategy.

4 Results

As it can be seen in the table below, the four additional optimization strategies tested lead to very close optima.

##    Algo  X1   X2   X3   X4
## 1 airGR 257 1.01 88.2 2.21
## 2  PORT 257 1.01 88.1 2.21
## 3    DE 257 1.01 88.1 2.21
## 4   PSO 257 1.01 88.1 2.21
## 5 MA-LS 257 1.01 88.1 2.21