Opened 10 years ago
Last modified 10 years ago
#184 new defect
Problema con la proyección de los datos del CMCC para FUME
Reported by: | bediaj@… | Owned by: | sixto |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Proyectos | Keywords: | FUME, CMCC, GRID, CDO, NCO, netcdf, grid, proyeccion |
Cc: | bediaj@…, sixto, antonio |
Description
Hola Antonio y SIxto
He recibido un correo de unos partners de FUME (Universidad de Lund) que al parecer tienen algún problema con algunos de los netCDF del THREDDS.
¿Podríais echarle un vistazo a esto a ver si realmente hay algún problema?.
Gracias
Juaco
Asunto: Fwd: The climate files
Fecha: Fri, 3 Aug 2012 09:05:40 +0200
De: Daniel Hagberg <daniel@…>
Para: <bediaj@…>
CC: Kirsten Thonicke <Kirsten.Thonicke@…>, Almut Arneth <almut.arneth@…>
Dear Joaquin,
My name is Daniel Hagberg and Im working with Almut regarding the merging of climate files into LPJ-Guess for the FUME project.
The case is that I have some findings(problems) that you might be interested in.
There are recurring lines in precipitation and temperature in the
datasets (I never checked the others). With lines I mean, almost
constant values following a line in the gridspace. See attached pdfs to
show som example of this ...
I have problems reading the CMCC files. The nco programs complains about
out of bounds data and the cdo program complained about nongridded data.
It seems that there is some missing setup in the file concerning the data
dependences. The reason for us trying to manipulate the file is that we
need to transform the coordinate system.
I dont know if its a fuss, but in the KNMI files there is a number
-0.094 W/m2 for the short wave radiation showing up everywhere. One
example is given below.
Command:
ncks -v rss KNMI_ECHAM5_rss_CTL_DM_1997.nc |grep
"lon\[[0-9]*\]=\-35\.75" |grep "lat\[92\]" |grep "time\[349\]"
gives:
time[349]=17516 lat[92]=71.75 lon[5]=-35.75 rss[7388628]=-0.094815 W m-2
I hope that I downloaded the files from the right location(http://www.meteo.unican.es/thredds/fileServer/FUME/"something"),
because I also found similar files in http://www.meteo.unican.es/thredds/catalog/FUME/"something". It would be kind if you could respond to this.
Best Regards
Daniel
--
Daniel Hagberg
Physical Geography and Ecosystem Analysis
Land-Atmosphere Group
Lund University
Sölvegatan 12, 22362 Lund, Sweden.
Email Daniel.Hagberg@…
Phone +46 46 2223659
Cellphone +46 735925452
Change History (3)
comment:1 in reply to: ↑ description ; follow-up: ↓ 2 Changed 10 years ago by antonio
comment:2 in reply to: ↑ 1 Changed 10 years ago by antonio
Sixto,
Las variables lat y lon tienen 2 dimensiones
double lat(lat=187, lon=367);
ya que mirando las variable originales están en otra proyección. Es un poco confuso que las hayas llamado a las dimensiones lat lon también, ya que normalmente se las llama x, y o GeoX, GeoY, ....... de todas formas aunque al ToolsUI no le molesta y es capaza de proesar el fichero, formalmente a la variable pr hay que añadirle el atributo coordinates, para clarifiarle que aunque sus dimensiones sean x y, sus coordenadas son 2 variables 2D (lon lat)
Al faltar ese atributo las CDO no reconocen el GRID ....
$ cdo griddes CMCC_CLM_pr_20C3M_DM_2000.nc # # gridID 0 # gridtype = generic gridsize = 68629 xname = x xunits = degrees yname = y yunits = degrees xsize = 367 ysize = 187 cdo griddes: Processed 3 variables. ( 0.00s )
Con las nco se puede añadir el atributo usando
$ ncatted -a coordinates,pr,a,c,"lon lat" CMCC_CLM_pr_20C3M_DM_2000.nc prueba4.nc
indicandole la variable a la que se lo quieres añadir (pr). Para que no esté confuso quizas sea conveniente que renombres las dimensiones ....
$ ncrename -d lon,x prueba4.nc $ ncrename -d lat,x prueba4.nc
[tienes que asegurarte de que lat -> y y lon -> x, aunque mirando los datos originales del CMCC parece que es así]
y ahora las CDO reconocen un grid curvilinear
$ cdo griddes prueba4.nc # # gridID 0 # gridtype = curvilinear gridsize = 68629 xname = lon xlongname = longitude xunits = degrees east yname = lat ylongname = latitude yunits = degrees north xsize = 367 ysize = 187 xvals = -11.6806383 -11.5548439 -11.4289408 -11.3029299 -11.1768112 -11.0505857 -10.9242535 -10.7978144 -10.6712694 -10.5446196 -10.4178638 -10.2910042 -10.1640406 -10.036972 -9.90980148 -9.78252697 -9.65515137 -9.52767277 -9.40009308 -9.2724123 -9.14463139 -9.01675034 -8.88876915 -8.76068974 -8.63251114 -8.50423527 -8.37586117 -8.24738979 -8.11882305 -7.99015903 -7.86139965 -7.73254538 -7.60359669 -7.47455406 -7.34541798 -7.21618891 -7.08686733 -6.9574542 -6.82794952 -6.69835377 -6.56866837 -6.43889284 -6.30902863 -6.17907572 -6.0490346 -5.91890621 -5.78869104 -5.65838957 ............................[lo he recortado para simplificar]............................ 49.5228844 49.4754181 49.4276924 49.3797073 49.3314705 49.2829781 49.2342339 49.1852341 49.1359825 49.0864792 49.0367279 48.9867287 48.9364777 48.8859825 48.8352432 48.784256 48.7330246 48.6815491 48.6298332 48.5778732 48.5256767 48.4732399 48.4205627 48.3676491 48.3144989 48.2611122 48.207489 48.1536331 48.0995483 48.0452271 47.9906769 47.9358978 47.8808861 47.8256493 47.7701836 47.7144928 47.658577 47.6024361 47.5460701 47.4894829 47.4326744 47.3756447 47.3183975 47.2609291 47.2032433 47.14534 47.0872231 47.0288887 46.9703407 46.9115791 46.8526077 46.7934227 46.7340279 cdo griddes: Processed 1 variable. ( 0.22s )
Usando ncml, se haría de la siguiente forma
<?xml version="1.0" encoding="UTF-8"?> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" location="CMCC_CLM_pr_20C3M_DM_2000.nc"> <dimension name="y" orgName="lat" /> <dimension name="x" orgName="lon" /> <variable name="pr"> <attribute name="coordinates" value="lon lat"/> </variable> </netcdf>
A.
Replying to antonio:
Replying to bediaj@…:
comment:3 Changed 10 years ago by sixto
ok, gracias. No entiendo porqué no está incluido ese atributo. Como el CMCC era algo "especial" igual se me olvidó incluirlo en el script.Este fin de semana lo arreglo.
Un saludo,
sixto
Replying to bediaj@…:
El 03/08/2012 10:07, Sixto Herrera García escribió: