improver.pollen.hourly_concentration module#

Calculations to produce Pollen Hourly Concentration values.

class PollenHourlyConcentration(scaling_factors_dict=None)[source]#

Bases: PostProcessingPlugin

Plugin to calculate the Pollen Hourly Concentration.

The input cube for this plugin comes from the output of the Numerical Atmospheric dispersion Modelling Environment (NAME). It is 2D gridded data of pollen concentrations given as g/m3 and the plugin converts this to concentrations in grains/m3 using pollen diameter and density.

_POLLEN_DENSITY = {'alder': 800.0, 'ash': 800.0, 'birch': 800.0, 'grass': 1000.0, 'hazel': 800.0, 'nettle': 1000.0, 'oak': 800.0, 'plane': 920.0, 'weed': 1000.0}#
_POLLEN_DIAMETER = {'alder': 2.5e-05, 'ash': 2.3e-05, 'birch': 2.2e-05, 'grass': 3.5e-05, 'hazel': 2.8e-05, 'nettle': 1.3e-05, 'oak': 2.9e-05, 'plane': 1.9e-05, 'weed': 1.3e-05}#
_POLLEN_NAMES = ['grass', 'birch', 'oak', 'hazel', 'alder', 'nettle', 'ash', 'plane', 'weed']#
__init__(scaling_factors_dict=None)[source]#

Initialise class.

Parameters:

scaling_factors_dict (dict) – Optional scaling factors to use per pollen type

_abc_impl = <_abc._abc_data object>#
_calculate(taxa)[source]#

Perform calculations on input cube.

Applies the scaling factor to the raw data for the relevant pollen taxa, and converts from g/m3 to grains/m3 using pollen diameter and density.

Parameters:

taxa (str) – The pollen taxa being processed, used to update the cube name and metadata

_metadata(taxa)[source]#

Change the cube name and other metadata. :type taxa: str :param taxa: The pollen taxa being processed, used to update the cube name and metadata

_output_cube = None#
_scaling_factors_dict = None#
process(cube)[source]#

Calculate the Pollen Concentrations.

Parameters:
  • cube (Cube) – Input cube for any pollen type handled by the class

  • scaling_factors_dict – Optional scaling factors to use per pollen type

Return type:

Cube

Returns:

The calculated output cube.