The **-n** option
^^^^^^^^^^^^^^^^^

**Syntax**

**-n**\ [**b**\|\ **c**\|\ **l**\|\ **n**][**+a**][**+b**\ *g*\|\ *p*\|\ *n*\ ][**+c**][**+t**\ *threshold*]
    Select grid interpolation mode.
    
**Description**

The **-n** option controls parameters used for 2-D grids resampling [default is bicubic interpolation with
antialiasing and a *threshold* of 0.5, using geographic (if grid is known to be geographic) or natural boundary 
conditions]. Append one of the following to select the type of spline used:

- **b** - Use B-spline smoothing.
- **c** - Use bicubic interpolation.
- **l** - Use bilinear interpolation.
- **n** - Use nearest-neighbor value (for example to plot categorical data).

The following modifiers are supported:

- **+a** - Switch off antialiasing (where supported) [default uses antialiasing].
- **+b** - Override boundary conditions used, by appending *g* for geographic, *p* for periodic, or *n* for
  natural boundary conditions. For the latter two you may append **x** or **y** to specify just one direction, otherwise
  both are assumed. For more information see :ref:`grid-boundary-conditions`.

- **+c** - Clip the interpolated grid to input z-min/z-max [default may exceed limits].
- **+t** - Control how close to nodes with NaNs the interpolation will go based on *threshold*. A *threshold* of 1.0
  requires all (4 or 16) nodes involved in interpolation to be non-NaN. For example, 0.5 will interpolate about half
  way from a non-NaN value and 0.1 will go about 90% of the way [default is 0.5].
