var1 var2 [ grids ... ] minfrac correlate
| Arguments | ||
|---|---|---|
| label | type | description |
| var1 | variable | variable to be correlated with var2 |
| var2 | variable |
variable to be correlated with var1
Note that var1 and var2 should have similarly-defined grids. Regridding one variable to match the other may be necessary (see example below). |
| grids | grid set | grid(s) (i.e., independent variables) over which correlation coefficient is to be calculated |
| minfrac | number | Minimum fraction of data that must be present (i.e., fraction not indicated as missing) within the selected domain in order for the correlation to be calculated. If minfrac is not present, then a missing value is returned. If minfrac is not given, then the correlation is calculated regardless of the amount of data present in the domain. (optional) |
| Returns | ||
| coefficient | variable or constant |
Pearson-Product Moment Correlation coefficient of var1 and var2 over grids.
coefficient is not dependent on grids, but is dependent on any other grids that var1 or var2 depended on (if any). |
OR
SOURCES .NOAA .NCEP .CPC .CAMS_OPI .v0208 .anomaly
.prcp
T (Jan 1980) (Dec 2003) RANGE
X (-150) (-80) RANGE
Y
(-10) (10) RANGE
SOURCES .NOAA .NCEP .EMC .CMB .GLOBAL
.Reyn_SmithOIv2 .monthly .sst
T (Jan 1980) (Dec 2003) RANGE
X
(-150) (-80) RANGE
Y (-10) (10) RANGE
[X Y]regridAverage
[X
Y]correlate
In this example, CAMS_OPI monthly
precipitation data are correlated in space with Reynolds and Smith OI
Version 2 monthly sea surface temperatures over the equatorial Pacific
Ocean. The result is a monthly time series of values from January 1980
to December 2003. The [X Y]regridAverage command was used to spatially
regrid the SST data set (at 1.0 deg. lat/lon resolution) to match the
gridding of the precipitation data set (at 2.5 deg. lat/lon resolution)
before taking the correlation.
Live
Example Link