0

我正在尝试从 Google 地球引擎中的 ERA5 数据集中提取与点特征相交的每日平均温度的时间序列。对于某些年(例如,“1979”到“1980”),输出会抛出“内部服务器错误”。其他范围工作正常。

有没有更直接的方法从包含这么多数据点的整个图像集合中提取时间序列,或者服务器是否总是超载?

谢谢!!

var aoi = ee.Geometry.Point([-62.7962, 58.45]);
print(aoi);
Map.addLayer(aoi);

var early = ('1979');
var late =  ('1980');

// Load in image collection and filter by area and date
var era5_dat = ee.ImageCollection('ECMWF/ERA5/DAILY')
.filterDate(early,late) //filter years of interest 
.select('mean_2m_air_temperature') //
.map(function(image){return image.clip(aoi)}); //Clips data based on 'aoi'

print('collection', era5_dat);

//Create variables and extract data
var scale = era5_dat.first().projection().nominalScale().multiply(0.05); print(scale);
era5_dat = era5_dat.filter(ee.Filter.listContains('system:band_names', era5_dat.first().bandNames().get(0)));

var ft = ee.FeatureCollection(ee.List([]));
//Function to extract values from image collection based on point file and export as a table 
var fill = function(img, ini) {
  var inift = ee.FeatureCollection(ini);
  var ft2 = img.reduceRegions(aoi, ee.Reducer.first(), scale);
  var date = img.date().format("YYYYMMdd");
  var ft3 = ft2.map(function(f){return f.set("date", date)});
return inift.merge(ft3);
};

// Iterates over the ImageCollection
var profile = ee.FeatureCollection(era5_dat.iterate(fill, ft));
print(profile,'profile');

// Export
Export.table.toDrive({
  collection : profile,
  description : "ERA5-"+early+"-"+late,
  fileNamePrefix : "ERA5-"+early+"-"+late,
  fileFormat : 'CSV',
  folder: 'ERA5 - Basecamp',
  selectors: ["date","first"]
});

4

0 回答 0