nctoolkit.DataSet.cor_space

DataSet.cor_space(self, var1=None, var2=None)

Calculate the correlation correct between two variables in space This is calculated for each time step. The correlation coefficient coefficient is calculated using values in all grid cells, ignoring missing values.

Parameters
  • var1 (str) – The first variable

  • var2 (str) – The second variable

Examples

If you wanted to calculate the spatial correlation coefficient between variables x and y in a dataset, you would do this:

>>> ds.cor_space("x", "y")

The correlation coefficient will be calculated for each time step.