but i get errors highlighted in color.my data are all at same
grid and ranges from 1980-2009
yes? use GPCC_test_r.nc
yes? use CRU_test.nc
yes? sh d
currently SET data sets:
1> ./GPCC_test_r.nc
name title I J
K L M N
PRECIP GPCC Monthly total of precipita 1:125 1:111
... 1:360 ... ...
2> ./CRU_test.nc (default)
name title I J
K L M N
PRE precipitation 1:125 1:111
... 1:360 ... ...
yes? let p =precip[d=1,x=35,y=12]
yes? let q =pre[d=2,x=35,y=12]
yes? GO variance
... Variance and Covariance: Instructions:
Use the LET/QUIET command to define the variable(s) P (and Q) as
your variable(s) of interest (e.g. yes? LET/QUIET P =
u[x=180,y=0])
The variance of P will be variable P_VAR (Q --> Q_VAR)
The covariance will be COVAR The correlation will be CORREL.
Type GO VAR_N to obtain n/n+1 statistical correction factor
...
yes? SHOW VAR
Created by DEFINE VARIABLE:
>>> Definitions that replace any file variable of same
name:
CORREL = COVAR / (P_VAR_MASK*Q_VAR_MASK)^.5
"CORRELATION OF P AND Q"
COVAR = PQ_DSQ[L=@AVE]
"COVARIANCE OF P AND Q"
Q_VAR_MASK = Q_DSQ_MASK[L=@AVE]
"VARIANCE OF Q WHEN P PRESENT"
P_VAR_MASK = P_DSQ_MASK[L=@AVE]
"VARIANCE OF P WHEN Q PRESENT"
Q_VAR = Q_DSQ[L=@AVE]
"VARIANCE OF Q"
P_VAR = P_DSQ[L=@AVE]
"VARIANCE OF P"
PQ_DSQ = P_DEV_MASK * Q_DEV_MASK
Q_DSQ_MASK = Q_DEV_MASK*Q_DEV_MASK
P_DSQ_MASK = P_DEV_MASK*P_DEV_MASK
Q_DEV_MASK = Q_MASK - Q_AVE_MASK
P_DEV_MASK = P_MASK - P_AVE_MASK
Q_AVE_MASK = Q_MASK[L=@AVE]
P_AVE_MASK = P_MASK[L=@AVE]
Q_DSQ = Q_DEV * Q_DEV
P_DSQ = P_DEV * P_DEV
Q_MASK = Q*MASK_PQ
P_MASK = P*MASK_PQ
MASK_PQ = P*Q-P*Q + 1
Q_DEV = Q - Q_AVE
P_DEV = P - P_AVE
Q_AVE = Q[L=@AVE]
P_AVE = P[L=@AVE]
Q = PRE[D=2,X=35,Y=12]
P = PRECIP[D=1,X=35,Y=12]
yes? list p_var, q_var
LONGITUDE: 34.8E
LATITUDE: 12N
Column 1: P_VAR[T=16-DEC-1979 12:00:16-DEC-2009 00:00] is
VARIANCE OF P
Column 2: Q_VAR[T=01-JAN-1980 00:00:31-DEC-2009 00:00] is
VARIANCE OF Q
P_VAR Q_VAR
I / *: 5225. 6231.
yes? LIST correl, covar
*** NOTE: Ambiguous coordinates on T axis: P*Q-P*Q + 1
*** NOTE: Ambiguous coordinates on T axis: P*Q-P*Q + 1
*** NOTE: Ambiguous coordinates on T axis: P*Q-P*Q + 1
*** NOTE: Ambiguous coordinates on T axis: Q*MASK_PQ
*** NOTE: Ambiguous coordinates on T axis: COVAR / (P
_VAR_MASK*Q_VAR_MASK)^.5
*** NOTE: Ambiguous coordinates on T axis: P_DEV_MASK *
Q_DEV_MASK
**ERROR: illegal limits: Q is not in the range T=15-DEC-2079
12:00:16-DEC-2109 00:00
Axis extremes are T=01-JAN-1980 00:00:31-DEC-2009
00:00
yes? list p_var, q_var
LONGITUDE: 34.8E
LATITUDE: 12N
Column 1: P_VAR[T=16-DEC-1979 12:00:16-DEC-2009 00:00] is
VARIANCE OF P
Column 2: Q_VAR[T=01-JAN-1980 00:00:31-DEC-2009 00:00] is
VARIANCE OF Q
P_VAR Q_VAR
I / *: 5225. 6231.
yes? SHOW VAR p_var
P_VAR = P_DSQ[L=@AVE]
"VARIANCE OF P"
yes? SHOW VAR correl
CORREL = COVAR / (P_VAR_MASK*Q_VAR_MASK)^.5
"CORRELATION OF P AND Q"
yes? GO var_n
CANCEL MODE VERIFY
**ERROR: illegal limits: Q is not in the range T=15-DEC-2079
12:00:16-DEC-2109 00:00
Axis extremes are T=01-JAN-1980 00:00:31-DEC-2009
00:00
IF `nm1 eq 0` then exit/script
Command file, command group, or REPEAT execution aborted
yes? LIST correl
**
ERROR: illegal
limits: Q is not in the range T=15-DEC-2079 12:00:16-DEC-2109
00:00
Axis extremes are T=01-JAN-1980 00:00:31-DEC-2009
00:00
yes? set data GPCC_test_r.nc
yes? set data CRU_test.nc
yes? sh d
currently SET data sets:
1> ./GPCC_test_r.nc
name title I J
K L M N
PRECIP GPCC Monthly total of precipita 1:125 1:111
... 1:360 ... ...
2> ./CRU_test.nc (default)
name title I J
K L M N
PRE precipitation 1:125 1:111
... 1:360 ... ...
yes? LET p = precip[d=1,x=22:54,y=-12:24]
yes? LET q = pre[d=2,x=22:54,y=-12:24]
yes? go variance
... Variance and Covariance: Instructions:
Use the LET/QUIET command to define the variable(s) P (and Q) as
your variable(s) of interest (e.g. yes? LET/QUIET P =
u[x=180,y=0])
The variance of P will be variable P_VAR (Q --> Q_VAR)
The covariance will be COVAR The correlation will be CORREL.
Type GO VAR_N to obtain n/n+1 statistical correction factor
...
yes? go var_n
*** NOTE: Ambiguous
coordinates on T axis: P*Q-P*Q + 1
*** NOTE: Ambiguous coordinates on T axis: P*Q-P*Q + 1
*** NOTE: Ambiguous coordinates on T axis: P*Q-P*Q + 1
**ERROR: illegal limits: Q is not in the range T=15-DEC-2079
12:00:16-DEC-2109 00:00
Axis extremes are T=01-JAN-1980 00:00:31-DEC-2009
00:00
IF `nm1 eq 0` then exit/script
Command file, command group, or REPEAT execution
aborted
yes? STAT correl
*** NOTE: Ambiguous coordinates on T axis: Q*MASK_PQ
*** NOTE: Ambiguous coordinates on T axis: COVAR /
(P_VAR_MASK*Q_VAR_MASK)^.5
***
NOTE: Ambiguous
coordinates on T axis: P_DEV_MASK * Q_DEV_MASK
**ERROR: illegal limits: Q is not in the range T=15-DEC-2079
12:00:16-DEC-2109 00:00
Axis extremes are T=01-JAN-1980 00:00:31-DEC-2009
00:00
yes?