The profiler processing code is made up of 3 programs written by me. Once Jeff's program profiler_to_netcdf is run to convert profiler data from pop format to netcdf format the 3 programs can be used. They all use the structures defined in ProfTypes.h.
spc_to_mom_hs converts spectra to moments using the hildebrand- sekhon algorithm. This program is mainly used for the spaced antenna data that didn't have any pop moments created or saved for it. It should imitate what pop does to compute moments. So, if pop moments are available, there is really no reason to use this program. The code itself consists of the following routines:
etl_find_signal.c could be replaced with atd_find_signal.c
atd_moments.c could be replaced with atd_moments.c
qc_mom_ww qc's the data using the etl method which calls the weber/wuertz algorithm.
mom_to_wind_etl computes winds onto a given grid. Uses:
/**************************************************************/
/* structure holding information about the site location */
short elev; /* site elevation */
char name[STR_LEN]; /* site name */
float frequency; /* profiler frequency */
/************************************************************/
/* structures holding header information for the profilers */
short nbeams; /* number of beams */
short *nbprofs; /* array of nbeams (number of profiles per beam) */
/* Beam information (separate from other header so that different beams */
/* can be held in the same TimeSeriesProfiles structure */
/* General header (used for winds and rass computed data) */
long ncoh_int; /* number of coherent integrations */
long ipp; /* inter-pulse period */
long pulse_width; /* pulse width */
long rcvr_delay; /* receiver delay */
long nspec_avg; /* number of spectra averaged */
long nfft; /* number of fft's */
long ncoh_int; /* number of coherent integrations */
long ipp; /* inter-pulse period */
long rcvr_delay; /* receiver delay */
long nspec_avg; /* number of spectra averaged */
unsigned char window_correction;
unsigned char noise_correction;
/*************************************************************/
/* Structures containing all data for a given time */
/* unless otherwise specified all pointers indicate arrays of */
/* (0 ... number of heights) */
float **spectra_dbs; /* (dbs=doppler beam swinging) two dimensional (nfft x ht) */
float *doppler; /* or velocity or 1st moment */
float *snr; /* signal to noise ratio */
float *temp; /* temperature */
short *qc; /*quality control value */
float *interp_vel; /* interpolated velocity (or doppler) */
float *error_estimate; /* error estimate for the interpolated velocity */
/* Meteorological components and computed winds data */
float *u_comp; /* u component */
float *v_comp; /* v component */
float *w_comp; /* w component */
float *error_estimate; /* error estimate for these averaged values (u,v,w) */
/* computed temperature data */
/***************************************************************/
/* Structures holding all information for a single profile in time */
time_t itime; /* time stamp of this profile */
time_t itime; /* time stamp of this profile */
time_t itime; /* time stamp of this profile */
time_t itime; /* time stamp of this profile */
/***************************************************************/
/* Structures holding all information for a time series of profiles */
/* Time Series of Moment Profiles */
char method[STR_LEN]; /* method used to compute moments */
short num_profs; /* number of profiles in this time series */
MomProfile_t *prof; /* array of (0 ... number of profiles) */
/* Time Series of Spectra Profiles */
short num_profs; /* number of profiles */
SpcProfile_t *prof; /* array of (0 ... number of profiles) */
/* Time Series of Wind Profiles */
short num_profs; /* number of profiles */
WindProfile_t *prof; /* array of (0 ... number of profiles */
/* Time Series of Rass Profiles */
short num_profs; /* number of profiles */
RassProfile_t *prof; /* array of (0 ... number of profiles */
/***************************************************************/