RADSOURCE

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
BUGS

NAME

radsource −− compute source terms for density fields in radar data

SYNOPSIS

radsource time_name x_vel y_vel z_vel test_var1 test_var2 ...

DESCRIPTION

The source of a density field is the partial with respect to time of the density field plus the divergence of the product of the density field and an appropriate velocity field. Conserved densities have zero source. An example of a conserved field is the mass density field.

Radsource computes the sources for the fields test_var1, test_var2, etc., named on the command line, in Doppler radar or other three dimensional data. The three velocity components are specified on the command line as x_vel, y_vel, and z_vel, and the command line argument time_name specifies the scalar time field. Input data are expected in the form of a Candis file on the standard input. Data at successive times must be given in successive variable slices. The result appears on the standard output. Time differencing is between successive slices, and the output file contains one fewer variable slices than the input file, as all input fields are averaged to intermediate times on output. Centered differences are used for spatial derivatives where possible. If bad data or boundaries prevent this, off−centered differences are used. If this is also impossible, the source term is given the bad data value. Each source field is named by prepending the letter s to the test field name.

A word about velocities is in order. The velocity field to be used in calculating the source of a quantity is the velocity field that describes the motion of the material of interest. Thus, applying Newton’s second law to parcels of fluid reveals that the Lagrangian source of parcel velocity times the air density is equal to the net force per unit volume as long as the velocity used in the flux calculation is the air velocity field.

An alternative example is the source of precipitation mass per unit volume. This would presumably be related to the physical processes that create and destroy precipitation. In this case the velocity field of interest is that which describes the motion of precipitation particles rather than air. For the case in which there is a distribution in the size of precipitation particles with different fall speeds, the vertical velocity of interest is the average of vertical particle velocities weighted by the distribution of precipitation mixing ratio over particle terminal velocity.

EXAMPLE

kestrel%radsource time u v wi mu mv < infile > outfile

In this example the sources of the horizontal momentum densities mu and mv are computed for parcels that move with the air velocity field (u, v, wi). The source fields are respectively named smu and smv. The momentum densities are obtained by multiplying the respective velocity components by the air density, using, say, cdfmath. Time is the name of the time field.

BUGS

For the purpose of taking time derivatives, the nominal time of each volume is assumed to represent the actual time at which all data are taken. This is, of course, false, but the relative importance of this assumption needs to be evaluated for each case.

The units of time, length, and velocity must be commensurate for calculations to work. Seconds, meters, and meters per second work, as do kiloseconds, kilometers, and meters per second.