wrong timestep deleted with "-delete,timestep=" operator
Added by Guillaume S over 5 years ago
Hello,
I try to remove a selected timestep from a netcdf file using "-delete,timestep=".
Here is a sample of "cdo info" command on the netcdf file before removing the timestep (timestep 605):
...
603 : 2016-05-30 00:00:00 1 131072 0 : -17.054 -0.087363 21.367 : -3
604 : 2016-05-30 06:00:00 1 131072 0 : -21.466 0.18983 22.705 : -3
605 : 2016-05-30 12:00:00 1 131072 0 : -33.474 0.24367 188.04 : -3
606 : 2016-05-30 18:00:00 1 131072 0 : -20.238 0.30653 21.709 : -3
607 : 2016-05-31 00:00:00 1 131072 0 : -17.793 0.25734 22.546 : -3
...
And this is a sample of the same command piped with "-delete,timestep=605":
...
603 : 2016-05-30 00:00:00 1 131072 0 : -17.054 -0.087363 21.367 : -3
604 : 2016-05-30 06:00:00 1 131072 0 : -21.466 0.18983 22.705 : -3
605 : 2016-05-30 12:00:00 1 131072 0 : -33.474 0.24367 188.04 : -3
606 : 2016-05-30 18:00:00 1 131072 0 : -20.238 0.30653 21.709 : -3
607 : 2016-05-31 06:00:00 1 131072 0 : -16.699 0.44606 22.912 : -3
...
As you can see, the timestep 605 corresponding to the date "2016-05-30 12:00:00" in the first case is still present in the second case where it should be not.
And the date "2016-05-31 00:00:00" which corresponds to timestep 607 in the first case has been deleted in the second case (but this not the selected timestep !).
Am I doing something wrong or misunderstanding something ? Or is it an issue with "delete,timestep" ?
Thanks for your help.
Cheers,
Guillaume
Replies (4)
RE: wrong timestep deleted with "-delete,timestep=" operator - Added by Guillaume S over 5 years ago
PS: everything works as expected with the "-delete,date=2016-05-30T12:00:00" command
RE: wrong timestep deleted with "-delete,timestep=" operator - Added by Ralf Mueller over 5 years ago
hi Guillaume!
could you do a cross-check with the deltimestep,605
operation or possible upload the file?
cheers
ralf
RE: wrong timestep deleted with "-delete,timestep=" operator - Added by Guillaume S over 5 years ago
I don't have this operator with the 1.9.7.1 CDO version, any other alternative to try ? Thanks !
Guillaume
RE: wrong timestep deleted with "-delete,timestep=" operator - Added by Ralf Mueller over 5 years ago
Ah, by fault - this was an old operator, it's not available anymore. I did some checks with testing data and they all worked fine:
% cdo -f nc infov -settaxis,2002-12-12,00:00:00 -for,1,20 cdo(1) settaxis: Process started cdo(2) seq: Process started -1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter name 1 : 2002-12-12 00:00:00 0 1 0 : 1.0000 : seq 2 : 2002-12-13 00:00:00 0 1 0 : 2.0000 : seq 3 : 2002-12-14 00:00:00 0 1 0 : 3.0000 : seq 4 : 2002-12-15 00:00:00 0 1 0 : 4.0000 : seq 5 : 2002-12-16 00:00:00 0 1 0 : 5.0000 : seq 6 : 2002-12-17 00:00:00 0 1 0 : 6.0000 : seq 7 : 2002-12-18 00:00:00 0 1 0 : 7.0000 : seq 8 : 2002-12-19 00:00:00 0 1 0 : 8.0000 : seq 9 : 2002-12-20 00:00:00 0 1 0 : 9.0000 : seq 10 : 2002-12-21 00:00:00 0 1 0 : 10.000 : seq 11 : 2002-12-22 00:00:00 0 1 0 : 11.000 : seq 12 : 2002-12-23 00:00:00 0 1 0 : 12.000 : seq 13 : 2002-12-24 00:00:00 0 1 0 : 13.000 : seq 14 : 2002-12-25 00:00:00 0 1 0 : 14.000 : seq 15 : 2002-12-26 00:00:00 0 1 0 : 15.000 : seq 16 : 2002-12-27 00:00:00 0 1 0 : 16.000 : seq 17 : 2002-12-28 00:00:00 0 1 0 : 17.000 : seq 18 : 2002-12-29 00:00:00 0 1 0 : 18.000 : seq 19 : 2002-12-30 00:00:00 0 1 0 : 19.000 : seq 20 : 2002-12-31 00:00:00 0 1 0 : 20.000 : seq cdo(2) seq: cdo(1) settaxis: Processed 20 values from 1 variable. cdo infon: Processed 20 values from 1 variable [0.00s 37MB].
and with
delete,timestep=...
% cdo -f nc infov -delete,timestep=17 -settaxis,2002-12-12,00:00:00 -for,1,20 cdo(1) delete: Process started cdo(2) settaxis: Process started cdo(3) seq: Process started -1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter name 1 : 2002-12-12 00:00:00 0 1 0 : 1.0000 : seq 2 : 2002-12-13 00:00:00 0 1 0 : 2.0000 : seq 3 : 2002-12-14 00:00:00 0 1 0 : 3.0000 : seq 4 : 2002-12-15 00:00:00 0 1 0 : 4.0000 : seq 5 : 2002-12-16 00:00:00 0 1 0 : 5.0000 : seq 6 : 2002-12-17 00:00:00 0 1 0 : 6.0000 : seq 7 : 2002-12-18 00:00:00 0 1 0 : 7.0000 : seq 8 : 2002-12-19 00:00:00 0 1 0 : 8.0000 : seq 9 : 2002-12-20 00:00:00 0 1 0 : 9.0000 : seq 10 : 2002-12-21 00:00:00 0 1 0 : 10.000 : seq 11 : 2002-12-22 00:00:00 0 1 0 : 11.000 : seq 12 : 2002-12-23 00:00:00 0 1 0 : 12.000 : seq 13 : 2002-12-24 00:00:00 0 1 0 : 13.000 : seq 14 : 2002-12-25 00:00:00 0 1 0 : 14.000 : seq 15 : 2002-12-26 00:00:00 0 1 0 : 15.000 : seq 16 : 2002-12-27 00:00:00 0 1 0 : 16.000 : seq 17 : 2002-12-29 00:00:00 0 1 0 : 18.000 : seq 18 : 2002-12-30 00:00:00 0 1 0 : 19.000 : seq 19 : 2002-12-31 00:00:00 0 1 0 : 20.000 : seq cdo(3) seq: cdo(2) settaxis: Processed 20 values from 1 variable. cdo(1) delete: Processed 19 values from 1 variable. cdo infon: Processed 19 values from 1 variable [0.00s 37MB].
So I guess your problem can only be solved having the data.
cheers
ralf