Commit b6f24b3f authored by Le Roux Erwan's avatar Le Roux Erwan
Browse files

[SCM] validate the Graph from Gaume paper.

parent 16f92175
No related merge requests found
Showing with 10 additions and 5 deletions
+10 -5
...@@ -20,8 +20,8 @@ class Crocus(AbstractStudy): ...@@ -20,8 +20,8 @@ class Crocus(AbstractStudy):
suffix = '' if self.altitude == 2400 else ' average of data observed every 6 hours' suffix = '' if self.altitude == 2400 else ' average of data observed every 6 hours'
return super().variable_name + suffix return super().variable_name + suffix
def annual_aggregation_function(self): def annual_aggregation_function(self, *args, **kwargs):
return np.mean return np.mean(*args, **kwargs)
class CrocusSwe(Crocus): class CrocusSwe(Crocus):
......
...@@ -55,6 +55,10 @@ class SafranTotalPrecip(SafranFrequency): ...@@ -55,6 +55,10 @@ class SafranTotalPrecip(SafranFrequency):
super().__init__(SafranTotalPrecipVariable, *args, **kwargs) super().__init__(SafranTotalPrecipVariable, *args, **kwargs)
class ExtendedSafranTotalPrecip(AbstractExtendedStudy, SafranTotalPrecip):
pass
class SafranTemperature(Safran): class SafranTemperature(Safran):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
......
from experiment.meteo_france_SCM_study.abstract_study import AbstractStudy from experiment.meteo_france_SCM_study.abstract_study import AbstractStudy
from experiment.meteo_france_SCM_study.crocus.crocus import CrocusDepth, CrocusSwe, ExtendedCrocusDepth, \ from experiment.meteo_france_SCM_study.crocus.crocus import CrocusDepth, CrocusSwe, ExtendedCrocusDepth, \
ExtendedCrocusSwe ExtendedCrocusSwe
from experiment.meteo_france_SCM_study.safran.safran import SafranSnowfall, ExtendedSafranSnowfall from experiment.meteo_france_SCM_study.safran.safran import SafranSnowfall, ExtendedSafranSnowfall, \
ExtendedSafranTotalPrecip
from experiment.meteo_france_SCM_study.visualization.studies_visualization.studies import Studies from experiment.meteo_france_SCM_study.visualization.studies_visualization.studies import Studies
from experiment.meteo_france_SCM_study.visualization.studies_visualization.studies_visualizer import StudiesVisualizer from experiment.meteo_france_SCM_study.visualization.studies_visualization.studies_visualizer import StudiesVisualizer
...@@ -9,12 +10,12 @@ from experiment.meteo_france_SCM_study.visualization.study_visualization.study_v ...@@ -9,12 +10,12 @@ from experiment.meteo_france_SCM_study.visualization.study_visualization.study_v
from collections import OrderedDict from collections import OrderedDict
SCM_STUDIES = [SafranSnowfall, CrocusSwe, CrocusDepth] SCM_STUDIES = [SafranSnowfall, CrocusSwe, CrocusDepth]
SCM_EXTENDED_STUDIES = [ExtendedSafranSnowfall, ExtendedCrocusSwe, ExtendedCrocusDepth] SCM_EXTENDED_STUDIES = [ExtendedSafranTotalPrecip, ExtendedSafranSnowfall, ExtendedCrocusSwe, ExtendedCrocusDepth]
SCM_STUDY_TO_EXTENDED_STUDY = OrderedDict(zip(SCM_STUDIES, SCM_EXTENDED_STUDIES)) SCM_STUDY_TO_EXTENDED_STUDY = OrderedDict(zip(SCM_STUDIES, SCM_EXTENDED_STUDIES))
def normal_visualization(): def normal_visualization():
for study_type in SCM_EXTENDED_STUDIES[1:2]: for study_type in SCM_EXTENDED_STUDIES[:1]:
extended_studies = Studies(study_type) extended_studies = Studies(study_type)
studies_visualizer = StudiesVisualizer(extended_studies) studies_visualizer = StudiesVisualizer(extended_studies)
studies_visualizer.mean_as_a_function_of_altitude(region_only=True) studies_visualizer.mean_as_a_function_of_altitude(region_only=True)
......
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