wrfhydropy.Evaluation.crps

Evaluation.crps(mod_col: str = 'modeled', obs_col: str = 'observed', member_col: str = 'member', valid_time_col: str = 'valid_time', lead_time_col: str = 'lead_time', gage_col: str = 'gage', weights=None)[source]

Calculate CRPS (continuous ranked probability score) using the properscoring package. See :py:fun:`crps_ensemble() <crps_ensemble>` in properscoring.

Grouping is not necessary because CRPS returns a value per forecast. Grouping would happen when computing CRPSS.

The Eval object generally wants one observation per modeled data point, that is overkill for this function (since the ensemble takes one observations) but we handle it in a consistent manner with the rest of Evaluation.

This function is setup to identify the ensemble dimension in the following way:
  1. if “member_col” is present in the columns, then this is the ensemble dimension, which is a standard ensemble forecast way

  2. else, the “valid_time” dimension is used. This is the time-lagged ensembles way.

  3. NOT DONE: one could consider time-lagged ensembles of ensemble forecasts.

Parameters:
  • mod_col – str = ‘modeled’: Column name of modelled data

  • obs_col – str = ‘observed’: Column name of observed data.

  • member_col – str = ‘member’: Column name giving the members. If the column is present, evaluation is performed across the member dimension for each combination of other columns. If member is not present the valid_time lead_time and gage cols are used to calculate CRPS across lead-time for each valid_time, gage combination. This later option is the “timelagged” ensemble verification.

  • valid_time_col – str = ‘valid_time’: I

  • lead_time_col – str = ‘lead_time’,

  • gage_col – str = ‘gage’,

Returns:

CRPS for each ensemble forecast against the observations.