improver.orographic_enhancement module
This module contains a plugin to calculate the enhancement of precipitation over orography.
- class OrographicEnhancement[source]
Bases:
BasePlugin
Class to calculate orographic enhancement from horizontal wind components, temperature and relative humidity.
References
- Alpert, P. and Shafir, H., 1989: Meso-Gamma-Scale Distribution of
Orographic Precipitation: Numerical Study and Comparison with Precipitation Derived from Radar Measurements. Journal of Applied Meteorology, 28, 1105-1117.
- Roe, G., 2005: Orographic Precipitation. Annual Review of Earth
and Planetary Sciences, 33, 645-671.
- __init__()[source]
Initialise the plugin with thresholds from STEPS code. Usage as follows:
- Criteria for site orographic enhancement calculation:
3x3 mean topography height >= self.orog_thresh_m (20 m)
Relative humidity (fraction) >= self.rh_thresh_ratio (0.8)
v dot grad z (wind x topography gradient) >= self.vgradz_thresh_ms (0.0005 m/s)
- Parameters for calculating upstream contribution:
Maximum range of an upstream cell to contribute to the total enhancement (self.upstream_range_of_influence_km). This is 15 km in STEPS.
Cloud lifetime (self.cloud_lifetime_s) defines the standard deviation of the distance weighting function for upstream enhancement contributions. This is 102 seconds in STEPS.
Scaling factor by which to multiply the weighted sum of upstream contributions (self.efficiency_factor). This is 0.23265 in STEPS.
Create placeholder class members for regridded variable cubes (orography, temperature, humidity, pressure and wind components), saturation vapour pressure, V.gradZ (uplift) array and grid spacing.
- _abc_impl = <_abc_data object>
- _add_upstream_component(point_orogenh)[source]
Add upstream component to site orographic enhancement
- _compute_weighted_values(point_orogenh, x_source, y_source, distance, wind_speed)[source]
Extract orographic enhancement values from source points and weight according to source-destination distance.
- Parameters:
point_orogenh (
ndarray
) – 2D array of point orographic enhancement valuesx_source (
ndarray
) – 3D array of x-coordinates of source points from which to read upstream contributiony_source (
ndarray
) – 3D array of y-coordinates of source points from which to read upstream contributiondistance (
ndarray
) – 3D array of grid point source-to-destination distanceswind_speed (
ndarray
) – 2D array of wind speeds
- Return type:
- Returns:
2D array containing a weighted sum of orographic enhancement components from upstream source points
2D array containing weights for normalisation
- _create_output_cube(orogenh_data, reference_cube)[source]
Creates a cube containing orographic enhancement values in SI units.
- _generate_mask()[source]
Generates a boolean mask of areas NOT to calculate orographic enhancement. Criteria for calculating orographic enhancement are that all of the following are true:
3x3 mean topography height >= threshold (20 m)
Relative humidity (fraction) >= threshold (0.8)
v dot grad z (wind x topography gradient) >= threshold (0.0005)
The mask is therefore “True” if any of these conditions are false.
- Return type:
- Returns:
Boolean mask - where True, set orographic enhancement to a default zero value
- _get_point_distances(wind_speed, max_sin_cos)[source]
Generate 3d array of distances to upstream components
- Parameters:
- Return type:
- Returns:
3D array of source-to-destination distances in grid points, with np.nan filled in for out of range values
- static _locate_source_points(wind_speed, distance, sin_wind_dir, cos_wind_dir)[source]
Generate 3D arrays of source points from which to add upstream orographic enhancement contribution. Assumes spatial coordinate ordering [y, x].
- Parameters:
- Return type:
- Returns:
3D array of source point x-coordinates
3D array of source point y-coordinates
- _orography_gradients()[source]
Calculates the dimensionless gradient of self.topography along both spatial axes, smoothed along the perpendicular axis. If spatial coordinates are not in the same units as topography height (m), converts coordinate units in place.
- _point_orogenh()[source]
Calculate the grid-point precipitation enhancement contribution due to orographic uplift using:
- orogenh = ((humidity * svp * vgradz) /
(R_WATER_VAPOUR * temperature)) * 60 * 60
- Return type:
- Returns:
Orographic enhancement values in mm/h
- _regrid_and_populate(temperature, humidity, pressure, uwind, vwind, topography)[source]
Regrids input variables onto the high resolution orography field, then populates the class instance with regridded variables before converting to SI units. Also calculates V.gradZ as a class member.
- Parameters:
temperature (
Cube
) – Temperature at top of boundary layerhumidity (
Cube
) – Relative humidity at top of boundary layerpressure (
Cube
) – Pressure at top of boundary layeruwind (
Cube
) – Positive eastward wind vector component at top of boundary layervwind (
Cube
) – Positive northward wind vector component at top of boundary layertopography (
Cube
) – Height of topography above sea level on 1 km UKPP domain grid
- Return type:
- _regrid_variable(var_cube, unit)[source]
Sorts spatial coordinates in ascending order, regrids the input variable onto the topography grid and converts to the required units. This function does not modify the input variable cube.
- process(temperature, humidity, pressure, uwind, vwind, topography)[source]
Calculate precipitation enhancement over orography on high resolution grid. Input diagnostics are all expected to be on the same grid, and are regridded to match the orography.
- Parameters:
temperature (
Cube
) – Temperature at top of boundary layerhumidity (
Cube
) – Relative humidity at top of boundary layerpressure (
Cube
) – Pressure at top of boundary layeruwind (
Cube
) – Positive eastward wind vector component at top of boundary layervwind (
Cube
) – Positive northward wind vector component at top of boundary layertopography (
Cube
) – Height of topography above sea level on high resolution (1 km) UKPP domain grid
- Return type:
- Returns:
Precipitation enhancement due to orography in m/s.