I am using ERA5-Land Monthly Averaged - ECMWF Climate Reanalysis to calculate the annual potential evaporation globally. However, I cannot visualize the colour palette in my final output. The problem seems to be in the max and min palette values as there is no error in the code. Here is the code I am using-
//Evaporation ERA5 var era5 = ee.ImageCollection("ECMWF/ERA5_LAND/MONTHLY").select(38); var year = 2017; var startDate = ee.Date.fromYMD(year, 1, 1); var endDate = startDate.advance(1, 'year'); var fil_new = era5 .filter(ee.Filter.date('startDate', 'endDate')); var total = fil_new.reduce(ee.Reducer.mean()); print(total); var palette = ['000096','0064ff', '00b4ff', '33db80', '9beb4a','ffeb00', 'ffb300', 'ff6400', 'eb1e00', 'af0000']; var visParams = { min:0, max: 0.5, palette: palette}; Map.addLayer(total, visParams, 'Annual PET');
startDateandendDatein youree.Filter.dateshould not be enclosed in quotes, they are variable names.