OptimizationSettings

class rameau.core.OptimizationSettings(maxit=0, starting_date=None, ending_date=None, method='all', transformation='no', river_objective_function='nse', selected_watersheds=None, verbose=False)[source]

Model optimisation settings.

Parameters:
  • maxit (int, optional) – Number of iterations for the Rosenbrock algorithm. If not provided, default value is zero, i.e. no optimisation will be performed.

  • starting_date (datetime.datetime, optional) – The date and time defining the start of the period to consider in the input data for the optimisation run.

  • ending_date (datetime.datetime, optional) – The date and time defining the end of the period to consider in the input data for the optimisation run.

  • method (str, optional) –

    The approach to use when several gauged watersheds need to be considered in the optimisation run. This is typically the case when several independent watersheds are considered at once (i.e. batch of lumped watersheds), or when a watershed is considered as a collection of interconnected sub-watersheds (i.e. semi-distributed watershed).

    method

    description

    'all'

    All the gauged watersheds are optimised at once. This method is only recommended for a single lumped watershed or for a semi-distributed watershed. This is the default method.

    'independent'

    The gauged watersheds are optimised one after another, based on the order they are provided in the Tree. The optimised parameter values are sustained between the optimisation iterations. This method is only recommended for a batch of lumped watersheds.

    'strahler'

    All the gauged locations with the same Strahler order are grouped and considered together. The optimisation is performed sequentially for each group based on increasing Strahler order. This method is only recommended for a semi-distributed watershed.

  • transformation (str, optional) –

    The function to apply to transform the observed and predicted river flow (Q) before computing the objective function.

    transformation

    description

    'no'

    No transformation is performed. This is the default behaviour.

    'square root'

    The square root function f(Q) = √Q is applied.

    'inverse'

    The reciprocal function f(Q) = 1/Q is applied.

    'fifth root'

    The fifth root function f(Q) = ⁵√Q is applied.

    'log'

    The natural logarithm function f(Q) = ln(Q) is applied.

  • river_objective_function (str, optional) –

    The objective function to use to compare the observed and predicted river flow.

    river_objective_function

    description

    'nse'

    The Nash-Sutcliffe Efficiency (NSE) metric is used [Nash and Sutcliffe, 1970].

    'kge'

    The original Kling-Gupta efficiency (KGE) metric is used [Gupta et al., 2009].

    'kge_2012'

    The modified Kling-Gupta efficiency (KGE’) metric is used [Kling et al., 2012].

  • selected_watersheds (list or int, optional) – The indices of the watersheds to consider in the optimisation run. The indices relate to the positions in the sequence of watersheds specified in the Tree. If not provided, all gauged watersheds are considered.

  • verbose (bool, optional) – True if the verbose mode is activated. The verbose mode prints the iteration number and the associated objective function value.

Returns:

OptimizationSettings

Attributes

ending_date

The date and time defining the end of the period to consider in the input data for the optimisation run.

maxit

Number of iterations for the Rosenbrock algorithm.

method

The approach to use when several gauged watersheds need to be considered in the optimisation run.

river_objective_function

The objective function to use to compare the observed and predicted river flow.

selected_watersheds

The indices of the watersheds to consider in the optimisation run.

starting_date

The date and time defining the start of the period to consider in the input data for the optimisation run.

transformation

The function to apply to transform the observed and predicted river flow before computing the objective function.

verbose

Whether the verbose mode is activated.