GEE平台提供了大量的数据集,其中包括大量的气候数据集合,本文主要介绍如何显示某地区的气候时间序列。其中涉及的内容主要有两方面,第一为气候序列的获取(简单),第二为气候序列的显示(较简单),下篇文章可能会涉及Chart表的显示,欢迎各位批评指正。
话不多说,上代码:
var imageCollection=ee.ImageCollection("ECMWF/ERA5/MONTHLY")
var pr = imageCollection.filterDate('2010-01-01','2020-12-31')
var chart =
ui.Chart.image
.series({
imageCollection: pr.select('total_precipitation'),
region: geometry,
reducer: ee.Reducer.mean(),
scale: 27750,
xProperty: 'system:time_start'
})
.setSeriesNames(['total_precipitation'])
.setOptions({
title: 'ERA5 total_precipitation K',
hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}},
vAxis: {
title: 'precipitation (m)',
titleTextStyle: {italic: false, bold: true}
},
lineWidth: 2,
colors: ['e37d05', '1d6b99'],
curveType: 'function'
});
print(chart);
结果如下图所示: