5.13.2-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_mrm_objective_function_runoff Module Reference

Objective Functions for Optimization of mHM/mRM against runoff. More...

Functions/Subroutines

real(dp) function, public single_objective_runoff (parameterset, eval, arg1, arg2, arg3)
 Wrapper for objective functions optimizing agains runoff.
 
real(dp) function, public single_objective_runoff_master (parameterset, eval, arg1, arg2, arg3)
 Wrapper for objective functions optimizing agains runoff.
 
subroutine, public single_objective_runoff_subprocess (eval, arg1, arg2, arg3)
 Wrapper for objective functions optimizing agains runoff.
 
subroutine, public multi_objective_runoff (parameterset, eval, multi_objectives)
 Wrapper for multi-objective functions where at least one is regarding runoff.
 
real(dp) function loglikelihood_stddev (parameterset, eval, stddev, stddev_new, likeli_new)
 Logarithmic likelihood function with removed linear trend and Lag(1)-autocorrelation.
 
real(dp) function loglikelihood_evin2013_2 (parameterset, eval, regularize)
 Logarithmised likelihood with linear error model and lag(1)-autocorrelation of the relative errors.
 
real(dp) function parameter_regularization (paraset, prior, bounds, mask)
 TODO: add description.
 
real(dp) function loglikelihood_trend_no_autocorr (parameterset, eval, stddev_old, stddev_new, likeli_new)
 Logarithmic likelihood function with linear trend removed.
 
real(dp) function objective_lnnse (parameterset, eval)
 Objective function of logarithmic NSE.
 
real(dp) function objective_sse (parameterset, eval)
 Objective function of SSE.
 
real(dp) function objective_nse (parameterset, eval)
 Objective function of NSE.
 
real(dp) function objective_equal_nse_lnnse (parameterset, eval)
 Objective function equally weighting NSE and lnNSE.
 
real(dp) function, dimension(2) multi_objective_nse_lnnse (parameterset, eval)
 Multi-objective function with NSE and lnNSE.
 
real(dp) function, dimension(2) multi_objective_lnnse_highflow_lnnse_lowflow (parameterset, eval)
 Multi-objective function with NSE and lnNSE.
 
real(dp) function, dimension(2) multi_objective_lnnse_highflow_lnnse_lowflow_2 (parameterset, eval)
 Multi-objective function with NSE and lnNSE.
 
real(dp) function, dimension(2) multi_objective_ae_fdc_lsv_nse_djf (parameterset, eval)
 Multi-objective function with absolute error of Flow Duration Curves low-segment volume and nse of DJF's discharge.
 
real(dp) function objective_power6_nse_lnnse (parameterset, eval)
 Objective function of combined NSE and lnNSE with power of 5 i.e.
 
real(dp) function objective_kge (parameterset, eval)
 Objective function of KGE.
 
real(dp) function objective_multiple_gauges_kge_power6 (parameterset, eval)
 combined objective function based on KGE raised to the power 6
 
real(dp) function objective_weighted_nse (parameterset, eval)
 Objective function of weighted NSE.
 
real(dp) function objective_sse_boxcox (parameterset, eval)
 Objective function of sum of squared errors of transformed streamflow.
 
subroutine, public extract_runoff (gaugeid, runoff, runoff_agg, runoff_obs, runoff_obs_mask)
 extracts runoff data from global variables
 

Detailed Description

Objective Functions for Optimization of mHM/mRM against runoff.

This module provides a wrapper for several objective functions used to optimize mRM/mHM against runoff.

If the objective contains besides runoff another variable like TWS move it to mHM/mo_objective_function.f90. If it is only regarding runoff implement it here.

All the objective functions are supposed to be minimized!

  1. SO: Q: 1.0 - NSE
  2. SO: Q: 1.0 - lnNSE
  3. SO: Q: 1.0 - 0.5*(NSE+lnNSE)
  4. SO: Q: -1.0 * loglikelihood with trend removed from absolute errors and then lag(1)-autocorrelation removed
  5. SO: Q: ((1-NSE)**6+(1-lnNSE)**6)**(1/6)
  6. SO: Q: SSE
  7. SO: Q: -1.0 * loglikelihood with trend removed from absolute errors
  8. SO: Q: -1.0 * loglikelihood with trend removed from the relative errors and then lag(1)-autocorrelation removed
  9. SO: Q: 1.0 - KGE (Kling-Gupta efficiency measure)
  10. SO: Q: sum[((1.0-KGE_i)/ nGauges)**6]**(1/6) > combination of KGE of every gauging station based on a power-6 norm
  11. MO: Q: 1st objective: 1.0 - NSE Q: 2nd objective: 1.0 - lnNSE
  12. MO: Q: 1st objective: 1.0 - lnNSE(Q_highflow) (95% percentile) Q: 2nd objective: 1.0 - lnNSE(Q_lowflow) (5% of data range)
  13. MO: Q: 1st objective: 1.0 - lnNSE(Q_highflow) (non-low flow) Q: 2nd objective: 1.0 - lnNSE(Q_lowflow) (5% of data range)eshold for Q
  14. MO: Q: 1st objective: absolute difference in FDC's low-segment volume Q: 2nd objective: 1.0 - NSE of discharge of months DJF
  15. SO: Q: 1.0 - wNSE - weighted NSE
  16. SO: Q: SSE of boxcox-transformed streamflow
    Changelog
  • Stephan Thober Oct 2015
    • adapted for mRM
  • Juliane Mai Nov 2015
    • introducing multi
    • and single-objective
    • first multi-objective function (16), but not used yet
  • Juliane Mai Feb 2016
    • multi-objective function (18) using lnNSE(highflows) and lnNSE(lowflows)
    • multi-objective function (19) using lnNSE(highflows) and lnNSE(lowflows)
    • multi-objective function (20) using FDC and discharge of months DJF
  • Stephan Thober,Bjoern Guse May 2018
    • single objective function (21) using weighted NSE following (Hundecha and Bardossy, 2004)
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
  • Stephan Thober Aug 2019
    • added OF 32: SSE of boxcox-transformed streamflow
      Authors
      Juliane Mai
      Date
      Dec 2012

Function/Subroutine Documentation

◆ extract_runoff()

subroutine, public mo_mrm_objective_function_runoff::extract_runoff ( integer(i4), intent(in)  gaugeid,
real(dp), dimension(:, :), intent(in)  runoff,
real(dp), dimension(:), intent(out), allocatable  runoff_agg,
real(dp), dimension(:), intent(out), allocatable  runoff_obs,
logical, dimension(:), intent(out), allocatable  runoff_obs_mask 
)

extracts runoff data from global variables

extracts simulated and measured runoff from global variables, such that they overlay exactly. For measured runoff, only the runoff during the evaluation period are cut, not succeeding nodata values. For simulated runoff, warming days as well as succeeding nodata values are neglected and the simulated runoff is aggregated to the resolution of the observed runoff. see use in this module above

Parameters
[in]integer(i4) :: gaugeIdcurrent gauge Id
[in]real(dp), dimension(:, :) :: runoffsimulated runoff
[out]real(dp), dimension(:) :: runoff_aggaggregated simulated
[out]real(dp), dimension(:) :: runoff_obsextracted measured
[out]logical, dimension(:) :: runoff_obs_maskmask of no data values
Authors
Stephan Thober
Date
Jan 2015

Definition at line 2478 of file mo_mrm_objective_function_runoff.F90.

References mo_common_mhm_mrm_variables::evalper, mo_mrm_global_variables::gauge, mo_mrm_global_variables::nmeasperday, mo_common_mhm_mrm_variables::ntstepday, and mo_common_mhm_mrm_variables::warmingdays.

Referenced by loglikelihood_evin2013_2(), loglikelihood_stddev(), loglikelihood_trend_no_autocorr(), multi_objective_ae_fdc_lsv_nse_djf(), multi_objective_lnnse_highflow_lnnse_lowflow(), multi_objective_lnnse_highflow_lnnse_lowflow_2(), multi_objective_nse_lnnse(), objective_equal_nse_lnnse(), objective_kge(), mo_objective_function::objective_kge_q_bfi(), mo_objective_function::objective_kge_q_et(), mo_objective_function::objective_kge_q_rmse_et(), mo_objective_function::objective_kge_q_rmse_tws(), mo_objective_function::objective_kge_q_sm_corr(), objective_lnnse(), objective_multiple_gauges_kge_power6(), objective_nse(), objective_power6_nse_lnnse(), mo_objective_function::objective_q_et_tws_kge_catchment_avg(), objective_sse(), objective_sse_boxcox(), objective_weighted_nse(), and get::runoff_eval().

Here is the caller graph for this function:

◆ loglikelihood_evin2013_2()

real(dp) function mo_mrm_objective_function_runoff::loglikelihood_evin2013_2 ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval,
logical, intent(in), optional  regularize 
)
private

Logarithmised likelihood with linear error model and lag(1)-autocorrelation of the relative errors.

This loglikelihood uses a linear error model and a lag(1)-autocorrelation on the relative errors. This is approach 2 of the paper Evin et al. (WRR, 2013). This is opti_function = 8. mHM then adds two extra (local) parameters for the error model in mhm_driver, which get optimised together with the other, global parameters. ADDITIONAL INFORMATION Evin et al., WRR 49, 4518-4524, 2013

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
[in]logical, optional :: regularize
Returns
real(dp) :: loglikelihood_evin2013_2 — logarithmic likelihood using given stddev but remove optimal trend and lag(1)-autocorrelation in errors (absolute between running model with parameterset and observation)
Authors
Juliane Mai and Matthias Cuntz
Date
Mar 2014

Definition at line 726 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), mo_common_variables::global_parameters, loglikelihood_evin2013_2(), and parameter_regularization().

Referenced by loglikelihood_evin2013_2(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loglikelihood_stddev()

real(dp) function mo_mrm_objective_function_runoff::loglikelihood_stddev ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval,
real(dp), intent(in)  stddev,
real(dp), intent(out), optional  stddev_new,
real(dp), intent(out), optional  likeli_new 
)
private

Logarithmic likelihood function with removed linear trend and Lag(1)-autocorrelation.

The logarithmis likelihood function is used when mHM runs in MCMC mode. It can also be used for optimization when selecting the likelihood in the namelist as opti_function.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
[in]real(dp) :: stddevstandard deviation of data
[out]real(dp), optional :: stddev_newstandard deviation of errors with removed trend and correlationbetween model run using parameter set and observation
[out]real(dp), optional :: likeli_newlogarithmic likelihood determined with stddev_new instead of stddev
Returns
real(dp) :: loglikelihood_stddev — logarithmic likelihood using given stddev but remove optimal trend and lag(1)-autocorrelation in errors (absolute between running model with parameterset and observation)
Authors
Juliane Mai
Date
Dec 2012

Definition at line 584 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and loglikelihood_stddev().

Referenced by loglikelihood_stddev(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loglikelihood_trend_no_autocorr()

real(dp) function mo_mrm_objective_function_runoff::loglikelihood_trend_no_autocorr ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval,
real(dp), intent(in)  stddev_old,
real(dp), intent(out), optional  stddev_new,
real(dp), intent(out), optional  likeli_new 
)
private

Logarithmic likelihood function with linear trend removed.

The logarithmis likelihood function is used when mHM runs in MCMC mode. It can also be used for optimization when selecting the likelihood in the namelist as opti_function.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
[in]real(dp) :: stddev_oldstandard deviation of data
[out]real(dp), optional :: stddev_newstandard deviation of errors with removed trendbetween model run using parameter set and observation
[out]real(dp), optional :: likeli_newlogarithmic likelihood determined with stddev_new instead of stddev
Returns
real(dp) :: loglikelihood_trend_no_autocorr — logarithmic likelihood using given stddev but remove optimal trend in errors (absolute between running model with parameterset and observation)
Authors
Juliane Mai and Matthias Cuntz
Date
Mar 2014

Definition at line 952 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and loglikelihood_trend_no_autocorr().

Referenced by loglikelihood_trend_no_autocorr(), and single_objective_runoff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multi_objective_ae_fdc_lsv_nse_djf()

real(dp) function, dimension(2) mo_mrm_objective_function_runoff::multi_objective_ae_fdc_lsv_nse_djf ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Multi-objective function with absolute error of Flow Duration Curves low-segment volume and nse of DJF's discharge.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. The first objective is using the routine "FlowDurationCurves" from "mo_signatures" to determine the low-segment volume of the FDC. The objective is the absolute difference between the observed volume and the simulated volume. For the second objective the discharge of the winter months December, January and February are extracted from the time series. The objective is then the Nash-Sutcliffe efficiency NSE of the observed winter discharge against the simulated winter discharge. The observed data \( Q_{obs} \) are global in this module. To calibrate this objective you need a multi-objective optimizer like PA-DDS.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp), dimension(2) :: multi_objective_ae_fdc_lsv_nse_djf — objective function value (which will be e.g. minimized by an optimization routine like PA-DDS)
Authors
Juliane Mai
Date
Feb 2016

Definition at line 1835 of file mo_mrm_objective_function_runoff.F90.

References mo_common_mhm_mrm_variables::evalper, extract_runoff(), mo_mrm_signatures::flowdurationcurve(), mo_mrm_global_variables::gauge, multi_objective_ae_fdc_lsv_nse_djf(), mo_mrm_global_variables::ngaugestotal, and mo_mrm_global_variables::nmeasperday.

Referenced by multi_objective_ae_fdc_lsv_nse_djf(), and multi_objective_runoff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multi_objective_lnnse_highflow_lnnse_lowflow()

real(dp) function, dimension(2) mo_mrm_objective_function_runoff::multi_objective_lnnse_highflow_lnnse_lowflow ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Multi-objective function with NSE and lnNSE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. A timepoint \(t\) of the observed data is marked as a lowflow timepoint \(t_{low}\) if

\[ Q_{obs}(t) < min(Q_{obs}) + 0.05 * ( max(Q_{obs}) - min(Q_{obs}) )\]

and a timepoint \(t\) of the observed data is marked as a highflow timepoint \(t_{high}\) if

\[ t_{high} if Q_{obs}(i) > percentile(Q_{obs},95.)\]

This timepoint identification is only performed for the observed data. The first objective is the logarithmic Nash-Sutcliffe model efficiency coefficient \( lnNSE_{high} \) of discharge values at high-flow timepoints

\[ lnNSE_{high} = 1 - \frac{\sum_{i=1}^{N_{high}} (\ln Q_{obs}(i) - \ln Q_{model}(i))^2} {\sum_{i=1}^N (\ln Q_{obs}(i) - \bar{\ln Q_{obs}})^2} \]

. The second objective is the logarithmic Nash-Sutcliffe model efficiency coefficient \( lnNSE_{low} \) of discharge values at low-flow timepoints

\[ lnNSE_{low} = 1 - \frac{\sum_{i=1}^{N_{low}} (\ln Q_{obs}(i) - \ln Q_{model}(i))^2} {\sum_{i=1}^N (\ln Q_{obs}(i) - \bar{\ln Q_{obs}})^2} \]

. Both objectives are returned. The observed data \( Q_{obs} \) are global in this module. To calibrate this objective you need a multi-objective optimizer like PA-DDS.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp), dimension(2) :: multi_objective_lnnse_highflow_lnnse_lowflow — objective function value (which will be e.g. minimized by an optimization routine like PA-DDS)
Authors
Juliane Mai
Date
Oct 2015

Definition at line 1559 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and multi_objective_lnnse_highflow_lnnse_lowflow().

Referenced by multi_objective_lnnse_highflow_lnnse_lowflow(), and multi_objective_runoff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multi_objective_lnnse_highflow_lnnse_lowflow_2()

real(dp) function, dimension(2) mo_mrm_objective_function_runoff::multi_objective_lnnse_highflow_lnnse_lowflow_2 ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Multi-objective function with NSE and lnNSE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. A timepoint \(t\) of the observed data is marked as a lowflow timepoint \(t_{low}\) if

\[ Q_{obs}(t) < min(Q_{obs}) + 0.05 * ( max(Q_{obs}) - min(Q_{obs}) )\]

and all other timepoints are marked as a highflow timepoints \(t_{high}\). This timepoint identification is only performed for the observed data. The first objective is the logarithmic Nash-Sutcliffe model efficiency coefficient \( lnNSE_{high} \) of discharge values at high-flow timepoints

\[ lnNSE_{high} = 1 - \frac{\sum_{i=1}^{N_{high}} (\ln Q_{obs}(i) - \ln Q_{model}(i))^2} {\sum_{i=1}^N (\ln Q_{obs}(i) - \bar{\ln Q_{obs}})^2} \]

. The second objective is the logarithmic Nash-Sutcliffe model efficiency coefficient \( lnNSE_{low} \) of discharge values at low-flow timepoints

\[ lnNSE_{low} = 1 - \frac{\sum_{i=1}^{N_{low}} (\ln Q_{obs}(i) - \ln Q_{model}(i))^2} {\sum_{i=1}^N (\ln Q_{obs}(i) - \bar{\ln Q_{obs}})^2} \]

. Both objectives are returned. The observed data \( Q_{obs} \) are global in this module. To calibrate this objective you need a multi-objective optimizer like PA-DDS.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp), dimension(2) :: multi_objective_lnnse_highflow_lnnse_lowflow_2 — objective function value (which will be e.g. minimized by an optimization routine like PA-DDS)
Authors
Juliane Mai
Date
Oct 2015

Definition at line 1703 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and multi_objective_lnnse_highflow_lnnse_lowflow_2().

Referenced by multi_objective_lnnse_highflow_lnnse_lowflow_2(), and multi_objective_runoff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multi_objective_nse_lnnse()

real(dp) function, dimension(2) mo_mrm_objective_function_runoff::multi_objective_nse_lnnse ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Multi-objective function with NSE and lnNSE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the Nash-Sutcliffe model efficiency coefficient \( NSE \)

\[ NSE = 1 - \frac{\sum_{i=1}^N (Q_{obs}(i) - Q_{model}(i))^2} {\sum_{i=1}^N (Q_{obs}(i) - \bar{Q_{obs}})^2} \]

and the logarithmic Nash-Sutcliffe model efficiency coefficient \( lnNSE \)

\[ lnNSE = 1 - \frac{\sum_{i=1}^N (\ln Q_{obs}(i) - \ln Q_{model}(i))^2} {\sum_{i=1}^N (\ln Q_{obs}(i) - \bar{\ln Q_{obs}})^2} \]

are calculated and both returned. The observed data \( Q_{obs} \) are global in this module. To calibrate this objective you need a multi-objective optimizer like PA-DDS.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp), dimension(2) :: multi_objective_nse_lnnse — objective function value (which will be e.g. minimized by an optimization routine like PA-DDS)
Authors
Juliane Mai
Date
Oct 2015

Definition at line 1454 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and multi_objective_nse_lnnse().

Referenced by multi_objective_nse_lnnse(), and multi_objective_runoff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multi_objective_runoff()

subroutine, public mo_mrm_objective_function_runoff::multi_objective_runoff ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval,
real(dp), dimension(:), intent(out), allocatable  multi_objectives 
)

Wrapper for multi-objective functions where at least one is regarding runoff.

The functions selects the objective function case defined in a namelist, i.e. the global variable opti_function. It return the multiple objective function values for a specific parameter set.

Parameters
[in]REAL(dp), DIMENSION(:) :: parameterset
[in]procedure(eval_interface) :: eval
[out]REAL(dp), DIMENSION(:) :: multi_objectives
Authors
Juliane Mai
Date
Oct 2015

Definition at line 510 of file mo_mrm_objective_function_runoff.F90.

References multi_objective_ae_fdc_lsv_nse_djf(), multi_objective_lnnse_highflow_lnnse_lowflow(), multi_objective_lnnse_highflow_lnnse_lowflow_2(), multi_objective_nse_lnnse(), and mo_common_mhm_mrm_variables::opti_function.

Here is the call graph for this function:

◆ objective_equal_nse_lnnse()

real(dp) function mo_mrm_objective_function_runoff::objective_equal_nse_lnnse ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Objective function equally weighting NSE and lnNSE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the Nash-Sutcliffe model efficiency coefficient \( NSE \)

\[ NSE = 1 - \frac{\sum_{i=1}^N (Q_{obs}(i) - Q_{model}(i))^2} {\sum_{i=1}^N (Q_{obs}(i) - \bar{Q_{obs}})^2} \]

and the logarithmic Nash-Sutcliffe model efficiency coefficient \( lnNSE \)

\[ lnNSE = 1 - \frac{\sum_{i=1}^N (\ln Q_{obs}(i) - \ln Q_{model}(i))^2} {\sum_{i=1}^N (\ln Q_{obs}(i) - \bar{\ln Q_{obs}})^2} \]

are calculated and added up equally weighted:

\[ obj\_value = \frac{1}{2} (NSE + lnNSE) \]

The observed data \( Q_{obs} \) are global in this module.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_equal_nse_lnnse — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Juliane Mai
Date
May 2013

Definition at line 1357 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_equal_nse_lnnse().

Referenced by objective_equal_nse_lnnse(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ objective_kge()

real(dp) function mo_mrm_objective_function_runoff::objective_kge ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Objective function of KGE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the Kling-Gupta model efficiency coefficient \( KGE \)

\[ KGE = 1.0 - \sqrt{( (1-r)^2 + (1-\alpha)^2 + (1-\beta)^2 )} \]

where \( r \) = Pearson product-moment correlation coefficient \( \alpha \) = ratio of similated mean to observed mean \( \beta \) = ratio of similated standard deviation to observed standard deviation is calculated and the objective function is

\[ obj\_value = 1.0 - KGE \]

\((1-KGE)\) is the objective since we always apply minimization methods. The minimal value of \((1-KGE)\) is 0 for the optimal KGE of 1.0. The observed data \( Q_{obs} \) are global in this module.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_kge — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Rohini Kumar
Date
August 2014

Definition at line 2097 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_kge().

Referenced by objective_kge(), mo_objective_function::objective_kge_q_sm_corr(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ objective_lnnse()

real(dp) function mo_mrm_objective_function_runoff::objective_lnnse ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Objective function of logarithmic NSE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the logarithmic Nash-Sutcliffe model efficiency coefficient \( lnNSE \)

\[ lnNSE = 1 - \frac{\sum_{i=1}^N (\ln Q_{obs}(i) - \ln Q_{model}(i))^2} {\sum_{i=1}^N (\ln Q_{obs}(i) - \bar{\ln Q_{obs}})^2} \]

is calculated.

\[ obj\_value = lnNSE \]

The observed data \( Q_{obs} \) are global in this module.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_lnnse — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Juliane Mai
Date
May 2013

Definition at line 1085 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_lnnse().

Referenced by objective_lnnse(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ objective_multiple_gauges_kge_power6()

real(dp) function mo_mrm_objective_function_runoff::objective_multiple_gauges_kge_power6 ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

combined objective function based on KGE raised to the power 6

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the Kling-Gupta model efficiency coefficient \( KGE \) for a given gauging station

\[ KGE = 1.0 - \sqrt{( (1-r)^2 + (1-\alpha)^2 + (1-\beta)^2 )} \]

where \( r \) = Pearson product-moment correlation coefficient \( \alpha \) = ratio of similated mean to observed mean \( \beta \) = ratio of similated standard deviation to observed standard deviation is calculated and the objective function for a given gauging station ( \( i \)) is

\[ \phi_{i} = 1.0 - KGE_{i} \]

\( \phi_{i} \) is the objective since we always apply minimization methods. The minimal value of \( \phi_{i} \) is 0 for the optimal KGE of 1.0. Finally, the overall \( OF \) is estimated based on the power-6 norm to combine the \( \phi_{i} \) from all gauging stations ( \( N \)).

\[ OF = \sqrt[6]{\sum((1.0 - KGE_{i})/N)^6 } \]

. The observed data \( Q_{obs} \) are global in this module.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_multiple_gauges_kge_power6 — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Rohini Kumar
Date
March 2015

Definition at line 2199 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_multiple_gauges_kge_power6().

Referenced by objective_multiple_gauges_kge_power6(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ objective_nse()

real(dp) function mo_mrm_objective_function_runoff::objective_nse ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Objective function of NSE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the Nash-Sutcliffe model efficiency coefficient \( NSE \)

\[ NSE = 1 - \frac{\sum_{i=1}^N (Q_{obs}(i) - Q_{model}(i))^2} {\sum_{i=1}^N (Q_{obs}(i) - \bar{Q_{obs}})^2} \]

is calculated and the objective function is

\[ obj\_value = 1-NSE \]

The observed data \( Q_{obs} \) are global in this module.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_nse — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Juliane Mai
Date
May 2013

Definition at line 1264 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_nse().

Referenced by objective_nse(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ objective_power6_nse_lnnse()

real(dp) function mo_mrm_objective_function_runoff::objective_power6_nse_lnnse ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Objective function of combined NSE and lnNSE with power of 5 i.e.

the p-norm with p=5.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the Nash-Sutcliffe model efficiency coefficient \( NSE \)

\[ NSE = 1 - \frac{\sum_{i=1}^N (Q_{obs}(i) - Q_{model}(i))^2} {\sum_{i=1}^N (Q_{obs}(i) - \bar{Q_{obs}})^2} \]

and the logarithmic Nash-Sutcliffe model efficiency coefficient \( lnNSE \)

\[ lnNSE = 1 - \frac{\sum_{i=1}^N (\ln Q_{obs}(i) - \ln Q_{model}(i))^2} {\sum_{i=1}^N (\ln Q_{obs}(i) - \bar{\ln Q_{obs}})^2} \]

are calculated and added up equally weighted:

\[ obj\_value = \sqrt[6]{(1-NSE)^6 + (1-lnNSE)^6} \]

The observed data \( Q_{obs} \) are global in this module.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_power6_nse_lnnse — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Juliane Mai and Matthias Cuntz
Date
March 2014

Definition at line 1997 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_power6_nse_lnnse().

Referenced by objective_power6_nse_lnnse(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ objective_sse()

real(dp) function mo_mrm_objective_function_runoff::objective_sse ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Objective function of SSE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the sum squared errors

\[ SSE = \sum_{i=1}^N (Q_{obs}(i) - Q_{model}(i))^2 \]

is calculated and the objective function is

\[ obj\_value = SSE \]

The observed data \( Q_{obs} \) are global in this module.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_sse — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Juliane Mai and Matthias Cuntz
Date
March 2014

Definition at line 1174 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_sse().

Referenced by objective_sse(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ objective_sse_boxcox()

real(dp) function mo_mrm_objective_function_runoff::objective_sse_boxcox ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Objective function of sum of squared errors of transformed streamflow.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the sum of squared error \( tSSE \)

\[ tSSE = \sum_{i=1}^N (z(Q_{obs}(i), \lambda) - z(Q_{model}(i), \lambda))^2 \]

is calculated where \( z \) is the transform and given by

\[ z(x, \lambda) = \frac{x^\lambda -1}{\lambda} \]

for \( \lambda \) unequal to zero and

\[ z(x, \lambda) = log x \]

for \( \lambda \) equal to zero. The objective function is

\[ obj\_value = tSSE \]

The observed data \( Q_{obs} \) are global in this module.

The boxcox transformation uses a parameter of 0.2, suggested by Woldemeskel et al. Hydrol Earth Syst Sci, 2018 vol. 22 (12) pp. 6257-6278. "Evaluating post-processing approaches for monthly and seasonal streamflow forecasts." https://www.hydrol-earth-syst-sci.net/22/6257/2018/

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_sse_boxcox — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Stephan Thober, Dmitri Kavetski
Date
Aug 2019

Definition at line 2380 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_sse_boxcox().

Referenced by objective_sse_boxcox(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ objective_weighted_nse()

real(dp) function mo_mrm_objective_function_runoff::objective_weighted_nse ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval 
)
private

Objective function of weighted NSE.

The objective function only depends on a parameter vector. The model will be called with that parameter vector and the model output is subsequently compared to observed data. Therefore, the weighted Nash-Sutcliffe model efficiency coefficient \( NSE \)

\[ wNSE = 1 - \frac{\sum_{i=1}^N Q_{obs}(i) * (Q_{obs}(i) - Q_{model}(i))^2} {\sum_{i=1}^N Q_{obs}(i) * (Q_{obs}(i) - \bar{Q_{obs}})^2} \]

is calculated and the objective function is

\[ obj\_value = 1- wNSE \]

The observed data \( Q_{obs} \) are global in this module.

Parameters
[in]real(dp), dimension(:) :: parameterset
[in]procedure(eval_interface) :: eval
Returns
real(dp) :: objective_weighted_nse — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Stephan Thober, Bjoern Guse
Date
May 2018

Definition at line 2287 of file mo_mrm_objective_function_runoff.F90.

References extract_runoff(), and objective_weighted_nse().

Referenced by objective_weighted_nse(), single_objective_runoff(), and single_objective_runoff_subprocess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parameter_regularization()

real(dp) function mo_mrm_objective_function_runoff::parameter_regularization ( real(dp), dimension(:), intent(in)  paraset,
real(dp), dimension(size(paraset)), intent(in)  prior,
real(dp), dimension(size(paraset), 2), intent(in)  bounds,
logical, dimension(size(paraset)), intent(in)  mask 
)
private

TODO: add description.

TODO: add description

Parameters
[in]real(dp), dimension(:) :: paraset
[in]real(dp), dimension(size(paraset)) :: prior
[in]real(dp), dimension(size(paraset), 2) :: bounds(min, max)
[in]logical, dimension(size(paraset)) :: mask
Authors
Robert Schweppe
Date
Jun 2018

Definition at line 868 of file mo_mrm_objective_function_runoff.F90.

References parameter_regularization().

Referenced by loglikelihood_evin2013_2(), and parameter_regularization().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ single_objective_runoff()

real(dp) function, public mo_mrm_objective_function_runoff::single_objective_runoff ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval,
real(dp), intent(in), optional  arg1,
real(dp), intent(out), optional  arg2,
real(dp), intent(out), optional  arg3 
)

Wrapper for objective functions optimizing agains runoff.

The functions selects the objective function case defined in a namelist, i.e. the global variable opti_function. It return the objective function value for a specific parameter set.

Parameters
[in]REAL(dp), DIMENSION(:) :: parameterset
[in]procedure(eval_interface) :: eval
[in]real(dp), optional :: arg1
[out]real(dp), optional :: arg2
[out]real(dp), optional :: arg3
Returns
real(dp) :: objective — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Juliane Mai
Date
Dec 2012

Definition at line 121 of file mo_mrm_objective_function_runoff.F90.

References loglikelihood_evin2013_2(), loglikelihood_stddev(), loglikelihood_trend_no_autocorr(), objective_equal_nse_lnnse(), objective_kge(), objective_lnnse(), objective_multiple_gauges_kge_power6(), objective_nse(), objective_power6_nse_lnnse(), objective_sse(), objective_sse_boxcox(), objective_weighted_nse(), mo_common_mhm_mrm_variables::opti_function, mo_common_mhm_mrm_variables::opti_method, and single_objective_runoff().

Referenced by mo_mhm_interface::mhm_interface_run_optimization(), and single_objective_runoff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ single_objective_runoff_master()

real(dp) function, public mo_mrm_objective_function_runoff::single_objective_runoff_master ( real(dp), dimension(:), intent(in)  parameterset,
procedure(eval_interface), intent(in), pointer  eval,
real(dp), intent(in), optional  arg1,
real(dp), intent(out), optional  arg2,
real(dp), intent(out), optional  arg3 
)

Wrapper for objective functions optimizing agains runoff.

The functions selects the objective function case defined in a namelist, i.e. the global variable opti_function. It return the objective function value for a specific parameter set.

Parameters
[in]REAL(dp), DIMENSION(:) :: parameterset
[in]procedure(eval_interface) :: eval
[in]real(dp), optional :: arg1
[out]real(dp), optional :: arg2
[out]real(dp), optional :: arg3
Returns
real(dp) :: objective — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Juliane Mai
Date
Dec 2012

Definition at line 236 of file mo_mrm_objective_function_runoff.F90.

References mo_common_variables::domainmeta, mo_mrm_global_variables::ngaugestotal, mo_common_mhm_mrm_variables::opti_function, mo_common_mhm_mrm_variables::opti_method, and single_objective_runoff_master().

Referenced by mo_mhm_interface::mhm_interface_run_optimization(), and single_objective_runoff_master().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ single_objective_runoff_subprocess()

subroutine, public mo_mrm_objective_function_runoff::single_objective_runoff_subprocess ( procedure(eval_interface), intent(in), pointer  eval,
real(dp), intent(in), optional  arg1,
real(dp), intent(out), optional  arg2,
real(dp), intent(out), optional  arg3 
)

Wrapper for objective functions optimizing agains runoff.

The functions selects the objective function case defined in a namelist, i.e. the global variable opti_function. It return the objective function value for a specific parameter set.

Parameters
[in]REAL(dp), DIMENSION(:) :: parameterset
[in]procedure(eval_interface) :: eval
[in]real(dp), optional :: arg1
[out]real(dp), optional :: arg2
[out]real(dp), optional :: arg3
Returns
real(dp) :: objective — objective function value (which will be e.g. minimized by an optimization routine like DDS)
Authors
Juliane Mai
Date
Dec 2012

Definition at line 378 of file mo_mrm_objective_function_runoff.F90.

References mo_common_variables::domainmeta, loglikelihood_evin2013_2(), loglikelihood_stddev(), objective_equal_nse_lnnse(), objective_kge(), objective_lnnse(), objective_multiple_gauges_kge_power6(), objective_nse(), objective_power6_nse_lnnse(), objective_sse(), objective_sse_boxcox(), objective_weighted_nse(), mo_common_mhm_mrm_variables::opti_function, and mo_common_mhm_mrm_variables::opti_method.

Referenced by mo_mhm_interface::mhm_interface_run_optimization().

Here is the call graph for this function:
Here is the caller graph for this function: