@BeginModule
@NewPage
@Name      = Merge
@Title     = Merge datasets
@Section   = File operations
@Class     = File operation
@Arguments = ifiles ofile
@Operators = merge mergetime

@BeginDescription
This module reads datasets from several input files,
merges them and writes the resulting dataset to @file{ofile}.
@EndDescription
@EndModule


@BeginOperator_merge
@Title     = Merge datasets with different fields

@BeginDescription
Merges time series of different fields from several input datasets.
The number of fields per time step written to @file{ofile}
is the sum of the field numbers per time step in all input datasets.
The time series on all input datasets are required to have different
fields and the same number of time steps.
@EndDescription
@EndOperator


@BeginOperator_mergetime
@Title     = Merge datasets sorted by date and time

@BeginDescription
Merges all time steps of all input files sorted by date and time.
After this operation every input time step is in @file{ofile} and
all time steps are sorted by date and time. Each input file is 
required to have the same variables and different time steps.
@EndDescription
@EndOperator


@BeginExample
Assume three datasets with the same number of time steps
and different variables in each dataset.
To merge these datasets to a new dataset use:
@BeginVerbatim
   cdo merge ifile1 ifile2 ifile3 ofile
@EndVerbatim
Assume you split a 6 hourly dataset with @oper{splithour}.
This produces four datasets, one for each hour.
The following command merges them together:
@BeginVerbatim
   cdo mergetime ifile1 ifile2 ifile3 ifile4 ofile
@EndVerbatim
@EndExample
