ILAMB.Variable.Variable.correlation

Variable.correlation(var, ctype, region=None)[source]

Computes the correlation between two variables.

Parameters
  • var (ILAMB.Variable.Variable) – The variable with which we will compute a correlation

  • ctype (str) – The correlation type, one of {“spatial”,”temporal”,”spatiotemporal”}

  • region (str, optional) – The region over which to perform a spatial correlation

Notes

Need to better think about what correlation means when data are masked. The sums ignore the data but then the number of items n is not constant and should be reduced for masked values.