improver.generate_ancillaries.generate_miscellaneous_ancillaries module

improver.generate_ancillaries.generate_miscellaneous_ancillaries module#

A module for functions that generate ancillary cubes.

generate_land_area_fraction_at_sites(land_cover_cube, neighbour_cube, radius=2500)[source]#

Generate a land area fraction ancillary cube at the site locations by utilising the Corine Land cover.

The Corine Land cover is available from https://doi.org/10.2909/960998c1-1870-4e82-8051-6485205ebbac. This function requires the land cover file is provided as an iris cube.

A neighbour cube is generated on the native grid of the input land cover cube. This allows us to select the cell, on what ever resolution this data is provided, that is closest to each site location. A box can then be formed about this cell of a given size and the fraction of points within the box that are classified as land can be counted. The returned value is the fraction of the total box size that is classified as land on the input land cover grid.

Parameters:
  • land_cover_cube (Cube) – A cube containing the Corine Land cover data. The data values should be integers representing different land cover types.

  • neighbour_cube (Cube) – A cube containing information about the spot data sites. We use this rather than a site list as it contains a completed set of altitudes which have been extracted from orography data on the model domain. These fill in where the site source data may be missing altitude information.

  • radius (int) – The radius in metres of the box about each site location to use to calculate the land area fraction. The default value of 2500m gives a box of approximately 5km x 5km.

Return type:

Cube

Returns:

A cube containing the land area fraction at the site locations.

generate_roughness_length_at_sites(roughness_length, neighbour_cube)[source]#

Generate a roughness length ancillary cube at the site locations. This performs a spot extraction of the roughness length data at the site locations and removes time related coordinates.

Parameters:
  • roughness_length (Cube) – A cube containing the roughness length data.

  • neighbour_cube (Cube) – A cube containing information about the spot data sites and their grid point neighbours.

Return type:

Cube

Returns:

A cube containing the roughness length at the site locations.