GEE Memory Limit – Solving ‘User Memory Limit Exceeded’ Error in ImageCollection.map() in GEE

google-earth-engine

I need to iterate to find the optimal parameters. So, I put these parameters as constant images into a ImageCollection, and use ImageCollection.map() to get the smallest error.
After my test, when the number of parameters is very small (maybe within 10), ideal results can be obtained. But I need to iterate 6000 times to find my optimal parameters. The error will be reported at this time: “ImageCollection (Error) User memory limit exceeded.” for calibiration variable.

var calibiration = paraImaeCollection.map(function(para){
  var bf = ee.Image(para).select('b').toFloat();
  var albedof = ee.Image(para).select('albedo').toFloat();
  var rouf = ee.Image(para).select('rou').toFloat();

  var err = s1vwcsmjoin.map(function(i){
    var vv = ee.Image(i.select('VV'));
    var vh = ee.Image(i.select('VH'));
    var thetaf = ee.Image(i.select('angle'));
    var smapsmf = ee.Image(i.get('bestSM'));
    var modisvwcf = ee.Image(i.get('bestVwc'));
    
    var fwd = forward(smapsmf,clay,rouf,thetaf,bf,albedof,modisvwcf);

    var vvdif = ee.Image(fwd.select('vv')).subtract(vv).abs().toFloat();
    var vhdif = ee.Image(fwd.select('vh')).subtract(vh).abs().toFloat();
    var avedif = ee.Image.constant(0.5).toFloat().multiply(vvdif.add(vhdif)).toFloat();
    
    return avedif.rename('avedif');
    });
  var errmean = err.mean().set('b',bf,'albedo',albedof,'rou',rouf).rename('avedif_min');
  return errmean;
  });
print(calibiration,'calibiration result')

Best Answer

The error already tells you what your problem is, you can't print that amount of information from the server side your console (client-side). Read the debugging guide on the earth engine developers website: https://developers.google.com/earth-engine/guides/debugging?hl=en

Related Question