Chapter Contents

Previous

Next
The G4GRID Procedure

The PROC G4GRID Statement


PROC G4GRID <DATA=SAS-dataset>
<OUT=SAS-dataset>
<GAMMA=gamma-factor>
<D=amplitude-factor>
<RADIUS=search-radius-value>;

The PROC G4GRID statement initiates the G4GRID procedure. If necessary, it can specify the input data set, the output data set, or both. This statement is required.


Options

DATA= SAS-dataset
specifies the input data set. By default, the procedure uses the most recently created data set, or you can use the DATA= option to specify a data set. If no data set has been created in the current SAS session and the DATA= option is not supplied, an error occurs and the procedure stops.

The input data set must contain at least four numeric variables, and it must contain the numeric variables specified in the GRID statement used with the PROC G4GRID statement.

OUT=SAS-dataset
specifies the output data set. The data set will contain any BY variables specified, the values for the volume variables at the grid coordinates, and interpolated values for each response variable specified. By default, the output data set uses the variable-n naming convention as the data set name.

GAMMA=gamma-factor
is the first of three parameters that control the interpolation of data points. The GAMMA= value controls the "locality" of the data interpolation.

The routine makes two passes through the data. In each pass, a Gaussian weight is applied to each observation based on its distance from the grid point in question. On the second pass, the interpolation function weighting is narrowed so that points nearer the grid point location contribute more than points farther away. The numeric value of gamma-factor controls the narrowness of this second Gaussian pass.

The valid range for the GAMMA= value lies between zero (non-inclusive) and one (inclusive). A smaller value means closer points contribute more heavily during the second pass than when a larger value is specified. A normal range for gamma is 0.3 to 0.5, with 0.3 being the default.

D=amplitude-factor
is the second of three parameters that control the interpolation of data points. The D= value controls how the routine tries to resolve wavelengths embedded in the data.

The procedure tries to resolve some fraction of a target wavelength. The D= option indicates what fraction the procedure should attempt to resolve. Shorter wavelengths are resolved with greater amplitudes, while longer wavelengths are resolved with lesser amplitudes. The target wavelength that the procedure attempts to resolve is twice the average spacing of the input coordinates (that is, the smallest justifiable wavelength).

For example, assume that a data set has an average spacing of 3.5 units. The target wavelength for the data set is 7.0 units. The procedure attempts to resolve the D= fraction of the amplitude of this wave. If D=0.6 is specified, then the routine attempts to resolve 60 percent of amplitude of wavelengths in the data of 7.0 units. Longer waves have less than 60 percent of their amplitude resolved, while shorter waves have more than 60 percent resolved. The larger the value, the greater the detail resolved. However, too high a value results in spurious waves of smaller wavelengths being introduced into the data. That is, the larger the value specified, the more detailed the result, but also the more noise is introduced. The default value is 0.8.

RADIUS=search-radius-value
is the third of three parameters that control the interpolation of data points. The RADIUS= value sets the limit of the search radius during interpolation.

Points outside the search radius do not contribute to the interpolated value of the grid point in question. Data points that lie farther from a grid point contribute less to the interpolated value of that grid point. Some points are far enough away that their contribution can simply be ignored. Specifying a search radius that ignores them can significantly speed the data interpolation.

The valid range lies between zero (non-inclusive) and one (inclusive). For example, a search radius of 0.5 uses only data points that lie within half the grid volume distance from the grid location in question. To use all data points in the grid volume for each grid point, specify missing. The default value is 0.5.

Note:   If an output grid contains missing values, increasing the search radius may eliminate them.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.