@BeginModule
@NewPage
@Name      = Remap
@Title     = SCRIP grid remapping
@Section   = Interpolation
@Class     = Interpolation
@Arguments = ifile ofile
@Operators = remap
@EndModule


@BeginOperator_remap
@Title     = SCRIP grid remapping
@Parameter = grid weights

@BeginDescription
This operator remaps all input fields to a new horizontal grid. The remap type and 
the interpolation weights of one input grid are read from a netCDF file. More weights 
are computed if the input fields are on different grids. The netCDF file with the 
weights should follow the @ref{SCRIP} convention. Normally these weights come from 
a previous call to module @mod{GENWEIGHTS} or were created by the original
SCRIP package.
@EndDescription
@EndOperator


@BeginParameter
@Item = grid
STRING  Target grid description file or name
@Item = weights
STRING  Interpolation weights (SCRIP netCDF file)
@EndParameter


@BeginEnvironment
@C @Item = NORMALIZE_OPT
@C This variable is used to choose the normalization of the conservative 
@C interpolation. By default @env{NORMALIZE_OPT} is set to 'fracarea' and will
@C include the destination area fraction in the output weights; other 
@C options are 'none' and 'destarea' (for more information see \cite{SCRIP}).
@Item = REMAP_EXTRAPOLATE
This variable is used to switch the extrapolation feature 'on' or 'off'.
By default the extrapolation is enabled for remapdis, remapnn and for circular grids.
@Item = REMAP_AREA_MIN
This variable is used to set the minimum destination area fraction. The default
of this variable is 0.0.
@EndEnvironment


@BeginNote
For this module the author has converted the original Fortran 90 SCRIP 
software to ANSI C99. If there are any problems send a bug report to CDO and
not to SCRIP!
@EndNote


@BeginExample
Say @file{ifile} contains fields on a quadrilateral curvilinear grid.
To remap all fields bilinear to a Gaussian N32 grid use:
@BeginVerbatim
   cdo genbil,n32 ifile remapweights.nc
   cdo remap,n32,remapweights.nc ifile ofile
@EndVerbatim
The result will be the same as:
@BeginVerbatim
   cdo remapbil,n32 ifile ofile
@EndVerbatim
@EndExample
