-
Notifications
You must be signed in to change notification settings - Fork 18
Downscaling
The downscaling methods in gridpp interpolates data on one grid to another (usually higher resolution) grid.
Downscaling methods require Grid
objects that describe the metadata of the gridpoints.
This downscaler uses the closest neighbour for each point in the fine grid. The approach will give box like fields if the output field is much higher resolution than the input field. The advantage of the method is that if the values in the input field are physically realistic, then the values in the output field are also realistic.
ovalues = gridpp.nearest(igrid, ogrid, temp_analysis[:, :, 0])
Uses the four nearest neighbours and interpolates bilinearly between those.
ovalues = gridpp.bilinear(igrid, ogrid, temp_analysis[:, :, 0])
Some meteorological variables such as temperature change predictably with elevation. When a high resolution topography is available, coarse resolution models can be downscaled by fitting the variable to the new topography. Currently, the API supports a constant elevation gradient:
gradient = -0.0065 # C/m
ovalues = gridpp.simple_gradient(igrid, ogrid,
temp_analysis[:, :, 0], gradient)
More advanced methods, where the gradient is allowed to vary dynamically will be added in the future.