seltimestep
Added by David Wang over 14 years ago
Hi,
I'd like to extract the first 1200 records (time steps) from a netcdf file. I understand seltimestep selects all time steps with a time step in a user given list. But it would be a super-long list. I wonder if there is a way to specify the start and end time steps to facilitate the selection.
Thanks,
David
Replies (5)
RE: seltimestep - Added by Uwe Schulzweida over 14 years ago
Hi David,
A list of integers can also be specified by first/last[/inc] (Docu)
cdo seltimestep,1/1200 ifile ofileRegards,
Uwe
RE: seltimestep - Added by David Wang over 14 years ago
Thank you very much, Uwe. I missed this part of the document.
RE: seltimestep - Added by Luke Davis almost 6 years ago
Thanks for posting this. I had been using the ugly workaround cdo seltimestep,$(seq 1 1200 | tr ' ' ',')
.
Frustrating how much this feature is hiding in the documentation. For individual commands like seltimestep
, there is no indication that a "range" can be provided -- instead the documentation reads "...in a user given list" for the command description, and says "comma-separated list" for the parameter description.
IMHO it would be better if the command descriptions read, for example, "..in a user given list or first/last[/inc]
range", or alternatively, if the parameter descriptions reads "comma-separated list or first/last[/inc]
range".
@Uwe Schulzweida would you folks consider changing the documentation in this way?