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

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


@BeginOperator_seltimestep
@Title     = Select time steps
@Parameter = timesteps

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


@BeginOperator_seltime
@Title     = Select times
@Parameter = times

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


@BeginOperator_selhour
@Title     = Select hours
@Parameter = hours

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


@BeginOperator_selday
@Title     = Select days
@Parameter = days

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


@BeginOperator_selmon
@Title     = Select months
@Parameter = months

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


@BeginOperator_selyear
@Title     = Select years
@Parameter = years

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


@BeginOperator_selseas
@Title     = Select seasons
@Parameter = seasons

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


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

@BeginDescription
Selects all time steps 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 unlimited number of time steps before and after this month.
@EndDescription
@EndOperator


@BeginParameter
@Item = timesteps
INTEGER  Comma separated list of time steps
@Item = times
STRING   Comma separated list of times (format hh:mm)
@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)
@Item = date2
STRING   End date (format YYYY-MM-DDThh:mm)
@Item = nts1
INTEGER  Number of time steps before the selected month [default: 0]
@Item = nts2
INTEGER  Number of time steps after the selected month [default: nts1]
@EndParameter


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