Remove leap days
Added by David Wang over 11 years ago
Hi, I have a multiple-year daily data file in netcdf from which I need to remove all leap days (Feb. 29). Can this be done with CDO? Here are the first a few output lines of "cdo sinfo $file". Thanks!
File format: netCDF2 -1 : Institut Source Ttype Levels Num Gridsize Num Dtype : Parameter ID 1 : unknown unknown instant 1 1 10 1 F32 : -1 2 : unknown unknown instant 1 1 10 1 F32 : -2 3 : unknown unknown instant 1 1 10 1 F32 : -3 4 : unknown unknown constant 1 1 10 1 F64 : -4 Grid coordinates : 1 : lonlat > size : dim = 10 nx = 0 ny = 10 lat : first = -16.5 last = -34.5 inc = -2 degrees_north Vertical coordinates : 1 : surface : 0 Time coordinate : 16802 steps RefTime = 1901-01-15 00:00:00 Units = hours Calendar = standard YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 1967-01-01 18:00:00 1967-01-02 18:00:00 1967-01-03 18:00:00 1967-01-04 18:00:00 1967-01-05 18:00:00 1967-01-06 18:00:00 1967-01-07 18:00:00 1967-01-08 18:00:00 1967-01-09 18:00:00 1967-01-10 18:00:00 1967-01-11 18:00:00 1967-01-12 18:00:00
Replies (1)
RE: Remove leap days - Added by David Wang over 11 years ago
OK. I figured. I'm amazed how easy it is with CDO. Well done, folks:)
cdo delete,month=2,day=29 ifile ofile