Commit 3ac4641c authored by Le Roux Erwan's avatar Le Roux Erwan
Browse files

[SCM] add new_safran_study for exploratory work

parent 0bf4f13f
No related merge requests found
Showing with 32 additions and 1 deletion
+32 -1
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))
...@@ -75,7 +75,7 @@ if __name__ == '__main__': ...@@ -75,7 +75,7 @@ if __name__ == '__main__':
print('{}: {}'.format(year, dataset.massifsList)) print('{}: {}'.format(year, dataset.massifsList))
d = study.year_to_dataset_ordered_dict[1958] d = study.year_to_dataset_ordered_dict[1958]
print(d.variables['time']) 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(len(d.variables['time']))
# print(study.year_to_annual_total) # print(study.year_to_annual_total)
# print(study.df_annual_total.columns) # print(study.df_annual_total.columns)
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