@BeginModule
@Name      = Vertintap
@Title     = Vertical interpolation
@Section   = Interpolation
@Class     = Interpolation
@Arguments = ifile ofile
@Operators = ap2pl ap2hl

@BeginDescription
Interpolate 3D variables on hybrid sigma height coordinates to pressure or height levels.
The input file must contain the 3D air pressure. The air pressure is identified
by the NetCDF CF standard name air_pressure.
Use the alias  @bold{ap2plx}/@bold{ap2hlx} or the environment variable @env{EXTRAPOLATE}
to extrapolate missing values. This operator requires all variables on the same horizontal grid.
@EndDescription
@EndModule


@BeginOperator_ap2pl
@Title     = Air pressure to pressure level interpolation
@Parameter = plevels

@BeginDescription
Interpolates 3D variables on hybrid sigma height coordinates to pressure level.
@EndDescription
@EndOperator


@BeginOperator_ap2hl
@Title     = Air pressure to height level interpolation
@Parameter = hlevels

@BeginDescription
Interpolates 3D variables on hybrid sigma height coordinates to height level.
The procedure is the same as for the operator @oper{ap2pl} except for
the pressure levels being calculated from the heights by:
@math{plevel = 101325*exp(hlevel/-7000)}
@EndDescription
@EndOperator


@BeginParameter
@Item = plevels
FLOAT  Pressure levels in pascal
@Item = hlevels
FLOAT  Height levels in meter (max level: 65535 m)
@EndParameter


@BeginEnvironment
@Item = EXTRAPOLATE
If set to 1 extrapolate missing values.
@EndEnvironment


@BeginNote
This is a specific implementation for NetCDF files from the ICON model, it may not work with data from other sources.
@EndNote


@BeginExample
To interpolate 3D variables on hybrid sigma height level to pressure levels of 925, 850, 500 and 200 hPa use:
@BeginVerbatim
   cdo ap2pl,92500,85000,50000,20000 ifile ofile
@EndVerbatim
@EndExample
