Skip to content

Observation gridding

Thomas Nipen edited this page Oct 16, 2022 · 4 revisions

Gridpp includes functions to take observations at points and interpolate them onto a grid, also called gridding.

The gridding function takes all observations within a radius of a gridpoint, and aggregates the using a statistic (e.g. mean):

radius = 30000    # m
min_num = 5
statistic = gridpp.Mean
gridpp.gridding(igrid, points, temp_analysis[:, :, 0], radius, min_num, statistic)

A NaN value will be used in gridpoints where there are fewer than min_num observations within the radius.

The gridding_nearest function assigns each observation to its nearest gridpoint. The resulting gridded value is then the aggregation of all observations assign to the gridpoint.

min_num = 5
statistic = gridpp.Mean
gridpp.gridding(igrid, points, temp_analysis[:, :, 0], min_num, statistic)

This differs from gridding in that each observation is only used once. The gridding will in general let you create a smoother field, by increasing the radius argument.

Clone this wiki locally