I want to extract average daily wind speeds over the Netherlands (NL below) at 1pm from the ERA 5 dataset on GEE.
I am trying to map over an image collection, and for some reason it is telling me that "u.pow is not a function". The formula is right (I tested it on a single image).
It's the calcwind
variable that doesn't run as a result. If I understand correctly, this code should add a windspeed attribute to the dataset which I will then use to identify days with low wind speed.
I will compare this wind data to S5P NO2 data, which should contain u and v wind vectors (see Panoply screenshot below), but unfortunately this seems to be excluded in the GEE L3 NO2 dataset...
//Setup
var countries = ee.FeatureCollection("FAO/GAUL/2015/level0");
var NL = countries.filterMetadata('ADM0_NAME', 'equals', 'Netherlands');
var ERA5 = ee.ImageCollection("ECMWF/ERA5_LAND/HOURLY")
.filter(ee.Filter.date('2020-07-01', '2020-07-02'))
.filterMetadata('hour', 'equals', 13);
var ERA5NL=ERA5.map(function(im){
return im.clip(NL)
})
// Wind calculation
var u = ERA5NL.select('u_component_of_wind_10m');
var v = ERA5NL.select('v_component_of_wind_10m');
var calcwind = function(feature) {
return feature.set({windspeed:((u.pow(2)).add(v.pow(2)).sqrt()) })
};
var ERA5x = ERA5NL.map(calcwind);
//Mapping
var vis = {
min: 0,
max: 5,
palette: [
'#FFFFFF', '#FFFF71', '#DEFF00', '#9EFF00', '#77B038', '#007E55', '#005F51',
'#004B51', '#013A7B', '#023AAD'
]
};
Map.setCenter(5.5, 52, 7.5);
Map.addLayer(ERA5x.select('windspeed'), vis, "Wind speed (m/s) 10m above surface");