anomaly [ parameter=value ... ] [ inputfile outputfile ] anomaly [ parameter=value ... ] [ inputfile ... directory ]
Parameters are: include_vars, dim, cycle_len, per_bin, offset, anom_suffix, mean_suffix, keep_Ns, keep_stddev.
anomaly computes anomalies of variables about their mean. The mean and anomalies are computed about a specified dimension. The mean can be computed as an overall mean, or a mean cycle. (e.g. mean annual cycle) The output dataset contains both the computed means and the anomalies, and optionally the number of data points that were used to compute the mean.
All variables must have the same size and number of dimensions. The mean and anomaly output variables have the same datatype as the input variables. The number-of-element variables have datatype GP_SHORT (see include/gp.h).
List of variables to compute the means and anomalies for. If the list is preceded by a minus sign, then all variables except those listed will be smeared. Wildcards * and ? are allowed. The default is to smear all variables.
The default is all variables in the input dataset(s).
Specifies the dimension about which to compute the mean and anomalies.
The default is the first dimension defined in the dataset.
Specifies the mean cycle len. For example, if hourly data is being used to compute a mean diurnal cycle and the anomalies about the mean diurnal cycle, the cycle length would equal 24. If the anomalies are desired about the entire series mean, the cycle length would equal 1. If cycle length is equal to 1, thus compressing the dimension out, and the variables have dimensions other than dim, then this dimension is not included in the output variables or dataset. This number must be between 1 and the length of dim.
The default is 1.
Specifies the number of items to be taken and put into a single mean within the cycle length. Take the example above for computing a mean diurnal cycle and the hourly anomalies about that cycle. If it is desired to have a mean diurnal cycle composed of 6, 4-hour mean periods then per_bin would be 4, since 4 values at a time would go into each bin.
The default is 1.
Specifies the offset into the cycle length for the first point of the data. Take the example above for computing a mean diurnal cycle and the hourly anomalies about that cycle. If the time series begins at the 1st hour, the offset is 0. If the series begins at the 6th hour, then the offset is 5. This number must be between 0 and cycle_len minus 1.
The default is 0.
The suffix to be appended to the name of dim and to the mean variables in the output dataset. For example, if the included variables are "x" and "y", the name of dim is "time", and mean_suffix="avg", then the output mean variables will be "x_avg" and "y_avg", and the output dimension characterizing the dim dimension of the mean variables will be "time_avg".
The default is "_MEAN".
This suffix needs to be specified when anomalies are to be computed and saved, a blank or zero length suffix indicates that only the "mean" values are to be computed and written to the output dataset. When specified, this suffix is appended to the anomaly variables in the output dataset. For example, if the included variables are "x" and "y", and anom_suffix="prime", then the output anomaly variables will be "x_prime" and "y_prime".
The default is no suffix, i.e., anomalies are not computed.
If keep_Ns=yes, anomaly stores the number of good data values that went into the calculation of the mean(s).
Valid responses are [ yes, no ]. The default is no.
If keep_stddev=yes, anomaly stores the standard deviation of the mean(s).
Valid responses are [ yes, no ]. The default is no.
Assume we have a three dimensional dataset named sst.tdf, with dimensions long, lat and time, where time is in months and there are 59 months, starting in February.
To compute the mean annual cycle (12 months) and anomalies about the mean annual cycle:
% anomaly in/out files : char(255) ? sst.tdf ssttav.tdf include_vars : char(255) ? [] dim : char( 31) ? [] time cycle_len : int ? [1] 12 per_bin : int ? [1] 1 offset : int ? [0] 1 mean_suffix : char( 31) ? [_MEAN] anom_suffix : char( 31) ? [] _ANOM keep_Ns : char( 3) ? [no] keep_stddev : char( 3) ? [no]
To compute the mean seasonal cycle (4 seasons; JFM, AMJ, JAS, OND) and anomalies about the mean seasonal cycle, one would specify per_bin to be equal 3.
datasets, dimavg,
dimcorr, composite, emath, stats.
Last Update: $Date: 1998/05/28 19:48:34 $