1

I am trying to create cumulative monthly composites of precipitation from CFSR data in Google Earth Engine (i.e. each image would be mm/month for each month)

However, I realised that images ending with 'F00' do not have the precipitation band I need - Total_precipitation_surface_3_Hour_Accumulation - whereas those with 'F03' has that band.

As such, when I try creating an image collection of images with that specific band only, it pulls up the error: 'Pattern 'Total_precipitation_surface_3_Hour_Accumulation' did not match any bands'

How can I go about choosing only the images ending with the name 'F03'?

var dataset = ee.ImageCollection('NOAA/CFSR')
                  .filter(ee.Filter.date('2019-04-01', '2019-05-31'))
                  .map(function (image) { return image.clip(roi)})
                  .select('Total_precipitation_surface_3_Hour_Accumulation');
                  
print(dataset)

2

The hour is saved in the property forecast_hour of every Image. You can use this property and .filterMetadata() to filter only those with forecast_hour: 3. Here's the code:

var dataset = ee.ImageCollection('NOAA/CFSR')
                  .filter(ee.Filter.date('2019-04-01', '2019-05-31'))
                  .filterMetadata("forecast_hour", "equals", 3)
                  .map(function (image) { return image.clip(roi)})
                  .select('Total_precipitation_surface_3_Hour_Accumulation');
                  
print(dataset)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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