@BeginModule
@Name      = Splitsel
@Title     = Split selected timesteps
@Section   = File operations
@Arguments = ifile obase
@Operators = splitsel

@C @BeginDescription
@C This module splits timesteps of a dataset to several files with names
@C formed from the field header information and @file{obase}.
@C @EndDescription
@EndModule


@BeginOperator_splitsel
@Title     = Split time selection
@Parameter = nsets [noffset] [nskip]

@BeginDescription
This operator splits @file{ifile} into pieces, one for each adjacent
sequence @math{t_1, ...., t_n} of timesteps of the same selected time range.
The output files will be named @file{<obase><nnnnnn><suffix>} where @file{nnnnnn} is the 
sequence number and @file{suffix} is the filename extension derived from the file format.
@EndDescription
@EndOperator


@BeginEnvironment
@Item = CDO_FILE_SUFFIX
Set the default file suffix. This suffix will be added to the output file 
names instead of the filename extension derived from the file format. 
Set this variable to NULL to disable the adding of a file suffix.
@EndEnvironment


@BeginParameter noffset
@Item = nsets
INTEGER  Number of input timesteps for each output file
@Item = noffset
INTEGER  Number of input timesteps skipped before the first timestep range (optional)
@Item = nskip
INTEGER  Number of input timesteps skipped between timestep ranges (optional)
@EndParameter
