Changes
Page history
Create Data treatment
authored
Oct 28, 2021
by
Marie Brunel
Show whitespace changes
Inline
Side-by-side
Data-treatment.md
0 → 100644
View page @
53c3c631
# Monthly runoff into annual
```
if file_name == "mrunoff.nc":
#convert number of months to years
nb_year = int(len(years)/12)
tmp = np.zeros([nb_year,len(latitudes),len(longitudes)])
#calculation of the sum over each year
for k in range(0,nb_year,1):
tmp[k] = np.sum(data[k*12:k*12+12],axis=0)
data = tmp
```
years,latitudes,longitudes = list from the file reading
data = numpy array from the reading of the file [months,latitudes,longitudes]
\ No newline at end of file