diff --git a/include/evalhyd/detail/probabilist/brier.hpp b/include/evalhyd/detail/probabilist/brier.hpp index 13226deede2f7cfc46c34a8510173fa81c218cb3..387a773add7006c82078a2cd3ad1ce80c0b948a0 100644 --- a/include/evalhyd/detail/probabilist/brier.hpp +++ b/include/evalhyd/detail/probabilist/brier.hpp @@ -895,7 +895,9 @@ namespace evalhyd } /// Compute the continuous rank probability score based on the - /// integration over the Brier scores (CRPS_FROM_BS). + /// integration over 101 Brier scores (CRPS_FROM_BS), i.e. using the + /// observed minimum, the 99 observed percentiles, and the observed + /// maximum as the exceedance thresholds. /// /// \param q_obs /// Streamflow observations. @@ -966,7 +968,7 @@ namespace evalhyd { // compute empirical thresholds from 99 observed quantiles xt::xtensor<double, 2> thr = - xt::zeros<double>({n_sit, std::size_t {99}}); + xt::zeros<double>({n_sit, std::size_t {101}}); // /!\ need to compute quantiles one site at a time // because there is no `xt::nanquantile`, so @@ -983,7 +985,7 @@ namespace evalhyd { xt::view(thr, s, xt::all()) = xt::quantile( obs_filtered, - xt::arange<double>(0.01, 1.0, 0.01) + xt::arange<double>(0.00, 1.01, 0.01) ); } else diff --git a/tests/expected/evalp/CRPS_FROM_BS.csv b/tests/expected/evalp/CRPS_FROM_BS.csv index 03c315fdb46fe52a75aef395dcb8d9d039ac0152..7a155403cfd93a41adafa598edbc99227973ad0a 100644 --- a/tests/expected/evalp/CRPS_FROM_BS.csv +++ b/tests/expected/evalp/CRPS_FROM_BS.csv @@ -1 +1 @@ -221.3421266369226 +226.5713674310274