Sample points must be defined as an iterable of
(coord,
value(s))
pairs. The
coord
argument can be either a coordinate name or coordinate instance. The specified coordinate must exist on the cube being interpolated! For example:

are all examples of valid sample points.

The values for coordinates that correspond to date/times can be supplied as datetime.datetime or netcdftime.datetime instances, e.g.
[('time',
datetime.datetime(2009,
11,
19,
10,
30))]
).

Let’s take the air temperature cube we’ve seen previously:

>>>

We can interpolate specific values from the coordinates of the cube:

>>>

As we can see, the resulting cube is scalar and has longitude and latitude coordinates with the values defined in our sample points.

It isn’t necessary to specify sample points for every dimension, only those that you wish to interpolate over:

>>>

The sample points for a coordinate can be an array of values. When multiple coordinates are provided with arrays instead of scalar sample points, the coordinates on the resulting cube will be orthogonal:

>>>

Interpolation in Iris is not limited to horizontal-spatial coordinates - any coordinate satisfying the prerequisites of the chosen scheme may be interpolated over.

For instance, the
iris.analysis.Linear
scheme requires 1D numeric, monotonic, coordinates. Supposing we have a single column cube such as the one defined below:

>>>

This cube has a “hybrid-height” vertical coordinate system, meaning that the vertical coordinate is unevenly spaced in altitude:

Likely to Recommend
- 5.0/5.0

Repair Quality
- 5.0/5.0

Customer Service
- 5.0/5.0

Returned Clean

Kept me Informed?

Ready on Time?

Many of us share a passion for protecting the earth’s environment by using increasingly “green” behaviors and technologies. Many collision repair shops are also now adopting more eco-friendly process...