GrADS makes correlation maps very simple. All you need is a data set that varies in both space and time. The first step is to define your time-series variable. In the interest of time and simplicity, I will just take the 500mb height at one point rather than average over a small spatial area, as is often done when doing these maps. So lets open the data file and set our time-series variable!
'set t 1 636'
'set lev 500'
'set lat 44'
'set lon 282'
The variable "ts_var" is our time-series variable, and basically we saved the time-series of geopotential height at 500mb at the lat/lon point of 44/282. Now, we are going to use two intrinsic GrADS functions to plot the regression coefficients (shaded) and the correlation coefficients (contoured above 0.5).
So, to plot our coefficients, we use the 'tregr()' and the 'tcorr()' functions. Both of these functions do essentially the same thing; you feed them a time-series variable, and a spatial variable, as well as time-constraints, and the function plots your coefficients.
Example: tregr(x, y, t=1, t=50)
This variable takes the regression coefficients of spatial variable y and time-series x through the first 50 time-steps. In our example of 500mb height our code looks like:
'set gxout shaded'
'set t 1'
'set lat 0 90'
'set lon 180 360'
'set gxout contour'
'set cstyle 2'
'set cthick 6'
'set ccolor 1'
'set clevs 0.5 0.6 0.7 0.8 0.9 1.0'
Most of the above code is for display of the contour variable; style, thickness, levels, but you can see the tregr() and the tcorr() functions used correctly. If you are following along at home, the resultant map is plotted.
|Shaded:Regression Coefficients, Contoured: Correlation Coefficients|
So, what you can gather from this map is that the 500mb geopotential height is generally well correlated above 20 degrees N (r>0.8). Furthermore, you can pick out the Rossby wave pattern in the regression coefficients. In anycase, this example show give you an idea of how to make regression/correlation maps in GrADS.
Download Example Script