-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathS5P-CO.js
45 lines (37 loc) · 1.35 KB
/
S5P-CO.js
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
35
36
37
38
39
40
41
42
43
44
45
var collection = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_CO')
.select('CO_column_number_density')
.filterDate('2023-01-01', '2023-04-30')
.map(function(image) {return image.clip(table);});
print(collection, "JH_CO");
var startDate = '2023-01-01'
var endDate = '2023-04-30'
var months = ee.List.sequence(1, 4);
var years = ee.List.sequence(ee.Number(ee.Date(startDate).get("year")),
ee.Number(ee.Date(endDate).get("year")));
// Map filtering and reducing across year-month combinations and convert to ImageCollection
var modis_YrMo = ee.ImageCollection.fromImages(
years.map(function (y) {
return months.map(function (m) {
return collection
.filter(ee.Filter.calendarRange(y, y, 'year'))
.filter(ee.Filter.calendarRange(m, m, 'month'))
.mean()
.set('year',y)
.set('month',m)
});
}).flatten()).map(function(image) {return image.clip(table);});
print(modis_YrMo, 'MONTHLY')
var CO_Monthly = modis_YrMo.toBands(); ///// Stacking Process
print(CO_Monthly, "Daily CO") /// Printing
Export.image.toDrive({
image: CO_Monthly,
description: 'Monthly_CO_2023_Jharkhand',
scale: 1113.2,
region: table,
folder : 'JH_AIR_Q',
fileFormat: 'GeoTIFF',
formatOptions: {
cloudOptimized: true
},
maxPixels: 1e13,
});