RADFILL

NAME: radfill −− do objective analysis in horizontal planes
STATUS: Experimental
CREATED: December−19−1996
LAST−REVISION: July−14−1997
SYNOPSIS:
PARAMETERS:
INPUT/OUTPUT
DESCRIPTION
COLUMN DIVERGENCE CORRECTION:
BUGS
AUTHOR

NAME: radfill −− do objective analysis in horizontal planes

STATUS: Experimental

CREATED: December−19−1996

LAST−REVISION: July−14−1997

SYNOPSIS:

radfill [-r radius] [-n minp] fld1 fld2 ... < stdin > stdout

PARAMETERS:

specify the radius of influence around the grid point. If this is not given, then the default value is set to include the four surrounding corners of the grid points on the Z-plane.

specify how many grid points inside the radius of influence have to have good values in order to calculate a sensible average. The default value is one because this allows a good point to survive even if there no other good points around. If there are not enough good values inside the radius of influence, then the average field value of the analyzed grid point is set to bad.

are the names of the fields to be smoothed. The fields names u and v are reserved for the horizontal velocities. If they are included on the parameter list, then the field (dvfd) for the detrained volume flux density and the field (dmfd) for the detrained mass flux density are created. dvfd and dmfd fields, include the column divergence Correction. If the horizontal velocities have different names, then their fields can be smoothed by mentioning them on the command line. However the fields for detrained mass and volume fluxes will not be created.

INPUT/OUTPUT

A candis format file is expected on the stdin. A modified file containing the smooth version for the fields mentioned on the command line is send to the STDOUT. All non-mentioned fields are passed intact from the input to the output.

DESCRIPTION

The idea behind radfill is to run over the grid and substitute every value on the grid for the mentioned fields by a weighted average. The points to make the interpolation must be in the same z-plane and inside or over the radius of influence. Also there must be a minimum number of points into that radius to make a sensible average. The value for the radius of influence(radius),the minimum value of good points into that radius(minp) and the list of fields to be interpolated must be provided as an input parameters. Default values are: radius = sqrt(dx*dx + dy*dy) where dx and dy define the grid spacing on the Z-plane, this will take into account the value of the point plus the four surrounding it -- provided they lie inside the actual grid. minp = 1, this allow a good point to survive even if there no other good points around.

Note: As we go on the grid, we calculate the average values for every mentioned field based on the original values of the input fields, the average value is then saved on a parallel array. When we are done with every point on the grid, we made another run over the grid to update the fields before they are written to the output.

On Feb-14-1997: Two fields were added to the output: The Detrained-Volume-Flux Density .Hl (dvfd) and the Detrained-Mass-Flux Density The reason is to get the detrained fluxes corrected by a column-by-column divergence correction on them. The idea goes as follows:

COLUMN DIVERGENCE CORRECTION:

Let D be the Uncorrected divergence from the smoothed velocity fields u,v. and Let Dc be the Corrected divergence on each column such that Dc = D + C where C is the correction term assumed to be constant through each column. To find the correction term, we apply the condition that the Integral of Dc times the density, R, from zero to Hmax must be ZERO. So we would write

C = ∫ (D * R) dz / ∫ (R) dz

Note: that the assumed names for the horizontal velocities are "u" and "v" this fields must exist in the input file. This program will check how many of this velocities are on the command line, if this number is 2 then the filed for the detrained volume flux density will be created. If the names in the input file are different from those , the smoothing is still going on if the actual names are provided in the command line. However the field (dvfd) will not be created. The names assumed are easily changed on the define statement of the program. I do not like this but for the time being is going to be like that.

BUGS

Plese send bugs to clopez@kestrel.nmt.edu

AUTHOR

Carlos Lopez-Carrillo