@BeginModule
@NewPage
@Name      = Seltime
@Title     = Select timesteps
@Section   = Selection
@Class     = Selection
@Arguments = ifile ofile
@Operators = seltimestep seltime selhour selday selmon selyear selseas seldate selsmon

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


@BeginOperator_seltimestep
@Title     = Select timesteps
@Parameter = timesteps

@BeginDescription
Selects all timesteps with a timestep in a user given list.
@EndDescription
@EndOperator


@BeginOperator_seltime
@Title     = Select times
@Parameter = times

@BeginDescription
Selects all timesteps with a time in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selhour
@Title     = Select hours
@Parameter = hours

@BeginDescription
Selects all timesteps with a hour in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selday
@Title     = Select days
@Parameter = days

@BeginDescription
Selects all timesteps with a day in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selmon
@Title     = Select months
@Parameter = months

@BeginDescription
Selects all timesteps with a month in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selyear
@Title     = Select years
@Parameter = years

@BeginDescription
Selects all timesteps with a year in a user given list.
@EndDescription
@EndOperator


@BeginOperator_selseas
@Title     = Select seasons
@Parameter = seasons

@BeginDescription
Selects all timesteps with a month of a season in a user given list.
@EndDescription
@EndOperator


@BeginOperator_seldate
@Title     = Select dates
@Parameter = date1 [date2]

@BeginDescription
Selects all timesteps with a date in a user given range.
@EndDescription
@EndOperator


@BeginOperator_selsmon
@Title     = Select single month
@Parameter = month [nts1] [nts2]

@BeginDescription
Selects a month and optional an arbitrary number of timesteps before and after this month.
@EndDescription
@EndOperator


@BeginParameter
@Item = timesteps
INTEGER  Comma separated list of timesteps. Negative values selects timesteps from the end (NetCDF only).
@Item = times
STRING   Comma separated list of times (format hh:mm:ss).
@Item = hours
INTEGER  Comma separated list of hours.
@Item = days
INTEGER  Comma separated list of days.
@Item = months
INTEGER  Comma separated list of months.
@Item = years
INTEGER  Comma separated list of years.
@Item = seasons
STRING   Comma separated list of seasons (DJF, MAM, JJA, SON).
@Item = date1
STRING   Start date (format YYYY-MM-DDThh:mm:ss).
@Item = date2
STRING   End date (format YYYY-MM-DDThh:mm:ss) [default: date1].
@Item = nts1
INTEGER  Number of timesteps before the selected month [default: 0].
@Item = nts2
INTEGER  Number of timesteps after the selected month [default: nts1].
@EndParameter


#@BeginExample
#@BeginVerbatim
#   cdo seltimestep,6/8
#   cdo selmon,6/8
#   cdo selseas,JJA
#@EndVerbatim
#@EndExample
