improver.spotdata.apply_lapse_rate module¶
Apply temperature lapse rate adjustments to a spot data cube.
-
class
improver.spotdata.apply_lapse_rate.SpotLapseRateAdjust(neighbour_selection_method='nearest')[source]¶ Bases:
improver.BasePluginAdjusts spot data temperatures by a lapse rate to better represent the conditions at their altitude that may not be captured by the model orography.
-
__init__(neighbour_selection_method='nearest')[source]¶ - Parameters
neighbour_selection_method (str) –
The neighbour cube may contain one or several sets of grid coordinates that match a spot site. These are determined by the neighbour finding method employed. This keyword is used to extract the desired set of coordinates from the neighbour cube. The methods available will be all, or a subset, of the following:
- nearest - nearest_land - nearest_land_minimum_dz - nearest_minimum_dz
The method available in a neighbour cube will depend on the options that were specified when it was created.
-
_abc_cache= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version= 213¶
-
_abc_registry= <_weakrefset.WeakSet object>¶
-
process(spot_data_cube, neighbour_cube, gridded_lapse_rate_cube)[source]¶ Extract lapse rates from the appropriate grid points and apply them to the spot extracted temperatures.
The calculation is:
lapse_rate_adjusted_temperatures = temperatures + lapse_rate * vertical_displacement
- Parameters
spot_data_cube (iris.cube.Cube) – A spot data cube of temperatures for the spot data sites, extracted from the gridded temperature field. These temperatures will have been extracted using the same neighbour_cube and neighbour_selection_method that are being used here.
neighbour_cube (iris.cube.Cube) – The neighbour_cube that contains the grid coordinates at which lapse rates should be extracted and the vertical displacement between those grid points on the model orography and the spot data sites actual altitudes. This cube is only updated when a new site is added.
gridded_lapse_rate_cube (iris.cube.Cube) – A cube of temperature lapse rates on the same grid as that from which the spot data temperatures were extracted.
- Returns
A copy of the input spot_data_cube with the data modified by the lapse rates to give a better representation of the site’s temperatures.
- Return type
-