RADCART

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
BUGS

NAME

radcart −− interpolate radar data to a Cartesian coordinate system

SYNOPSIS

radcart x0 dx nx y0 dy ny z0 dz nz x_orig y_orig z_orig

DESCRIPTION

Radcart reads a common data format file on the standard input consisting of a volume of radar data in range−ray format. A common data format file is written to the standard output with these data interpolated to a rectangular Cartesian grid. Interpolation is done using the nearest neighbor scheme, i. e., fields at each grid point are assigned those values defined at the nearest measurement point. Fields on grid points outside the spherical sector defined by minimum and maximum values of range, azimuth, and elevation for the volume scan in question are given bad data values. All two−dimensional input fields defined over the dimensions range and raycnt are interpolated to the grid. Zero and one−dimensional fields are passed without change.

The command line arguments define the grid. X0, y0, and z0 define the lower southwest corner of the grid in kilometers. X is east, y is north, and z is up. Dx, etc., define the grid interval in kilometers, and nx, etc. give the numbers of grid points in each direction. The origin of the coordinate system relative to the radar is specified in kilometers by x_orig, etc.

The input file must meet certain requirements. The usual way of creating it is to 1) convert a Universal Format radar tape to common data format using rtape and raduf, 2) concatenate all variable slices into a single variable slice using cdfcat with the sequence variable raycnt, and finally, 3) compress certain fields that don’t change value with raycnt by applying cdfuniq. The variable fields azim elev and sweepm must be present, the latter defining the sweep mode. Radcart recognizes RHI and PPI sweep modes only.

The output static slice contains three scalar fields, xradar, yradar, and zradar, in addition to the appropriate index fields. These fields give the coordinates of the radar relative to the origin of the coordinate system in kilometers. The output variable slice contains an additional field, idist, which gives the distance (in kilometers) between each Cartesian grid point and the raw data point whose values are assigned to that grid point.

EXAMPLE

The first pipe reads a Universal Format tape file and converts it to input suitable for radcart or radcyl:

kestrel%rtape /dev/rmt12 | raduf | cdfcat raycnt 0 maxrays maxrays | cdfuniq > catfile

The number maxrays in the cdfcat argument list should be an integer that exceeds the number of rays in the input file. This may be estimated by comparing the size of the file to the size of a variable slice, as determined by cdflook. If this step is necessary, an intermediate file should be created between raduf and cdfcat so that it can be examined with cdflook.

Radcart may then be invoked as follows:

kestrel%radcart −10 .5 41 −10 .5 41 2 .5 21 2.5 17.7 −0.3 < catfile > cartfile

This defines a Cartesian grid 20 by 20 by 10 km, centered 2.5 km east and 17.7 km north of the radar. If the radar is 0.3 km above sea level, the origin of the coordinate system will be at sea level. However, the grid itself will start 2 km above sea level, reaching 12 km. Grid spacing in all directions will be 0.5 km.

BUGS

Radcart makes a truly Cartesian coordinate system, which is not what one might desire if ranges are large enough to make the curvature of the earth important.

The procedure followed by radcart in finding the closest measurement point to each grid point is to first find the fixed angle closest to the required azimuth (RHI scan) or elevation (PPI scan). Rays with that fixed angle, and with the immediately preceeding and following fixed angles, are scanned for that ray passing closest to the grid point. The closest range gate along this ray is then taken as the "nearest neighbor". This procedure is reasonably efficient, but if fixed angle values don’t reasonably reflect actual radar angles, errors can occur.