0

I'm new to GEE and I'm trying to create time series of NEX-GDDP Maximum data.

var roi = ee.FeatureCollection('users/prantoroy/Jessore_Dist');
var tempset = ee.ImageCollection("NASA/NEX-GDDP");

var startD = ee.Date('2000-01-01');
var Range = ee.DateRange(startD,startD.advance(20,'year'));

var intersect = tempset.filterDate(Range);

var selectBands = intersect.select('tasmax');

var temptoC = selectBands.map(function (img){
  return img
  .subtract(273.15)
  .copyProperties(img, ['system:time_start']);
});
    

var chart = ui.Chart.image.series({
  imageCollection:temptoC ,
  region:roi,
  reducer: ee.Reducer.mean(),
  scale:10000,
  xProperty:'system:time_start'
}).setOptions({
  title: 'Air Temperature 1990 to 2020 (Mean) Jessore District, Bangladesh',
  vAxis: {title: 'Min Temp'}
});
    
print(chart);
    
var MeanLST = temptoC.mean().clip(roi);

Map.centerObject(roi);
Map.addLayer(MeanLST,
            {min: -1, max:1, palette: ['blue','red']},
            'Max Temp 2000 to 2020');
Map.addLayer(roi);

But every time I get the same error.

Error generating chart: User memory limit exceeded.

I tried decreasing the years to 10, 5 and 2, but the problem still persists. I understand that my code is not efficient at all. Can someone please help me with a working version?

1 Answer 1

2

You are trying to calculate a temporal mean and regional mean time series chart for 260,666 observations. This is just a lot of data. Two issues I see here:

  1. The NASA/NEX-GDDP dataset includes 21 models and multiple greenhouse gas concentration scenarios, each at daily cadence (each unique combination is an image in the collection). Try filtering to a single model and scenario:
var  nex = ee.ImageCollection("NASA/NEX-GDDP")
  .filterDate('2010-01-01', '2010-01-02');  // 1 day
print('Unfiltered observations:', nex);
print('Models:', ee.List(nex.aggregate_array('model')).distinct());
print('Scenarios:', ee.List(nex.aggregate_array('scenario')).distinct());

// Filter by model and scenario.
var nexFiltered = nex.filter(ee.Filter.and(
  ee.Filter.eq('model', 'BNU-ESM'), ee.Filter.eq('scenario', 'rcp85')));
print('Filtered observations:', nexFiltered);
  1. Daily precision for calculating a 20-year mean seems unwarranted (i.e. a mean of monthly means will likely get you about the same answer.) My recommendation would be to use the NEX-DCP30 ensemble dataset, which is a monthly statistic. Note that it also includes a variety of greenhouse gas concentration scenarios, so you'll want to filter by 'scenario'.

Additionally, I see the you are interested in historical climate; note that NEX-GDDP data are modeled projections (there is a "historical" scenario pre-2006, but better historical datasets exist). You might check out ERA5 monthly and daily aggregates instead.

1
  • Thank you very much. Learned a lot from this answer. I actually didn't know about the models and scenarios. I am now familiar with the process of filtering these properties.
    – Bishal Roy
    Jul 13, 2021 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.