@BeginModule
@NewPage
@Name      = Remaplaf
@Title     = Largest area fraction remapping
@Section   = Interpolation
@Class     = Interpolation
@Arguments = ifile ofile
@Operators = remaplaf genlaf

@BeginDescription
This module contains operators for a largest area fraction remapping of fields between grids in spherical coordinates.
The operators in this module uses code from the YAC software package to compute the largest area fraction.
For a detailed description of the interpolation method see @cite{YAC}.
The interpolation method is completely general and can be used for any grid on a sphere.
The search algorithm for this remapping method requires that no grid cell occurs more than once. 
@IfDoc
Below is a schematic illustration of the largest area fraction conservative remapping:

\vspace{1mm}

\includegraphics[width=\textwidth]{remaplaf.pdf}

\vspace{1mm}

The figure on the left side shows the input data on a regular lon/lat source grid and on the right side
the remapped result on an unstructured triangular target grid. The figure in the middle shows the input data with
the target grid. Grid cells with missing value are grey colored.
@EndifDoc
@EndDescription
@EndModule


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

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


@BeginOperator_genlaf
@Name      = genlaf
@Title     = Generate largest area fraction remap weights
@Parameter = grid

@BeginDescription
Generates largest area fraction 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 = REMAP_AREA_MIN
This variable is used to set the minimum destination area fraction. The default
of this variable is 0.0.
@EndEnvironment
