|
|
- [ ] add explanation for harvest convertion to yield
|
|
|
|
|
|
# Monthly runoff
|
|
|
- convert monthly runoff to annual by summing :
|
|
|
```
|
... | ... | @@ -43,4 +41,12 @@ grid_surface = np.zeros((len(latitudes),len(longitudes))) # dim [30,33] |
|
|
for lat,latitude in enumerate(latitudes) :
|
|
|
for lon,longitude in enumerate(longitudes) :
|
|
|
grid_surface[lat][lon] = 110 * 110 * math.cos(math.pi*latitude/180) * 1/2 * 1/2 * 100 #in ha
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
# Moving average
|
|
|
```
|
|
|
ma_harvest = []
|
|
|
window = 10
|
|
|
for y,year in enumerate(years[window:]):
|
|
|
ma_harvest.append(np.average(harvests_regions[id_region][y-window:y]))
|
|
|
ma_harvest = np.asarray(ma_harvest)
|
|
|
``` |