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

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


@BeginOperator_selparam
@Title     = Select parameters by identifier
@Parameter = params

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


@BeginOperator_delparam
@Title     = Delete parameters by identifier
@Parameter = params

@BeginDescription
Deletes all fields with parameter identifiers in a user given list.
@EndDescription
@EndOperator


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

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


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

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


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

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


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

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


@BeginOperator_selname
@Title     = Select parameters by name
@Parameter = names

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


@BeginOperator_delname
@Title     = Delete parameters by name
@Parameter = names

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


@BeginOperator_selstdname
@Title     = Select parameters 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_selzaxisname
@Title     = Select z-axes by name
@Parameter = zaxisnames

@BeginDescription
Selects all fields with z-axis 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 = params
INTEGER  Comma separated list of parameter identifiers
@Item = codes
INTEGER  Comma separated list of code numbers
@Item = names
STRING   Comma separated list of variable names
@Item = stdnames
STRING   Comma separated list of standard names
@Item = levels
FLOAT    Comma separated list of vertical 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 types or numbers
@Item = zaxisnames
STRING   Comma separated list of z-axis names
@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
