Skip to content

Optimal interpolation

Thomas Nipen edited this page Jun 18, 2020 · 57 revisions

Optimal interpolation (OI) can be used to create gridded analysis by combining a gridded background field (e.g. from an NWP model) with observations at points. OI weights the background and the observations based on the uncertainty of each data source.

Gridpp's OI method does not perform any quality control (QC) on the observations. Check out Titanlib, which contains suitable QC functions for this purpose. For a complete step-by-step guide on creating gridded analysis, checkout https://tnipen.github.io/2020/06/15/titanlib-gridpp.html.

The OI function signature looks like this:

gridpp.optimal_interpolation(bgrid, background, points, pobs, pratios,
   pbackground, structure, max_points) 

where bgrid is the background grid, background is the 2D background field, points is the locations of the observations, pobs is a vector of observations, pratios is ratio of observation error variance to background error variance, pbackground is the background interpolated to the observation points, structure is a structure function object, and max_points specifies the maximum number of observations to use for a gridpoint.

Structure function

The structure function specifies how analysis increments are spread spatially. Gridpp supports several structure functions, but typically a gaussian function is used (Barnes 1973):

structure = gridpp.BarnesStructure(100000, 200)

The first argument is the horizontal decorrelation length scale (in meters) and the second is the vertical decorrelation length scale (in meters). Optionally, a third argument specifying the decorrelation length across land area fraction (units 1), and a fourth argumnet specifying the maximum length that an observations will have an effect (in meters, also called the localization radius). If the third is unspecified, land area fractions are ignored in the structure function., If the fourth is unspecified, 3.64 times the horizontal scale is used.

A Cressman structure function is also available, where correlations decrease linearly to 0 at the length scales:

structure = gridpp.CressmanStructure(100000, 200)

Observation operator

Applying the observation operator to the background field results in a vector of values at the observation points. There are several methods to do this, but a typical one is nearest neighbour.

pbackground = gridpp.nearest(bgrid, points, background)

Any of the downscalers can be used, or the user can compute the values using their own preferred method.

Maximum locations

Stations can be further limited by setting maxLocations. For example, if maxLocations=4, then only the 4 locations with highest rho value are used (as in the right figure). This reduces computation time significantly in some cases. It also allows for the correction to be localized in dense areas, while still allowing for a large h value such that corrections can be applied in sparse areas.

Observations decorrelate in he vertical too, and is set by the v option.

Error variances

OI requires information about the uncertainty of observations and uncertainty of the background. sigma sets the standard error of the observation. For example, sigma=1 sets the standard error to 1 degree (for temperature). The uncertainty can be modified on a station-by-station basis (see Parameter Files below).

The uncertainty of the background comes from the ensemble spread. This spread is often too low and can therefore be inflated by setting the delta option. For example, delta=2 doubles the ensemble spread.

Transformation

A Gaussian assumption is used, however the background and observations can be transformed using a box-cox transformation.

OI is designed for both temperature and precipitation and can be specified using type. When type=precipitation, the background and observations are transformed using a box-cox transformation.

The observations and background can be transformed before the OI is applied by using the transform option. Currently, only transform=boxcox is supported. This transformation can be used for precipitation. The sigma option is set in the transformed space.

Anti-extrapolation

When OI interpolates the increment between observations, it can in some cases create increments that extrapolate outside the range of values of the increments at the observation points. Gridpp can prevent the extrapolation.

Python examples

The following example uses 3 observations:

Ensemble mode

Gridpp also supports an Ensemble-based Statistical Interpolation (EnSI; Lussana et al. 2019) scheme that uses spatial structure information from an ensemble of NWP model runs.

Clone this wiki locally