@BeginModule
@NewPage
@Name      = Remapcon
@Title     = First order conservative remapping
@Section   = Interpolation
@Class     = Interpolation
@Arguments = ifile ofile
@Operators = remapcon gencon

@BeginDescription
This module contains operators for a first order conservative remapping 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}.
The interpolation method is completely general and can be used for any grid on a sphere.
The search algorithm for the conservative remapping requires that no grid cell occurs more than once. 
@EndDescription
@EndModule


@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_gencon
@Name      = gencon
@Title     = Generate 1st order conservative remap weights
@Parameter = grid

@BeginDescription
Generates first order conservative remapping weights 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
@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_AREA_MIN
This variable is used to set the minimum destination area fraction. The default
of this variable is 0.0.
@EndEnvironment


@BeginNote
The SCRIP conservative remapping method doesn't work correctly for some grid combinations.
Please use @mod{remapycon} or @mod{genycon} in case of problems. 
@EndNote


@BeginExample
Say @file{ifile} contains fields on a quadrilateral curvilinear grid.
To remap all fields conservative to a Gaussian N32 grid, type:
@BeginVerbatim
   cdo remapcon,n32 ifile ofile
@EndVerbatim
@EndExample
