improver.cli.standardise module
Script to standardise a NetCDF file by updating metadata and demoting float64 data to float32
- process(cube, *, attributes_config=None, coords_to_remove=None, new_name=None, new_units=None)[source]
Standardise a source cube. Available options are renaming, converting units, updating attributes and removing named scalar coordinates. Remaining scalar coordinates are collapsed, CellMethod(“point”: “time”) is discarded, and data are cast to IMPROVER standard datatypes and units.
Deprecated behaviour: Translates metadata relating to the grid_id attribute from StaGE version 1.1.0 to StaGE version 1.2.0. Cubes that have no “grid_id” attribute are not recognised as v1.1.0 and are not changed.
- Parameters:
cube (iris.cube.Cube) – Source cube to be standardised
attributes_config (dict) – Dictionary containing required changes that will be applied to the attributes.
coords_to_remove (list) – List of names of scalar coordinates to remove.
new_name (str) – Name of output cube.
new_units (str) – Units to convert to.
- Returns:
iris.cube.Cube