improver.cli.generate_metadata_cube module
CLI to generate metadata cube for acceptance tests.
- process(mandatory_attributes_json, *, name='air_pressure_at_sea_level', units=None, spatial_grid='latlon', time_period=None, json_input=None, ensemble_members=8, x_grid_spacing=None, y_grid_spacing=None, domain_corner=None, npoints=71)[source]
Generate a cube with metadata only.
- Parameters:
mandatory_attributes_json (Dict) – Specifies the values of the mandatory attributes, title, institution and source.
name (Optional[str]) – Output variable name, or if creating a probability cube the name of the underlying variable to which the probability field applies.
units (Optional[str]) – Output variable units, or if creating a probability cube the units of the underlying variable / threshold.
spatial_grid (Optional[str]) – What type of x/y coordinate values to use. Permitted values are “latlon” or “equalarea”.
time_period (Optional[int]) – The period in minutes between the time bounds. This is used to calculate the lower time bound. If unset the diagnostic will be instantaneous, i.e. without time bounds.
json_input (Optional[Dict]) – Dictionary containing values for one or more of: “name”, “units”, “time”, “time_bounds”, “frt”, “spp__relative_to_threshold”, “attributes” (dictionary of additional metadata attributes) and “coords” (dictionary). “coords” can contain “height_levels” (list of height/pressure level values), and one of “realizations”, “percentiles” or “thresholds” (list of dimension values).
ensemble_members (Optional[int]) – Number of ensemble members. Default 8. Will not be used if “realizations”, “percentiles” or “thresholds” provided in json_input.
x_grid_spacing (Optional[float]) – Resolution of grid along the x-axis (metres or degrees).
y_grid_spacing (Optional[float]) – Resolution of grid along the y-axis (metres or degrees).
domain_corner (Optional[Tuple[float, float]]) – Bottom left corner of grid domain (y,x) (degrees for latlon or metres for equalarea).
npoints (Optional[int]) – Number of points along each of the y and x spatial axes.
- Returns:
Output of generate_metadata()
- Return type: