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')

1 Answer 1


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

  • Indeed, it is too large for print derectiely. I also try to Export it to drive, also "out of memory". But when I only loop a few times, it's okay. This proves that a single iteration does not exceed the specified memory.
    – dong fan
    Commented Nov 30, 2021 at 14:52

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.