@BeginModule
@NewPage
@Name      = Remapdis
@Title     = Distance-weighted average remapping
@Section   = Interpolation
@Class     = Interpolation
@Arguments = ifile ofile
@Operators = remapdis gendis

@BeginDescription
This module contains operators for a distance-weighted average remapping of the four
nearest neighbor values of fields between grids in spherical coordinates.
The interpolation is based on an adapted SCRIP library version. 
For a detailed description of the interpolation method see @cite{SCRIP}.
@EndDescription
@EndModule


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

@BeginDescription
Performs a distance-weighted average remapping of the nearest neighbors value on all input fields.
The default number of nearest neighbors is 4.
@EndDescription
@EndOperator


@BeginOperator_gendis
@Name      = gendis
@Title     = Generate distance-weighted average remap weights
@Parameter = grid

@BeginDescription
Generates distance-weighted average remapping weights of the four nearest neighbor
values for the first input field and writes the result to a file.
The format of this file is netCDF following the SCRIP convention.
Use the operator @mod{remap} to apply this remapping weights to a data file with the same source grid.
@EndDescription
@EndOperator


@BeginParameter
@Item = grid
STRING   Target grid description file or name
@Item = neighbors
INTEGER  Number of nearest neighbors
@EndParameter


@BeginEnvironment
@Item = REMAP_EXTRAPOLATE
This variable is used to switch the extrapolation feature 'on' or 'off'.
By default the extrapolation is enabled for this remapping method.
@Item = CDO_GRIDSEARCH_RADIUS
Grid search radius in degree, default 180 degree.
@EndEnvironment
