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

@BeginDescription
This module selects some fields from @file{ifile} and writes them to @file{ofile}.
The fields selected depend on the chosen 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_selzaxis
@Title     = Select z-axes
@Parameter = zaxes

@BeginDescription
Selects all fields with z-axes 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
STRING   Comma separated list of grid names or numbers
@Item = zaxes
STRING   Comma separated list of z-axis names or numbers
@Item = tabnums
INTEGER  Comma separated list of parameter table numbers
@C @Item = records
@C INTEGER  Comma separated list of records
@EndParameter


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