Sequence for processing of z-r relationships for DYCOMS.

Apr. 29, 2002 ModifiedSept . 10, 2004 page 2



Rounds 7 and 8 (20418 - 20430)

Round 10 (30505)



1. zrselect.pro selects flight segments for zr analysis


Leg are defined based on constant altitude and glwc > 0.05.

Altitude changes are diagnosed via std. dev. over 100 s segments. Locations where the std dev is less than 4m and LWC is over 0.05 are selected, then where these indices jump by more than 200 within 20 s are found to identify where constant altitude segments (circles) were interrupted by other flight patterns. Where these indices for usable segments jump by more than 10 provide, along with the beginning and end of the accepted regions, the boundaries of constant altitude segments. Each of these segments is broken into legs of maximum 5 min in duration.

To run this proram, cfiles.txt (paths and file names for each flight) needs to be in the current directory.

Results are written into the text file rfxx_legs.txt which will be read in the following step.

Parameters saved are: leg number (starting from 0), start and end times, and the corresponding indices.



2. Hydrometeor spectra from the C130 netCDF file is retrieved using read1pms.pro

USAGE: read1pms.pro, flight = 'rfxx', legs = [. . . . ]

The program is currently hardwired to opening C130 files via cfiles.txt, as in step 1.

For each flight the text file rfxx_legs.txt from step 1 is read. This file contains leg number (starting with 0) and start and end times.

Data from 3 PMS probes are re-binned into 28 equal log-size intervals, with 1000 um as the upper limit. The file dia_arr.dat is used to provide the new diameters and for the transfer matrix. Other schemes can be put in effect by the same procedure.

USAGE: read1pms, flight = 'rfxx', legs = [.....]

if legs are not specified all legs for that flight are processed

OUTPUT is rfxx_combspctr.dat with 1 Hz, 1/3 Hz and 1/10 Hz spectra. Output is an array of structures.



3. Z, R etc. moments are calculated by mzr_dyleg.pro. one leg at a time.

USAGE: mzr_dyleg.pro, flight = 'rfxx', legn = Y

The rfxx_combspctr.dat file is opened and the data for the selected leg(s) separated. If no leg is specified, all legs listed in rfxx_legs.txt are processed.

Points are accepted if more than 10 channels have data Seconds with drizzle concentration exceeding the 95-percentile for the leg and those with Z values exceeding the 95-percentile for the leg are deleted from the sample.

The function mzr28.pro is used to calculate moment.

The 1-Hz Z and R values are used to generate a power-law Z-R equation. The general approach is to find a relationship representative of the leg, specially the high R and Z values, based on the argument that we need a relationship that is best representative of the majority of data, as opposed to be inclusive of all observed data.

The function myfit1.pro is used to fit the power-law equation. This function uses equal log-R intervals and averages Z values within that interval. This gives equal weight to one high point to a bunch of overlapping points in another interval. Ladfit and correlate are then used to generate the best fit. This is iterated,as follows. First, regions with R-values above and below the midpoint of the R range are compared. If the difference exceeds a factor of 1.4, then only the upper range of values is used and the number of points N is changed to a negative number to indicate that this path was taken. The idea is to give more emphasis to the rarer instances of high drizzle rates. These case are indicated in the output as a negative N for the number of points. Second, whether for the whole range or for the upper range only, outliers are eliminated (with Z distance from the line exceeding 95-percentile value of all deviations) until the resulting slope (b-value) changes less than 20%. A maximum of 5 iterations are allowed.

Parameters: m1, r1, z1, zv1, r3, z3, r10, z10 are for all accepted values. r1_f, z1_f, rmin, rmax and sizef refer to the values which end up being used in generating a, b and c.

For each leg, processed data are saved in mzr_rfxx_legY.dat file.

Main parameters for the leg are added to the zr_out.dat file. This file is an array of structures, one structure per flight&leg. If preceding versions of this file are to be saved, a copy has to be made with zr_out_date.dat name. An empty (newly generated) or partially full zr_out.dat file must be located in the working directory. To generate a new zr_out.dat file, use the following:

IDL> zr_struc = {flight: ' ', legn: 99, startt: 99., endt: 99., a: 0., b: 0., c: 0., rmin: 0., rmax:0., sizef: 0}

IDL> zr_out = replicate(zr_struc,300)

IDL> save,zr_out,file='zr_out.dat'

4. Using mzr_bunch.pro all, or a selected set of legs for a flight can be processed at once. This program makes calls to mzr_dyleg.pro.

IDL>: mzr_bunch, flight = 'rfxx', legs = legs

if keyword legs is not specified all legs found in rfxx_combspctr.dat are processed



5. The content of zr_out.dat can be examined using: read_zrout, flight = 'rfxx', legn = N

IDL> read_zrout, flight = 'rf02', legn=1

prints the following: flight rf02; leg 1; startt: 11:13:00; endt: 11:17:59; a = 0.5795; b = 1.0549; c = 0.9742; rmin = 0.0015; rmax = 0.1949; sizef = 276



6. Plots of the z-r equations, for their respective ranges of validity are plotted using plt_zrout.pro. This routine reads zr_out.dat and produces two plots, one for all days together (zr1.ps) another with each day in a separate panel (zr2.ps).



7. An ASCII file with the content of zr_out.dat can be created with zrout2ascii.pro. Parameters listed are flight number, leg number, start time, end time, a, b, c, rmin, rmax, N.



8. All legs for a given flight are combined into a singel Z-R equation with zr_day.pro. This routine takes data from zr_out.dat, creates 11 points alont the line definedby the power law fit for each leg and then fits a new equation to the (11*number of legs) points. The results are saved in an ILD data file and in an ascii file, and a plot is produced with the results (zr_day.ps).



9. Additional changes were made in the processing in May 2003. One reason was the realization that rf01 and rf02 had different FSSP sizing than the rest of the flights. Other changes were also made, but it is hard to reconstruct what was done. Reference can be made to round10 and corresponding idl journals.