improver.spotdata.utilities module

improver.spotdata.utilities module#

Spot data utilities.

extract_site_json(neighbours)[source]#

Extract the site definition JSON from a neighbour cube. This produces a JSON file that can be used to recreate a neighbour cube, for example on a different domain / projection.

Parameters:

neighbours (Cube) – A cube containing the neighbour information.

Returns:

A list of JSON dictionaries containing the site definitions.

get_neighbour_finding_method_name(land_constraint, minimum_dz)[source]#

Create a name to describe the neighbour method based on the constraints provided.

Return type:

str

Returns:

A string that describes the neighbour finding method employed. This is essentially a concatenation of the options.