From fa85430d18539cbfebf91944f8f64c25f6b2a015 Mon Sep 17 00:00:00 2001 From: evenmn Date: Thu, 29 May 2025 19:29:39 +0200 Subject: [PATCH] Replaced 'np.quantile' by 'np.nanquantile' when computing quantiles on the fly from raw ensemble data Signed-off-by: evenmn --- verif/data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/verif/data.py b/verif/data.py index d80dbee..5638445 100644 --- a/verif/data.py +++ b/verif/data.py @@ -540,7 +540,8 @@ def _get_score(self, field, input_index): verif.util.warning("In %s, ensemble doesn't have enough members to accurately get quantile level %s" % (self.get_names()[i], field.quantile)) temp = self.preaggregate(input.ensemble, input) - temp = np.quantile(input.ensemble, field.quantile, axis=3, method="normal_unbiased") + #temp = np.quantile(input.ensemble, field.quantile, axis=3, method="normal_unbiased") + temp = np.nanquantile(input.ensemble, field.quantile, axis=3, method="normal_unbiased") else: if self.dim_agg_length is not None: verif.util.error("Cannot pre-aggregate threshold probabilities without an ensemble")