improver.cli.nowcast_accumulate module
Script to accumulate input data given advection velocity fields.
- name_constraint(names)[source]
Generates a callable constraint for matching cube names.
The callable constraint will realise the data of those cubes matching the constraint.
- process(cube, advection_velocity, orographic_enhancement, *, attributes_config=None, max_lead_time=360, lead_time_interval=15, accumulation_period=15, accumulation_units='m')[source]
Module to extrapolate and accumulate the weather with 1 min fidelity.
- Parameters:
cube (iris.cube.Cube) – The input Cube to be processed.
advection_velocity (iris.cube.CubeList) – Advection cubes of U and V. These must have the names of either: precipitation_advection_x_velocity or grid_eastward_wind precipitation_advection_y_velocity or grid_northward_wind
orographic_enhancement (iris.cube.Cube) – Cube containing the orographic enhancement fields. May have data for multiple times in the cube.
attributes_config (dict) – Dictionary containing the required changes to the attributes.
max_lead_time (int) – Maximum lead time required (mins).
lead_time_interval (int) – Interval between required lead times (mins).
accumulation_period (int) – The period over which the accumulation is calculated (mins). Only full accumulation periods will be computed. At lead times that are shorter than the accumulation period, no accumulation output will be produced.
accumulation_units (str) – Desired units in which the accumulations should be expressed. e.g. ‘mm’
- Returns:
New cubes with accumulated data.
- Return type:
- Raises:
ValueError – If advection_velocity doesn’t contain x and y velocity.