scorr()

This function calculates the spatial correlation between two variables over an X-Y domain. It returns a single number. The syntax is:

where:

For global averaging, a shorthand may be used:

is the same as

Usage Note

  1. scorr may be used in conjunction with tloop or define to create time series or time/height plots.

  2. scorr assumes that the world coordinates are longitude in the X dimension and latitude in the Y dimension, and does weighting in the latitude dimension by the delta of the sin of the latitudes. Weighting is also performed appropriately for unequally spaced grids.

Examples

This example calculates the correlation between the surface temperature and the latent heat flux over the tropical Pacific:

set lat -10 10
set lon 120 280
d scorr(tsfc, lhtfl, lon=120, lon=280, lat=-10, lat=10)