diagnostic.functions.spearman_correlation#

spearman_correlation(da_mod: DataArray, da_ref: DataArray) float[source]#

Calculate Spearman’s rank correlation coefficient between model data and reference data.

Parameters:
  • da_mod (xr.DataArray) – The model data to compare (2D array where rows are observations and columns are variables).

  • da_ref (xr.DataArray) – The reference data to compare (2D array where rows are observations and columns are variables).

Returns:

Spearman’s rank correlation coefficient between the flattened model and reference data.

Return type:

float