CDO longitude shift
Added by Bjorn Stevens about 6 years ago
This follows up on an earlier email inquiry; I decided to try and use this support page. My question has to do with why a CDO remap shifts my longitudes by 180 deg, this is noticeable in the longitudes of the first cdo sinfo command shown below, where it states 'lon : 180.05 to 539.95 by 0.1 degrees_east circular'. I suspect it has to do with my weights, but am not sure. In anycase here are the details:
$cdo -P 2 remap,/work/ka1081/Hackathon/GrossStats/0.10_grid.nc,/work/ka1081/Hackathon/GrossStats/ICON_R2B10_0.10_grid_wghts.nc -selname,TQV_DIA /work/ka1081/DYAMOND/ICON-2.5km/nwp_R2B10_lkm1007_atm1_2d_ml_20160803T000000Z.grb TQV_DIA_0803_remap.grb
$ cdo sinfo TQV_DIA_0803_remap.grb
File format : GRIB2
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter ID
1 : MPIMET unknown v instant 1 1 6480000 1 P16 : 214.1.0
Grid coordinates :
1 : lonlat : points=6480000 (3600x1800)
lon : 180.05 to 539.95 by 0.1 degrees_east circular
lat : -89.95 to 89.95 by 0.1 degrees_north
Vertical coordinates :
1 : surface : levels=1
Time coordinate : unlimited steps
...
For reference
$ cdo sinfo /work/ka1081/Hackathon/GrossStats/0.10_grid.nc
File format : NetCDF2
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter ID
1 : unknown unknown c instant 1 1 6480000 1 F32 : -1
Grid coordinates :
1 : lonlat : points=6480000 (3600x1800)
lon : -179.95 to 179.95 by 0.1 degrees_east circular
lat : -89.95 to 89.95 by 0.1 degrees_north
Vertical coordinates :
1 : surface : levels=1
cdo sinfo: Processed 1 variable [0.03s 32MB]
The weights were created as
ncdump -h /work/ka1081/Hackathon/GrossStats/ICON_R2B10_0.10_grid_wghts.nc
...
// global attributes:
:_NCProperties = "version=1|netcdflibversion=4.6.1|hdf5libversion=1.8.14" ;
:title = "SCRIP remapping with CDO" ;
:normalization = "fracarea" ;
:map_method = "Conservative remapping using clipping on sphere" ;
:conventions = "SCRIP" ;
:source_grid = "unstructured" ;
:dest_grid = "lonlat" ;
:history = "31 Aug 2018 : cdo -P 16 --cellsearchmethod spherepart genycon,0.10_grid.nc -selname,cell_area /work/bk1040/experiments/input/2.5km/icon_grid_0017_R02B10_G.nc ICON_0.10_grid_wghts.nc" ;
:CDO = "Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo)" ;
}
Replies (1)
RE: CDO longitude shift - Added by Uwe Schulzweida about 6 years ago
GRIB2 can't store negative longitudes. Therefore the longitudes need to be recalculated when reading the data. That has led to these incorrect values.
This problem has been fixed for the next CDO release. A prerelease for testing is available on mistral:/pf/zmaw/m214003/local/bin/cdo.
/pf/zmaw/m214003/local/bin/cdo sinfo TQV_DIA_0803_remap.grb File format : GRIB2 -1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter ID 1 : MPIMET unknown v instant 1 1 6480000 1 P16 : 214.1.0 Grid coordinates : 1 : lonlat : points=6480000 (3600x1800) lon : -179.95 to 179.95 by 0.1 degrees_east circular lat : -89.95 to 89.95 by 0.1 degrees_north Vertical coordinates : 1 : surface : levels=1 Time coordinate : unlimited steps ...