Changes
Page history
Update Data treatment
authored
Feb 04, 2022
by
Marie Brunel
Hide whitespace changes
Inline
Side-by-side
Data-treatment.md
View page @
d50fc991
...
@@ -36,11 +36,18 @@ for pt in pts :
...
@@ -36,11 +36,18 @@ for pt in pts :
print(new_pt)
print(new_pt)
```
```
# Cell fraction to area
# Cell fraction to area
## 30 minutes resolution
```
```
gridhectares = np.zeros((len(latitudes),len(longitudes)))
gridhectares = np.zeros((len(latitudes),len(longitudes)))
for lat,latitude in enumerate(latitudes) :
for lat,latitude in enumerate(latitudes) :
gridhectares[lat,:] = 110 * 110 * math.cos(math.pi*latitude/180) * 1/2 * 1/2 * 100
gridhectares[lat,:] = 110 * 110 * math.cos(math.pi*latitude/180) * 1/2 * 1/2 * 100
```
```
## 5 minutes resolution
```
surfaces = np.zeros_like(cftfracs)
for lat,latitude in enumerate(latitudes) :
surfaces[:,:,lat,:] = 110 * 110 * math.cos(math.pi*latitude/180) * 0.083 * 0.083 * 100
```
# Moving average
# Moving average
```
```
ma_harvest = []
ma_harvest = []
...
...
...
...