From edc744e46efb7b360f731f112e6ac660cd0e15ef Mon Sep 17 00:00:00 2001
From: Le Roux Erwan <erwan.le-roux@irstea.fr>
Date: Wed, 27 Nov 2019 16:23:11 +0100
Subject: [PATCH] [PAPER 1] fix quantile for snow load in the case where psnow
 < 1 (i.e. for the mixed distribution case)

---
 .../study_visualizer_for_non_stationary_trends.py               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/experiment/paper_past_snow_loads/result_trends_and_return_levels/study_visualizer_for_non_stationary_trends.py b/experiment/paper_past_snow_loads/result_trends_and_return_levels/study_visualizer_for_non_stationary_trends.py
index a418c2b5..c8ee7c7b 100644
--- a/experiment/paper_past_snow_loads/result_trends_and_return_levels/study_visualizer_for_non_stationary_trends.py
+++ b/experiment/paper_past_snow_loads/result_trends_and_return_levels/study_visualizer_for_non_stationary_trends.py
@@ -78,7 +78,7 @@ class StudyVisualizerForNonStationaryTrends(StudyVisualizer):
     def massif_name_to_eurocode_quantile_level_in_practice(self):
         """Due to missing data, the the eurocode quantile which 0.98 if we have all the data
         correspond in practice to the quantile psnow x 0.98 of the data where there is snow"""
-        return {m: p * EUROCODE_QUANTILE for m, p in self.massif_name_to_psnow.items()}
+        return {m: 1 - ((1 - EUROCODE_QUANTILE) / p_snow) for m, p_snow in self.massif_name_to_psnow.items()}
 
     @cached_property
     def massif_name_to_non_null_years_and_maxima(self):
-- 
GitLab