Using Google Earth Engine to extract FLDAS dataset for specific coordinates for the time period 1990-2020.
I use Rainf_f_tavg Precipitation bands with the default format is kg m-2 s-1
.
Then i multiply it by * 86400 * 30 to convert that default units to mm/month
.
But.. there is an error that says
Line 1: ee.ImageCollection(...).filter(...).select(...).multiply is not a function
I have also tried several script combinations : (1)
var dataset=ee.ImageCollection("NASA/FLDAS/NOAH01/C/GL/M/V001")
.filter(ee.Filter.date('2020-12-01', '2021-05-31'));
var layer = dataset.select('Rainf_f_tavg');
var Precip = dataset.expression(
'P * 86400 * 30', {
P: dataset.select('Rainf_f_tavg')
}
).float();
var band_viz = {
min: 0,
max: 400,
opacity: 1.0,
palette: ['#FFFFFF', '#00FFFF', '#0080FF', '#DA00FF', '#FFA400','#FF0000']
};
Map.addLayer(Precip, band_viz, 'Precipitation (mm)', true);
Map.addLayer(sampel, {color: 'black'}, 'Sampel');
var testPoint = ee.Feature(sampel.first())
//Map.centerObject(testPoint, 10)
var chart = ui.Chart.image.series({
imageCollection: dataset.select('Rainf_f_tavg'),
region: testPoint.geometry()
}).setOptions({
interpolateNulls: true,
lineWidth: 1,
pointSize: 3,
title: 'Soil Moisture over Time at a Single Location',
vAxis: {title: 'Soil'},
hAxis: {title: 'Date', format: 'YYYY-MMM', gridlines: {count: 12}}
})
print(chart)
(2)
var dataset=ee.ImageCollection("NASA/FLDAS/NOAH01/C/GL/M/V001")
.filter(ee.Filter.date('2020-12-01', '2021-05-31')).select('Rainf_f_tavg')
.multiply(86400*30);
var band_viz = {
min: 0,
max: 400,
opacity: 1.0,
palette: ['#FFFFFF', '#00FFFF', '#0080FF', '#DA00FF', '#FFA400','#FF0000']
};
Map.addLayer(dataset, band_viz, 'Precipitation (mm)', true);
This error stays the same.