@BeginModule
@NewPage
@Name      = Splittime
@Title     = Split timesteps of a dataset
@Section   = File operations
@Class     = File operation
@Arguments = ifile obase
@Operators = splithour splitday splitseas splityear splityearmon splitmon

@BeginDescription
This module splits @file{ifile} into  timesteps pieces. The output files will be named
@file{<obase><xxx><suffix>} where @file{suffix} is the filename extension derived from the file format. 
@file{xxx} and the contents of the output files depends on the chosen operator. 
@EndDescription
@EndModule


@BeginOperator_splithour
@Title     = Split hours

@BeginDescription
Splits a file into pieces, one for each different hour.
@file{xxx} will have two digits with the hour.
@EndDescription
@EndOperator


@BeginOperator_splitday
@Title     = Split days

@BeginDescription
Splits a file into pieces, one for each different day.
@file{xxx} will have two digits with the day.
@EndDescription
@EndOperator


@BeginOperator_splitmon
@Title     = Split months
@Parameter = [format]

@BeginDescription
Splits a file into pieces, one for each different month.
@file{xxx} will have two digits with the month.
@EndDescription
@EndOperator


@BeginOperator_splitseas
@Title     = Split seasons

@BeginDescription
Splits a file into pieces, one for each different season.
@file{xxx} will have three characters with the season.
@EndDescription
@EndOperator


@BeginOperator_splityearmon
@Title     = Split in years and months

@BeginDescription
Splits a file into pieces, one for each different year and month.
@file{xxx} will have six digits with the year and month (YYYYMM).
@EndDescription
@EndOperator


@BeginOperator_splityear
@Title     = Split years

@BeginDescription
Splits a file into pieces, one for each different year.
@file{xxx} will have four digits with the year (YYYY).
@EndDescription
@EndOperator


@BeginParameter
@Item = format
STRING  C-style format for strftime() (e.g. \%B for the full month name)
@EndParameter


@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


@BeginNote
The operators in this module need to open all output files simultaneously.
The maximum number of open files depends on the operating system!
@EndNote


@BeginExample
Assume the input GRIB1 dataset has timesteps from
January to December. To split each month with all
variables into one separate file use:
@BeginVerbatim
   cdo splitmon ifile mon
@EndVerbatim
Result of '{\tt dir mon*}':
@BeginListing
   mon01.grb  mon02.grb  mon03.grb  mon04.grb  mon05.grb  mon06.grb
   mon07.grb  mon08.grb  mon09.grb  mon10.grb  mon11.grb  mon12.grb
@EndListing
@EndExample
