@BeginModule
@NewPage
@Name      = Remapgrid
@Title     = SCRIP grid interpolation
@Section   = Interpolation
@Class     = Interpolation
@Arguments = ifile ofile
@Operators = remapbil remapbic remapdis remapnn remapcon remapcon2 remaplaf

@BeginDescription
This module contains operators to remap all input fields to a new horizontal grid.
Each operator uses a different remapping method. The interpolation is based
on an adapted SCRIP library version. For a detailed description of the remapping 
methods see @cite{SCRIP}.
The search algorithm for the conservative remapping requires that no grid cell occurs more than once. 
@EndDescription
@EndModule


@BeginOperator_remapbil
@Name      = remapbil
@Title     = Bilinear interpolation
@Parameter = grid

@BeginDescription
Performs a bilinear interpolation on all input fields.
This interpolation method only works on quadrilateral curvilinear grids.
@EndDescription
@EndOperator


@BeginOperator_remapbic
@Name      = remapbic
@Title     = Bicubic interpolation
@Parameter = grid

@BeginDescription
Performs a bicubic interpolation on all input fields.
This interpolation method only works on quadrilateral curvilinear grids.
@EndDescription
@EndOperator


@BeginOperator_remapdis
@Name      = remapdis
@Title     = Distance-weighted average remapping
@Parameter = grid

@BeginDescription
Performs a distance-weighted average remapping of the four nearest neighbor 
values on all input fields.
@EndDescription
@EndOperator


@BeginOperator_remapnn
@Name      = remapnn
@Title     = Nearest neighbor remapping
@Parameter = grid

@BeginDescription
Performs a nearest neighbor remapping on all input fields.
@EndDescription
@EndOperator


@BeginOperator_remapcon
@Name      = remapcon
@Title     = First order conservative remapping
@Parameter = grid

@BeginDescription
Performs a first order conservative remapping on all input fields.
@EndDescription
@EndOperator


@BeginOperator_remapcon2
@Name      = remapcon2
@Title     = Second order conservative remapping
@Parameter = grid

@BeginDescription
Performs a second order conservative remapping on all input fields.
@EndDescription
@EndOperator


@BeginOperator_remaplaf
@Name      = remaplaf
@Title     = Largest area fraction remapping
@Parameter = grid

@BeginDescription
Performs a largest area fraction remapping on all input fields.
@EndDescription
@EndOperator


@BeginParameter
@Item = grid
STRING  Target grid description file or name
@EndParameter


@BeginEnvironment
@C @Item = NORMALIZE_OPT
@C This variable is used to choose the normalization of the conservative 
@C remapping. 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, type:
@BeginVerbatim
   cdo remapbil,n32 ifile ofile
@EndVerbatim
@EndExample
