improver.cli.generate_topography_bands_weights module

Script to run topographic bands weights generation.

process(orography, land_sea_mask=None, *, bands_config=None)[source]

Runs topographic weights generation.

Reads the orography and land_sea_mask fields of a cube. Creates a series of topographic zone weights to indicate where an orography point sits within the defined topographic bands. If the orography point is in the centre of a topographic band, then a single band will have a weight 1.0. If the orography point is at the edge of a topographic band, then the upper band will have a 0.5 weight whilst the lower band will also have a 0.5 weight. Otherwise the weight will vary linearly between the centre of a topographic band and the edge.

Parameters:
  • orography (iris.cube.Cube) – The orography on a standard grid.

  • land_sea_mask (iris.cube.Cube) – Land mask on a standard grid, with land points set to one and sea points set to zero. If provided, sea points will be masked and set to the default fill value. If no land mask is provided, weights will be generated for sea points as well as land in the appropriate topographic band.

  • bands_config (dict) – Definition of orography bands required. The expected format of the dictionary is e.g {‘bounds’:[[0, 50], [50, 200]], ‘units’: ‘m’} The default dictionary has the following form: {‘bounds’: [[-500., 50.], [50., 100.], [100., 150.],[150., 200.], [200., 250.], [250., 300.], [300., 400.], [400., 500.], [500., 650.],[650., 800.], [800., 950.], [950., 6000.]], ‘units’: ‘m’}

Returns:

Cube containing the weights depending upon where the orography point is within the topographical zones.

Return type:

iris.cube.Cube