Commit b556eeea authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

add min and max in quantiles used for thresholds in CRPS_FROM_BS

1 merge request!3release v0.1.0
Pipeline #45574 failed with stage
in 4 minutes and 7 seconds
Showing with 6 additions and 4 deletions
+6 -4
...@@ -895,7 +895,9 @@ namespace evalhyd ...@@ -895,7 +895,9 @@ namespace evalhyd
} }
/// Compute the continuous rank probability score based on the /// 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 /// \param q_obs
/// Streamflow observations. /// Streamflow observations.
...@@ -966,7 +968,7 @@ namespace evalhyd ...@@ -966,7 +968,7 @@ namespace evalhyd
{ {
// compute empirical thresholds from 99 observed quantiles // compute empirical thresholds from 99 observed quantiles
xt::xtensor<double, 2> thr = 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 // /!\ need to compute quantiles one site at a time
// because there is no `xt::nanquantile`, so // because there is no `xt::nanquantile`, so
...@@ -983,7 +985,7 @@ namespace evalhyd ...@@ -983,7 +985,7 @@ namespace evalhyd
{ {
xt::view(thr, s, xt::all()) = xt::quantile( xt::view(thr, s, xt::all()) = xt::quantile(
obs_filtered, obs_filtered,
xt::arange<double>(0.01, 1.0, 0.01) xt::arange<double>(0.00, 1.01, 0.01)
); );
} }
else else
......
221.3421266369226 226.5713674310274
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment