imgrid [ parameter=value ... ] [ inputfile outputfile ] imgridll [ parameter=value ... ] [ inputfile outputfile ]
Parameters for imgrid are: master_file, grid_spacing, search_radius, wt_power, z_variable, z_index.
Parameters for imgridll are: master_file, grid_spacing, search_rad_km, wt_power, z_variable, z_index.
imgrid and imgridll generate grids (images) from randomly positioned data. The output grids are parallel to the user-specified master dataset.
imgrid converts random latitude/longitude coordinates into grid line/sample coordinates using the master dataset's earth transform and then interpolates the data in the grid image coordinate system. imgridll converts grid line/sample coordinates into latitude/longitude coordinates, and interpolates the data in the earth coordinate system.
Several forms of input data are supported:
(1) (latitude[i], longitude[i], z[i]) (2) (latitude[i], longitude[i], z[i,k]) (3) (z[i,j]) where (i,j) coords are transformable to (lat,lon) (4) (z[i,j,k]) where (i,j) coords are transformable to (lat,lon)
In the second and fourth forms, the index k typically indicates elevation or pressure level. TOVS retrieval data, which has the second form with N=1, is an example of data that can be input to imgrid and imgridll.
The size and resolution of any output grid relative to the master is determined by the grid_spacing parameter. grid_spacing is the subsampling factor for the master dataset. If grid_spacing=1, then the size and resolution of any output grid will be the same as the master. If grid_spacing=N, then any output grid will be 1/N the size and resolution of the master.
For each output grid point, imgrid and imgridll interpolate between the random data points that fall inside a given search radius of that point. Within this interpolation neighborhood, an ouput grid value is computed using distance-weighted averaging. Suppose M random data points fall within a given neighborhood; then
M / M
output value = +++ w[i]*random point value[i] / +++ w[i]
i=1 / i=1
where weight w[i] = (1./distance from grid point) ** wt_power
Normally, wt_power is a non-negative integer. If wt_power is zero, all the weights are 1. However, if wt_power is negative, the formula becomes
output value = random point value nearest to the grid point
imgrid and imgridll differ in how they compute distance. imgrid computes distance in terms of output image pixels; imgridll computes distance in kilometers along the earth's surface. imgrid uses the search_radius parameter, which specifies the size of the interpolation neighborhood in output image pixels. imgridll uses the search_rad_km parameter which defines the interpolation neighborhood in kilometers. imgrid is faster than imgridll, but should only be used when pixel size is relatively constant across the entire output image.
Depending on grid_spacing and search_radius. an image produced from imgrid or imgridll can be a very smooth version of the point-data or it can consist of essentially a blank background with "dots" representing each of the data points. See the parameter descriptions of master_file, grid_spacing and search_radius for more information.
There is exactly one input data and one output dataset. The output dataset will have the same earth transform data as the master dataset, modified to account for the grid_spacing parameter.
This is the filename of the master dataset. The earth location transform of the master dataset is used to convert latitude and longitude coordinates to line and sample coordinates during the metafile generation process. See the description of master for more information on generating master datasets.
Valid responses are any TeraScan dataset that contains an earth transform.
The default is [ Master ].
The first step in the imaging process is to produce an evenly spaced grid. grid_spacing specifies the resolution of the image grid relative to the master grid. If you want the image grid to have the same number of lines and samples as the master grid, then specify 1. If you want the image grid to have one-fourth the resolution, then specify grid_spacing to be 4.
The valid range is [ >= 1 ].
The default is [ 1 ].
imgrid only. The function essentially determines the "dot" size of the observation on the image grid in pixels. When search_radius is small, such that the observations don't overlap, the image will have dots of size search_radius representing the values of the observations. However, if the search_radius is made large enough, the dots overlap and the values become means of the contributing observations. When search_radius is made large enough so that many observations influence the result at any one pixel, then a smooth unbroken image will be produced.
The valid range is [ >= 1 ].
The default is [ grid_spacing * 10 ].
imgridll only. Same meaning as search_radius, except that units are kilometers.
The valid range is [ >= 1 ]. The default is [ grid_spacing * 10 ].
This is the exponent in a one-over-distance raised to a power-weighting function. The weights are ((search_radius - distance to the grid node)/search_radius)**wt_power.
A weighted average is formed by dividing the sum of the weighted points by the sum of all of the weights.
If a negative power is entered, nearest neighbor within search radius will be used instead of weighted average.
Valid responses are [ -1, 0, 1, 2, 3, 4 ]. The default is [ 2 ].
Each dataset to be imaged must include independent variables named latitude and longitude. It must also include at least one dependent variable. The dependent variable may be any valid variable name as long as it exists in the dataset. Because the names latitude and longitude are assumed, it is unnecessary to enter them, but the name of the dependent variable is not assumed, and therefore, must be supplied by the user.
There is no default. More than one z variable may be specified.
This is a secondary index used only for 2-dimensional datasets. It usually represents depth or altitude, but is not restricted to these dimensions. This value is indexed starting at 1.
The valid range is [ >= 1 ].
The default is [ 1 ].
Generate a TeraScan "image" dataset containing the TOVS 500mb temperature retrievals. Specify that the image grid have half the resolution of the Master and make the "dots" (observations) about 10 pixels in size.
[1] % imgrid in/out files : char(75) ? itpp_inp_cdf temp500.image master_file : char(75) ? [Master] grid_spacing : int ? [1] ? 2 search_radius : int ? [20] ? 10 wt_power : int ? [2] z_variable : char(15) ? temperature z_index : int ? [1] ? 3
Last Update: $Date: 1999/05/10 20:14:19 $