@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
@Item = CDO_REMAP_NORM
This variable is used to choose the normalization of the conservative interpolation. 
By default @env{CDO_REMAP_NORM} is set to 'fracarea'. 'fracarea' uses the sum of the
non-masked source cell intersected areas to normalize each target cell field value.
This results in a reasonable flux value but the flux is not locally conserved.
The option 'destarea' uses the total target cell area to normalize each target cell
field value. Local flux conservation is ensured, but unreasonable flux values may result.
@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.
@Item = CDO_REMAP_SEARCH_RADIUS
Remap search radius in degree, default 180 degree.
@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
