no lat/lon under desired variable
Added by Vicki Lindsay almost 7 years ago
I have several NetCDF files from the same source, but they are in different formats. I had no problem working with year2013 data (NO2.year.avg.2013.nc) where the variable NO2 has lat/lon. But for year2010 data (NO2.year.avg.2010.nc) the lat/lon are stored as x and y. When I project the data in ArcGIS no projection is recognised. My question is how can I change the year2010 data to the same format of 2013 using cdo (i.e. with 'correct' lat and lon built under variable NO2), so I can project it correctly in places ArcGIS?
*NO2.year.avg.2010* 4 variables (excluding dimension variables): double time_bnds[bnds,time] float lon[x,y] units: degrees_east float lat[x,y] units: degrees_north float NO2[x,y,time] units: ug/m3 _FillValue: -999 missing_value: -999 4 dimensions: time Size:1 *** is unlimited *** standard_name: time bounds: time_bnds units: day as %Y%m%d.%f calendar: proleptic_gregorian axis: T bnds Size:2 x Size:491 y Size:344 *NO2.year.avg.2013* 2 variables (excluding dimension variables): double time_bnds[bnds,time] (Chunking: [2,1]) float NO2[lon,lat,time] (Chunking: [701,401,1]) long_name: NO2 units: ug _FillValue: -999 missing_value: -999 4 dimensions: time Size:1 *** is unlimited *** standard_name: time long_name: time at end of period bounds: time_bnds units: day as %Y%m%d.%f calendar: proleptic_gregorian axis: T bnds Size:2 lon Size:701 standard_name: longitude long_name: longitude units: degrees_east axis: X lat Size:401 standard_name: latitude long_name: latitude units: degrees_north axis: Y
Replies (4)
RE: no lat/lon under desired variable - Added by Vicki Lindsay almost 7 years ago
sinfon for the data:
*NO2.year.avg.2010* File format : NetCDF2 -1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name 1 : unknown unknown c instant 1 1 168904 1 F32 : lon 2 : unknown unknown c instant 1 1 168904 1 F32 : lat 3 : unknown unknown v instant 1 1 168904 1 F32 : NO2 Grid coordinates : 1 : generic : points=168904 (491x344) Vertical coordinates : 1 : surface : levels=1 Time coordinate : 1 step YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2010-07-02 11:30:00 *NO2.year.avg.2013* File format : NetCDF -1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name 1 : unknown unknown v instant 1 1 281101 1 F32 : NO2 Grid coordinates : 1 : lonlat : points=281101 (701x401) lon : -25 to 45 by 0.1 degrees_east lat : 30 to 70 by 0.1 degrees_north Vertical coordinates : 1 : surface : levels=1 Time coordinate : 1 step YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2013-07-02 11:30:00
RE: no lat/lon under desired variable - Added by Ralf Mueller almost 7 years ago
the two files have completely different grids: 2010-dataset is curvilinear, 2013 is a regular lonlat grid, both cover Europe. you can interpolate the curvilinera grid into the other one with
- add the
coordinates
attribute to the inputcdo setattribute,NO2@coordinates="lat lon" NO2.year.avg.2010.nc NO2.year.avg.2010--.nc
- use bilinear interpolation onto the target grid from 2013
cdo remapbil,NO2.year.avg.2013.nc NO2.year.avg.2010--.nc NO2.year.avg.2010-LONLAT.nc
I noticed, that the 2010 domain is slightly smaller than the one from 2013
hth
ralf
RE: no lat/lon under desired variable - Added by Vicki Lindsay almost 7 years ago
Saved my day! Thank you!!!