数据集: CHIRPS Daily: Climate Hazards Group InfraRed Precipitation With Station Data (Version 2.0 Final)
数据说明: Climate Hazards Group InfraRed Precipitation with Station data (CHIRPS) 是一个记录了1981年到当前全球降雨量的数据集。CHIRPS将0.05°分辨率的卫星图像与in-situ站点数据结合,创建网格化的降雨时间序列,用于趋势分析和季节性干旱监测。
2012年年度平均降水量图
1993年-2012年年度平均降水量图下载代码
//加入矢量边界之后直接运行
var ROI = table.geometry();
Map.addLayer(ROI,{},'ROI');
for(var i = 1993;i<=2012;i++){
var CHIRPS_Daily = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY")
.filterDate(i+'-01-01', i+'-12-31')
.select('precipitation')
var CHIRPS_Year_mean = CHIRPS_Daily.mean().clip(ROI)
var precipitationVis = {
min: 1.0,
max: 17.0,
palette: ['001137', '0aab1e', 'e7eb05', 'ff4a2d', 'e90000'],
};
print(CHIRPS_Year_mean)
Map.addLayer(CHIRPS_Year_mean, precipitationVis, i+'_CHIRPS_Year_mean');
// Map.addLayer(CHIRPS_Daily.first().clip(ROI), precipitationVis, 'CHIRPS_Year_mean_first');
Export.image.toDrive({
image: CHIRPS_Year_mean,
description: i+'year_mean',
region: ROI,
maxPixels: 1e13,
folder: 'CHIRPS'
})
}
2011年-2012年每个月平均降水量图下载代码
var ROI = table.geometry();
Map.addLayer(ROI,{},'ROI');
for(var i = 2011;i<=2012;i++){
for(var j = 1;j<=12;j++){
var CHIRPS_Daily = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY")
.filter(ee.Filter.calendarRange(j, j,'month'))
.filter(ee.Filter.calendarRange(i, i, 'year'))
.map(function(img) {
return img.set('year', img.date().get('year'));
}).filterBounds(ROI)
.select('precipitation')
var CHIRPS_Year_mean = CHIRPS_Daily.mean().clip(ROI)
var precipitationVis = {
min: 1.0,
max: 17.0,
palette: ['001137', '0aab1e', 'e7eb05', 'ff4a2d', 'e90000'],
};
print(CHIRPS_Year_mean,i+'_year_'+j+'_CHIRPS_Year_mean')
Map.addLayer(CHIRPS_Year_mean, precipitationVis, i+'_year_'+j+'_CHIRPS_Year_mean');
// Map.addLayer(CHIRPS_Daily.first().clip(ROI), precipitationVis, 'CHIRPS_Year_mean_first');
Export.image.toDrive({
image: CHIRPS_Year_mean,
description: i+'_year_'+j+'_month_mean',
// description: '2012year',
// crs: "EPSG:32649",
// scale: 30,
region: ROI,
maxPixels: 1e13,
folder: 'CHIRPS'
})
}
}
每日的降水数据代码
var dataset = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY')
.filter(ee.Filter.date('2018-05-01', '2018-05-03'));
var precipitation = dataset.select('precipitation');
var precipitationVis = {
min: 1.0,
max: 17.0,
palette: ['001137', '0aab1e', 'e7eb05', 'ff4a2d', 'e90000'],
};
Map.setCenter(17.93, 7.71, 2);
Map.addLayer(precipitation, precipitationVis, 'Precipitation');