xcorrel [ parameter=value ... ] [ inputfile outputfile ] xcorrel [ parameter=value ... ] [ inputfile ... directory ]
Parameters are: include_vars, cross_vars, correl_dim, lags, ensemble_dims, keep_Ns. normalize.
xcorrel computes auto- or cross-correlations of variables with respect to a specified dimension. The value of the parameter Inormalize is used to specify if the output is to be correlations or un-normalized covariances. Single-sided auto-correlations are computed for the include_vars when cross_vars is unspecified. Cross-correlations (or two-sided auto-correlations) are computed for the sequential pairing of variables specified by include_vars and cross_vars. correl_dim specifies the dimension about which the lagged correlation are to be computed. Upon output, its name will be correl_dim_LAG. If auto-correlations are computed, the dimension will have length lags+1 on output. If cross-correlations are computed, the dimension will have length 2*lags+1 on output. In this case, the name of the output variable for the cross-correlation between variables X and Y will be X_Y. ensemble_dims specifies dimensions whose correlations will be ensemble averaged over. See EXAMPLES below.
The parameter keep_Ns determines whether the number of good values in each computed correlation value is also written to the output data set. For an output variable named "X", the variable storing the number of good values is named N_"X" and is completely parallel to "X".
A one-dimensional variable named lag is written to the output dataset which contains the lags at which the correlations are computed (e.g., 0..lags for auto-correlations or -lags..lags for cross-correlations).
Specifies which variables in the input dataset(s) are to have their correlation computed. cross_vars determines whether auto- or cross-correlations will be computed.
The default is all variables in the input dataset(s).
If left unspecified, then the single-sided auto-correlation will be computed for each variable specified with include_vars. If cross_vars is specified, then one variable must be listed for each variable in include_vars. These two list of variables are then paired sequentially and their correlations are computed. If the pair of variables are the same, then a double-sided auto-correlation will be computed, otherwise a cross-correlation will be computed.
The default is none, i.e. single-sided auto-correlations for the include_vars.
This specifies the dimension about which the lagged correlations are to be computed. See cross_vars. Upon output, this dimension will be named correl_dim_LAG. If single-sided auto-correlations are computed, then the output size of correl_dim will be equal the lags+1 (auto-correlations are symmetric about plus and minus lags). If cross-correlations are computed, then the output size of correl_dim will be equal to 2*lags+1, and the dimension indexes will be scaled to -lags to +lags.
The default is the first dimension defined in the dataset.
This specifies the number of lags to compute. For example, if lags=N, auto-correlations are computed for lags 0 to N, and cross-correlations are computed for lags -N to N.
There is no default.
Specifies dimensions to ensemble average over. Thus, these dimension will not be defined in the output dataset. None of these dimensions can be the same as the correl_dim. See EXAMPLES.
The default is none.
If keep_Ns=yes, xcorrel stores the number of good data values that went into the calculation of each correlation value. For each output variable named "x", a parallel variable named N_"x" is written to the output containing the number of values in the correlation.
The default is yes.
If normalize=yes, xcorrel normalizes the calculation and outputs correlation values, otherwise the output is un-normalized covariances. In the case of correlations, the units of the output variable(s) are "correlation", otherwise the units are the product of the input variable units (if they exist).
The default is yes.
Lets assume we have a three dimensional dataset named myset, with dimensions latitude, longitude and time, where time is in days. The variables are cloud, wind and sst. The following is an example of how to compute the auto-correlations of sst and cloud with respect to time for lags up to 25 days. The output dataset will have dimensions latitude, longitude and time_LAG, where time_LAG will have length 26 (0 lag to 25 day lag). dataset.
% xcorrel in/out files : char(255) ? myset myauto include_vars : char(255) ? [] cloud sst cross_vars : char(255) ? [] correl_dim : char(255) ? [] time lags : int ? 25 ensemble_dims : char(255) ? [] keep_Ns : char( 3) ? [yes] normalize : char( 3) ? [yes]
The next example shows how to compute the time-lagged auto-correlations of cloud and sst, ensemble averaging the results over the longitude dimension. In this case, the output dimensions would be latitude and time_LAG.
% xcorrel in/out files : char(255) ? myset myauto include_vars : char(255) ? [] cloud sst cross_vars : char(255) ? [] correl_dim : char(255) ? [] time lags : int ? 25 ensemble_dims : char(255) ? [] longitude keep_Ns : char( 3) ? [yes] normalize : char( 3) ? [yes]
The next example shows how to compute the time-lagged cross-correlation of the variables cloud and wind with sst, ensemble averaging over both the latitude and longitude dimensions. In this case, there would only be one output dimension, time_LAG, and it would have length 51, -25 to 25 day lag.The output variables would be named cloud_sst and wind_sst.
% xcorrel in/out files : char(255) ? myset myauto include_vars : char(255) ? [] cloud wind cross_vars : char(255) ? [] sst sst correl_dim : char(255) ? [] time lags : int ? 25 ensemble_dims : char(255) ? [] latitude longitude keep_Ns : char( 3) ? [yes] normalize : char( 3) ? [yes]
datasets, spectral, composite, lagspect, spect, linfit, polyfit, xspect, emath, nhood, dimavg, xvu, sample, laminate.
Last Update: $Date: 1998/05/29 21:00:02 $