User Tools

Site Tools


start:hype_tutorials:automatic_calibration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
start:hype_tutorials:automatic_calibration [2019/01/09 13:14]
cpers [Introduction]
start:hype_tutorials:automatic_calibration [2024/01/25 11:37] (current)
Line 23: Line 23:
 Generally speaking, the purpose of the [[start:​HYPE_file_reference:​info.txt|info.txt]] is to govern the simulation. Most of the content of the file is the same as for an ordinary simulation. The following file content is relevant for automatic calibration:​ Generally speaking, the purpose of the [[start:​HYPE_file_reference:​info.txt|info.txt]] is to govern the simulation. Most of the content of the file is the same as for an ordinary simulation. The following file content is relevant for automatic calibration:​
   * The flag ''​Y''​ must be passed to the model by the code ''​calibration''​ to turn on automatic calibration (red arrow in Fig 1).   * The flag ''​Y''​ must be passed to the model by the code ''​calibration''​ to turn on automatic calibration (red arrow in Fig 1).
-  * An objective function must be specified by means of the performance criteria it is composed of. Such a composite criterion, are constructed by linear combination of the already implemented,​ performance criteria, like: <m> c=w_1*c_1+ w_2*c_2++ w_N*c_N </​m>​ +  * An objective function must be specified by means of the performance criteria it is composed of. Such a composite criterion, are constructed by linear combination of the already implemented,​ performance criteria, like: <m> c=w_1*c_1+ w_2*c_2+ ​... + w_N*c_N </​m>​ 
-where <m> c_1,c_2,,c_N </m> are predefined performance criteria, and <m> w_1,w_2,,w_N </m> are relative weighting factors. The available performance criteria and their id are [[start:​hype_file_reference:​info.txt:​criteria|listed here]]. The criterion id, the [[start:​hype_file_reference:​info.txt:​variables|HYPE variable ID]] of the computed and recorded variables to compare, as well as the period over which the variables are averaged before calculating the criterion, is specified for each performance criterion to be included in the objective function (see the block of data marked in red and green in Fig 1). For details on format see the description of [[start:​hype_file_reference:​info.txt#​performance_criteria_options|the info-file]]. ​+where <m> c_1,​c_2, ​... ,c_N </m> are predefined performance criteria, and <m> w_1,​w_2, ​... ,w_N </m> are relative weighting factors. The available performance criteria and their id are [[start:​hype_file_reference:​info.txt:​criteria|listed here]]. The criterion id, the [[start:​hype_file_reference:​info.txt:​variables|HYPE variable ID]] of the computed and recorded variables to compare, as well as the period over which the variables are averaged before calculating the criterion, is specified for each performance criterion to be included in the objective function (see the block of data marked in red and green in Fig 1). For details on format see the description of [[start:​hype_file_reference:​info.txt#​performance_criteria_options|the info-file]]. ​
  
 In the example of Fig 1 the Nash-Sutcliffe efficiency (''​MR2''​) and relative error (''​MRE''​) are calculated for daily discharge (''​cout''​ and ''​rout''​ are compared on ''​meanperiod 1''​). The two criteria are weighted together. Most weight is put on MR2 and a little on the volume error. A small weight on relative error is usually enough to minimize the volume error but still get a good NSE. In the example all observations found in Qobs.txt are used to calculate the objective function. If more than one station is found, the MR2 criterion will use the average of each station’s NSE. In the example of Fig 1 the Nash-Sutcliffe efficiency (''​MR2''​) and relative error (''​MRE''​) are calculated for daily discharge (''​cout''​ and ''​rout''​ are compared on ''​meanperiod 1''​). The two criteria are weighted together. Most weight is put on MR2 and a little on the volume error. A small weight on relative error is usually enough to minimize the volume error but still get a good NSE. In the example all observations found in Qobs.txt are used to calculate the objective function. If more than one station is found, the MR2 criterion will use the average of each station’s NSE.
Line 175: Line 175:
 |Figure 10: Example of optpar.txt file for the quasi-Newton method| |Figure 10: Example of optpar.txt file for the quasi-Newton method|
  
-The quasi-Newton methods optimise all parameters at the same time. The parameter set is optimized with the line search ​routine starting from the point of the current best parameters. The direction of the search ​is determined by the gradient ​of the criteria surface at this point. The gradient can be estimated in three different ways in HYPE, the two quasi-Newton methods described in this section and the one called steepest descent in the next section. The optimization continues until one of several interruption criteria is fulfilled.+The quasi-Newton methods optimise all parameters at the same time. The direction of the search ​is determined by the gradient of the criteria surface at the point of the current best parameters. The parameter set is optimized with the line search ​routine along the line determined by the gradient. The gradient can be estimated in three different ways in HYPE, the two quasi-Newton methods described in this section and the one called steepest descent in the next section. The optimization continues until one of several interruption criteria is fulfilled.
  
 Calculating the gradient for the quasi-Newton method involves updating the inverse Hessian matrix. This can be done by two methods, both described in Nocedal and Wright (2006). Task Q1 uses the DFP (Davidon-Fletcher-Powell) method and task Q2 uses the BFGS (Broyden-Fletcher-Goldfarb-Shanno) method. Calculating the gradient for the quasi-Newton method involves updating the inverse Hessian matrix. This can be done by two methods, both described in Nocedal and Wright (2006). Task Q1 uses the DFP (Davidon-Fletcher-Powell) method and task Q2 uses the BFGS (Broyden-Fletcher-Goldfarb-Shanno) method.
start/hype_tutorials/automatic_calibration.1547036040.txt.gz · Last modified: 2023/11/16 14:28 (external edit)