-
Notifications
You must be signed in to change notification settings - Fork 16
Gradient
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.
Currently, only a fixed elevation gradient is supported in the library:
import gridpp
ovalues = gridpp.simple_gradient(igrid, ogrid, temp_analysis[:, :, 0], -0.0065)
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