diff --git a/extreme_trend/visualizers/utils.py b/extreme_trend/visualizers/utils.py index 9e2f857ab2c58b142c3424803f97dabd0a8c707b..78a4f4ad08838c5c6100ef35c89ea32a4c552f61 100644 --- a/extreme_trend/visualizers/utils.py +++ b/extreme_trend/visualizers/utils.py @@ -13,7 +13,6 @@ def load_altitude_to_visualizer(altitudes, massif_names, model_subsets_for_uncer save_to_file=True, multiprocessing=True, season=SeasonForTheMaxima.annual): - print("Season={}".format(season)) fit_method = TemporalMarginFitMethod.extremes_fevd_mle altitude_to_visualizer = OrderedDict() for altitude in altitudes: diff --git a/projects/contrasting_trends_in_snow_loads/main_result.py b/projects/contrasting_trends_in_snow_loads/main_result.py index a77384cb8ff10d4c2ab32ccbb042403fd3904bb1..6dbcde6a7b6f1d5e9225a3ad9e0e3c42a885bfa0 100644 --- a/projects/contrasting_trends_in_snow_loads/main_result.py +++ b/projects/contrasting_trends_in_snow_loads/main_result.py @@ -42,8 +42,7 @@ def intermediate_result(altitudes, massif_names=None, """ # Load altitude to visualizer altitude_to_visualizer = load_altitude_to_visualizer(altitudes, massif_names, model_subsets_for_uncertainty, - study_class, uncertainty_methods, save_to_file=save_to_file, - season=SeasonForTheMaxima.winter_extended) + study_class, uncertainty_methods, save_to_file=save_to_file) # Load variable object efficiently for v in altitude_to_visualizer.values(): _ = v.study.year_to_variable_object @@ -59,7 +58,6 @@ def intermediate_result(altitudes, massif_names=None, # Plots plot_contrasting_trend_curves(altitude_to_visualizer, all_regions=True) - def major_result(): uncertainty_methods = [ConfidenceIntervalMethodFromExtremes.my_bayes, ConfidenceIntervalMethodFromExtremes.ci_mle][1:] @@ -75,10 +73,16 @@ def major_result(): rainfall_classes = [SafranRainfall1Day, SafranRainfall3Days, SafranRainfall5Days, SafranRainfall7Days] study_classes = precipitation_classes + snow_load_classes # study_classes = snowfall_classes + rainfall_classes - for study_class in [SafranPrecipitation3Days, CrocusSnowLoad3Days]: + for study_class in snowfall_classes: intermediate_result(altitudes, massif_names, model_subsets_for_uncertainty, uncertainty_methods, study_class, multiprocessing=True) +""" + +est ce qu il y a une croissance signifcative en pluie, + +est ce qu'il y a une decroissance signifcatieve à partir d'une certaine altitude +""" if __name__ == '__main__': major_result() diff --git a/projects/contrasting_trends_in_snow_loads/weather_types_analysis/main_distribution_wps.py b/projects/contrasting_trends_in_snow_loads/weather_types_analysis/main_distribution_wps.py index 570785eddec622281dc280143312ece20add7bf2..2ff47881c213c08e44917a81cb4efaf1c9c33d0c 100644 --- a/projects/contrasting_trends_in_snow_loads/weather_types_analysis/main_distribution_wps.py +++ b/projects/contrasting_trends_in_snow_loads/weather_types_analysis/main_distribution_wps.py @@ -9,7 +9,7 @@ from extreme_data.meteo_france_data.scm_models_data.utils import SeasonForTheMax def main_spatial_distribution_wps(study_class, year_min=1959, year_max=2008, limit_for_the_percentage=None): - study = study_class(altitude=1800, year_min=year_min, year_max=year_max, season=SeasonForTheMaxima.winter_extended) + study = study_class(altitude=1800, year_min=year_min, year_max=year_max) for region_name in AbstractExtendedStudy.region_names: massif_names = AbstractExtendedStudy.region_name_to_massif_names[region_name] print('\n \n', region_name, '\n') @@ -50,8 +50,8 @@ Process finished with exit code 0 def main_temporal_distribution_wps(study_class, year_min=1959, year_max=2008, limit_for_the_percentage=None): altitude = 1800 intermediate_year = year_min + round(float(year_max - year_min) / 2) - study_before = study_class(altitude=altitude, year_min=year_min, year_max=intermediate_year, season=SeasonForTheMaxima.winter_extended) - study_after = study_class(altitude=altitude, year_min=intermediate_year+1, year_max=year_max, season=SeasonForTheMaxima.winter_extended) + study_before = study_class(altitude=altitude, year_min=year_min, year_max=intermediate_year) + study_after = study_class(altitude=altitude, year_min=intermediate_year+1, year_max=year_max) for region_name in AbstractExtendedStudy.region_names: massif_names = AbstractExtendedStudy.region_name_to_massif_names[region_name] print('\n \n', '{} ({} massifs)'.format(region_name, len(massif_names)), '\n') @@ -105,7 +105,7 @@ South Circulation 76 23 158 74 138 306 if __name__ == '__main__': - limit_percentage = 10 + limit_percentage = 1 study_class = [CrocusSnowLoad1Day, SafranPrecipitation1Day, SafranPrecipitation3Days][-1] - # main_spatial_distribution_wps(study_class, limit_for_the_percentage=limit_percentage) - main_temporal_distribution_wps(study_class, limit_for_the_percentage=limit_percentage) + main_spatial_distribution_wps(study_class, limit_for_the_percentage=limit_percentage) + # main_temporal_distribution_wps(study_class, limit_for_the_percentage=limit_percentage)