@BeginModule
@NewPage
@Name      = Select
@Title     = Select fields
@Section   = Selection
@Class     = Selection
@Arguments = ifile ofile
@Operators = selcode delcode selname delname selstdname sellevel sellevidx selgrid selgridname selzaxis selzaxisname selltype seltabnum

@BeginDescription
This module selects some fields from @file{ifile} and writes them to @file{ofile}.
The fields selected depend on the actual operator and the parameters.
@EndDescription
@EndModule


@BeginOperator_selcode
@Title     = Select variables by code number
@Parameter = codes

@BeginDescription
Selects all fields with code numbers in a user given list.
@EndDescription
@EndOperator


@BeginOperator_delcode
@Title     = Delete variables by code number
@Parameter = codes

@BeginDescription
Deletes all fields with code numbers in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selname
@Title     = Select variables by name
@Parameter = varnames

@BeginDescription
Selects all fields with variable names in a user given list.
@EndDescription
@EndOperator


@BeginOperator_delname
@Title     = Delete variables by name
@Parameter = varnames

@BeginDescription
Deletes all fields with variable names in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selstdname
@Title     = Select variables by standard name
@Parameter = stdnames

@BeginDescription
Selects all fields with standard names in a user given list.
@EndDescription
@EndOperator


@BeginOperator_sellevel
@Title     = Select levels
@Parameter = levels

@BeginDescription
Selects all fields with levels in a user given list.
@EndDescription
@EndOperator


@BeginOperator_sellevidx
@Title     = Select levels by index
@Parameter = levidx

@BeginDescription
Selects all fields with index of levels in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selgrid
@Title     = Select grids
@Parameter = grids

@BeginDescription
Selects all fields with grids in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selgridname
@Title     = Select grids by name
@Parameter = gridnames

@BeginDescription
Selects all fields with grid names in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selzaxis
@Title     = Select zaxes
@Parameter = zaxes

@BeginDescription
Selects all fields with zaxes in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selzaxisname
@Title     = Select zaxes by name
@Parameter = zaxisnames

@BeginDescription
Selects all fields with zaxis names in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selltype
@Title     = Select GRIB level types
@Parameter = ltypes

@BeginDescription
Selects all fields with GRIB level type in a user given list.
@EndDescription
@EndOperator


@BeginOperator_seltabnum
@Title     = Select parameter table numbers
@Parameter = tabnums

@BeginDescription
Selects all fields with parameter table numbers in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selrec
@Title     = Select records
@Parameter = records

@BeginDescription
Selects all fields with record numbers in a user given list.
This operator can not be used with netCDF data!
@EndDescription
@EndOperator


@BeginParameter
@Item = codes
INTEGER  Comma separated list of code numbers
@Item = varnames
STRING   Comma separated list of variable names
@Item = stdnames
STRING   Comma separated list of standard names
@Item = levels
FLOAT    Comma separated list of levels
@Item = levidx
INTEGER  Comma separated list of index of levels
@Item = ltypes
INTEGER  Comma separated list of GRIB level types
@Item = grids
INTEGER  Comma separated list of grid numbers
@Item = gridnames
STRING   Comma separated list of grid names
@Item = zaxes
INTEGER  Comma separated list of zaxis numbers
@Item = zaxisnames
STRING   Comma separated list of zaxis names
@Item = tabnums
INTEGER  Comma separated list of parameter table numbers
@C @Item = records
@C INTEGER  Comma separated list of records
@EndParameter


@C @BeginExample
@CAssume an input dataset has three variables with the code numbers 129, 130 and 139.
@CTo select the variables with the code number 129 and 139 use:
@C@BeginVerbatim
@C   cdo selcode,129,139 ifile ofile
@C@EndVerbatim
@CYou can also select the code number 129 and 139 by deleting the code number 130 with:
@C@BeginVerbatim
@C   cdo delcode,130 ifile ofile
@C@EndVerbatim
@C@EndExample
