I want to download values of Air temperature from NCEP/NCAR Reanalysis Data, Surface Temperature in Google Earth Engine. I want the average temperature of every month from 1948 to present, but with my current script I get the monthly average, this is only one value for all the Januaries and so on..
What's wrong in the script?
// Importa una colección de imágenes
var TEMP = ee.ImageCollection('NCEP_RE/surface_temp')
//.select('precipitation')
//.filterDate('2015-01-01','2015-12-31');
print(TEMP)
//Funcion para sumar la PPT mensual (devuelve una lista de imagenes)
var months = ee.List.sequence(1, 12);
var TEMP_mensual = months.map(function(m) {
// Filter to 1 month.
return TEMP.filter(ee.Filter.calendarRange(m, m, 'month')).mean();
});
var TEMPmIC = ee.ImageCollection(TEMP_mensual)
print(TEMPmIC)
// Importa puntos para hacer la extracción desde una Fusion Table
var puntos = ee.FeatureCollection('ft:1_53GKyY5xjt2EJwNLI9hw2LFh5D0sOmCgCdSA-Zj');
// Agrega los puntos al mapa
Map.addLayer(puntos);
Map.setCenter(-105, 19.6, 9);
// Función para extraer los puntos en un bucle
//Tiene el sacle fijado en 30 por que reduceregions no tabaja con WGS84
// que es la proj nativa de TRMM, pero en este caso el 30 no tiene mas
// sentido que darle un scale a la función
var datos = TEMPmIC.map(function(i){
return i.reduceRegions(puntos, 'first', 30)
})
//var dat = collection.reduceRegions(puntos, 'first')
var extract = ee.FeatureCollection(datos.flatten())
print(extract)
//EXPORTAR
Export.table.toDrive({
collection: extract,
folder: 'ee_extract',
description: 'airtemp_pruebamean',
fileFormat: 'CSV',
});