diff --git a/experiment/meteo_france_SCM_study/new_safran_study.py b/experiment/meteo_france_SCM_study/new_safran_study.py new file mode 100644 index 0000000000000000000000000000000000000000..5e72ba92a99e11d2ea42ce0d5ab626064c3ec4b3 --- /dev/null +++ b/experiment/meteo_france_SCM_study/new_safran_study.py @@ -0,0 +1,31 @@ +import numpy as np + +from experiment.meteo_france_SCM_study.abstract_study import AbstractStudy +import os.path as op + +from experiment.meteo_france_SCM_study.safran.safran_variable import SafranSnowfallVariable + + +class NewStudy(AbstractStudy): + + + @property + def safran_full_path(self) -> str: + return op.join(self.full_path, 'alp_flat/reanalysis/meteo') + # return op.join(self.full_path, 'alp_flat/reanalysis/pro') + +if __name__ == '__main__': + study = NewStudy(SafranSnowfallVariable) + d = study.year_to_dataset_ordered_dict[1958] + print(d) + s = study.year_to_daily_time_serie_array[1958].shape + print(s) + print(s[1] / 23) + print(d.variables['massif']) + print(np.array(d.variables['massif'])) + + for item in ['LAT', 'LON', 'ZS', 'massif']: + a = np.array(d.variables[item]) + print(a) + s = set(a) + print(len(s)) diff --git a/experiment/meteo_france_SCM_study/safran/safran.py b/experiment/meteo_france_SCM_study/safran/safran.py index 98147a321c7164d1d6f355a56718612995a9b704..d34ed4ed8c9c5b4897d4caeab15894843642bbb3 100644 --- a/experiment/meteo_france_SCM_study/safran/safran.py +++ b/experiment/meteo_france_SCM_study/safran/safran.py @@ -75,7 +75,7 @@ if __name__ == '__main__': print('{}: {}'.format(year, dataset.massifsList)) d = study.year_to_dataset_ordered_dict[1958] print(d.variables['time']) - # print(study.year_to_daily_time_serie[1958].shape) + print(study.year_to_daily_time_serie_array[1958].shape) # print(len(d.variables['time'])) # print(study.year_to_annual_total) # print(study.df_annual_total.columns)