-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfAPAR & LAI
34 lines (27 loc) · 1.3 KB
/
fAPAR & LAI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**** Start of imports. If edited, may not auto-convert in the playground. ****/
var geometry = /* color: #98ff00 */ee.Geometry.Polygon(
[[[-59.00456603146131, -38.6569931537904],
[-58.99675543880994, -38.66319271108697],
[-58.97778685665662, -38.658300132131885],
[-58.9833658514076, -38.653608304153394],
[-58.9857261953407, -38.6544461531175],
[-58.986412840848516, -38.65458020804235],
[-58.98752863979871, -38.65230124020163]]]);
/***** End of imports. If edited, may not auto-convert in the playground. *****/
var dataset = ee.ImageCollection('MODIS/006/MCD15A3H').filterBounds(geometry).filterDate('2019-01-01', '2020-12-31');
var fapar = dataset.select('Fpar');
var lai = dataset.select('Lai');
var mergedCollection = fapar.merge(lai);
var title = {
title: 'Evolución fAPAR & LAI',
hAxis: {title: 'Tiempo'},
vAxis: {title: 'Valor'},
};
print(ui.Chart.image.series(fapar, geometry).setOptions(title));
var S1dates = fapar.toList(mergedCollection.size()).map(function(img){
var value = ee.Image(img).reduceRegion(ee.Reducer.mean(), geometry).get('Fpar');
var idate = ee.Image(img).date();
var fecha = ee.String(idate.get('year')).cat('-').cat(idate.get('month')).cat('-').cat(idate.get('day'));
return [value,fecha];
});
print(S1dates);