rcatool.stats.sal.S_stat

rcatool.stats.sal.S_stat(data, data_label, refdata, refdata_label, obj_prop=True, lsmask=None)[source]

Function to calculate the structure component (S). The basic idea is to compare the volume of the normalized precipitation objects. This property captures information of the geometrical characteristics (size and shape) and how they differ between model (M) and reference (O).

Parameters:
  • data (arrays) – 2D data arrays to be compared, where refdata is the reference data e.g. observations.

  • refdata (arrays) – 2D data arrays to be compared, where refdata is the reference data e.g. observations.

  • data_label (arrays) – Arrays with labeled objects. Returned from the label() function.

  • refdata_label (arrays) – Arrays with labeled objects. Returned from the label() function.

  • obj_prop (boolean) – If True, individual object (rain fall area) properties are calculated and returned.

  • lsmask (array) – Land/sea mask (2d boolean array) to characterize identified objects as land, ocean or coastal objects.

Returns:

  • S (float) – The calculated structure component.

  • area_props/ref_area_props (dictionary) – Dictionary containing properties of identified objects in data and refdata respectively.