-
Notifications
You must be signed in to change notification settings - Fork 16
Downscalers
The downscalers in gridpp interpolate data on one grid to another (usually higher resolution) grid. If no downscaler is selected, a nearest neighbour approach is used. Also, if the input grid is equal to the output grid, then no downscaling is needed.
Nearest neighbour
gridpp input.nc output.nc -v air_temperature_2m -d nearestNeighbour
gridpp input.nc output.nc -v air_temperature_2m -d bilinear
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. Gridpp supports several ways to do this. The constant lapse rate method prescribes a fixed elevation gradient that is used across the whole field. A more advanced approach is to let gridpp compute a local elevation gradient by looking in a neighbourhood surounding a given gridpoint.
Temperature (and possibly other variables) can in many cases be strongly affected by the presence of land and ocean.
In v0.3.0, a combined coastal and elevation gradient approach is implemented. The method first computes an elevation gradient based on land points only, and then computes a land-sea gradient after correcting points in a neighbourhood with the elevation gradient.
The two gradients are then added.
The following applies a 6.5°C/km lapse rate:
gridpp input.nc output.nc -v air_temperature_2m -d gradient constantGradient=-0.0065
The following uses a local gradient based on a neighbourhood with radius of 3 gridpoints:
gridpp input.nc output.nc -v air_temperature_2m -d gradient radius=3
Pressure decreases with height quite predictably. This downscaler adjusts the nearest neighbour up or down by assuming a standard atmosphere. This downscaler should only be used for pressure variables.
[Available in v0.3.2]
For a given gridpoint in the output grid, the average value is computed for the neighbours in the input grid that are closest to the given output gridpoint. This is useful when the output grid is coarser than the input grid and effectively upscales the input grid to the output grid.
The smart neighbour approach picks a nearby gridpoint from the coarse grid that has similar characteristics to the lookup point. The nearest neighbour may for example not be at the same elevation as the lookup point.
The method requires a search radius. The larger the search radius, the more likely it is to find a similar location. However, picking a far away point can be problematic if there are horizontal gradients in the field.
If the nearest neighbour is very close to the correct elevation, it makes sense to pick this one, even if an even more exact location further away is found. This can be set using the minElevDiff
option, which specifies how large the elevation difference must be before the nearest neighbour is not to be used.
In many application, smoothing the field spatially can be beneficial. This can also be done with this method by allowing the average to be taken of several similar points. The numSmart
option specified how many smart neighbours to average. If numSmart=5
is set, then the best 5 neighbours will be averaged.
The method is relevant for temperature, wind speed, and precipitation.
gridpp input.nc output.nc -v air_temperature_2m -d smart radius=5 numSmart=3 minElevDiff=200