@BeginModule
@NewPage
@Name      = Split
@Title     = Split a dataset
@Section   = File operations
@Class     = File operation
@Arguments = ifile obase
@Operators = splitcode splitparam splitname splitlevel splitgrid splitzaxis splittabnum

@BeginDescription
This module splits @file{ifile} into 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_splitcode
@Title     = Split code numbers

@BeginDescription
Splits a dataset into pieces, one for each different code number.
@file{xxx} will have three digits with the code number.
@EndDescription
@EndOperator


@BeginOperator_splitparam
@Title     = Split parammeter identifiers

@BeginDescription
Splits a dataset into pieces, one for each different parammeter identifier.
@file{xxx} will be a string with the parammeter identifier.
@EndDescription
@EndOperator


@BeginOperator_splitname
@Title     = Split variable names

@BeginDescription
Splits a dataset into pieces, one for each variable name.
@file{xxx} will be a string with the variable name.
@EndDescription
@EndOperator


@BeginOperator_splitlevel
@Title     = Split levels

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


@BeginOperator_splitgrid
@Title     = Split grids

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


@BeginOperator_splitzaxis
@Title     = Split z-axes

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


@BeginOperator_splittabnum
@Title     = Split parameter table numbers

@BeginDescription
Splits a dataset into pieces, one for each GRIB1 parameter table number.
@file{xxx} will have three digits with the GRIB1 parameter table number.
@EndDescription


@c @BeginOperator_splitrec
@c @Title     = Split records

@c @BeginDescription
@c Splits a dataset into pieces, one for each record.
@c @file{xxx} will have six digits with the record number.
@c @EndDescription


@BeginEnvironment
@Item = CDO_FILE_SUFFIX
This environment variable can be used to 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


@BeginExample
Assume an input GRIB1 dataset with three variables, e.g. code number 129, 130 and 139.
To split this dataset into three pieces, one for each code number use:
@BeginVerbatim
   cdo splitcode ifile code
@EndVerbatim
Result of '{\tt dir code*}':
@BeginListing
   code129.grb code130.grb code139.grb
@EndListing
@EndExample
