Change X axis values (Longitude) and sort it in NetCDF file using CDO
Added by Anil Kumar over 10 years ago
Hi Everyone,
I have NetCDF file (attached for reference) having Grid Description below
*cdo griddes C:\WeatherGribFiles\2014\03\10\rtofs_glo_2ds_f024_daily_prog.nc #- gridID 2
#
_gridtype = lonlat
gridsize = 259200
xname = lon
xlongname = longitude
xunits = degrees_east
yname = lat
ylongname = latitude
yunits = degrees_north
xsize = 720
ysize = 360
xfirst = 74.16
xinc = 0.49998
yfirst = -90
yinc = 0.49998
cdo griddes: Processed 2 variables*
The NetCDF file Longitude as X axis and it starts from 74.16 and goes upto 433.646.
Can I add the Longitude values greater than 360 and add it to beginning of the file, so that longitude start from 0 to 360 in the resulted file and of-course data needed to be arranged according to Longitude order ?
I can not find any help regarding it. Any help would be greatly appreciated.
-Anil
Replies (2)
RE: Change X axis values (Longitude) and sort it in NetCDF file using CDO - Added by Ralf Mueller over 10 years ago
no way to change the dimension values with CDO. ncap2 from nco might work: http://nco.sourceforge.net/nco.html#Syntax-of-ncap2-statements Works similar to CDOs expr operator.
RE: Change X axis values (Longitude) and sort it in NetCDF file using CDO - Added by Anil Kumar over 10 years ago
Thanks Ralf. Will try using ncap2.
-Anil