#include "config.h"
#endif
-#define RSL_VERSION_STR "v1.40"
+#define RSL_VERSION_STR "v1.40.3"
/**********************************************************************/
/* Configure: Define USE_TWO_BYTE_PRECISION to have RSL store internal*/
int minute;/* Date for this ray; minute (0-59).*/
float sec; /* Date for this ray; second + fraction of second. */
float unam_rng; /* Unambiguous range. (KM). */
- float azimuth; /* Azimuth angle. (degrees). Must be positive
- * 0=North, 90=east, -90/270=west.
+ float azimuth; /* Azimuth angle (degrees). Must be positive.
+ * 0=North, 90=east, -90/270=west.
* This angle is the mean azimuth for the whole ray.
- * Eg. for NSIG the beginning and end azimuths are
- * averaged.
- */
+ * E.g. for NSIG the beginning and end azimuths are averaged.
+ */
int ray_num; /* Ray no. within elevation scan. */
float elev; /* Elevation angle. (degrees). */
int elev_num; /* Elevation no. within volume scan. */
float sweep_rate; /* Sweep rate. Full sweeps/min. */
int prf; /* Pulse repetition frequency, in Hz. */
+ int prf2; /* Second PRF, for Sigmet dual PRF */
float azim_rate; /* Sweep rate in degrees/sec. */
float fix_angle; /* Elevation angle for the sweep. (degrees). */
float pitch; /* Pitch angle. */
float lon; /* Longitude (degrees) */
int alt; /* Altitude (m) */
float rvc; /* Radial velocity correction (m/sec) */
- float vel_east; /* Platform velocity to the east (m/sec) */
- float vel_north; /* Platform velocity to the north (m/sec) */
- float vel_up; /* Platform velocity toward up (m/sec) */
+ float vel_east; /* Platform velocity to the east (negative for west) (m/sec) */
+ float vel_north; /* Platform velocity to the north (negative south) (m/sec) */
+ float vel_up; /* Platform velocity toward up (negative down) (m/sec) */
int pulse_count; /* Pulses used in a single dwell time. */
float pulse_width; /* Pulse width (micro-sec). */
float beam_width; /* Beamwidth in degrees. */
typedef struct {
int sweep_num; /* Integer sweep number. This may be redundant, since
* this will be the same as the Volume.sweep array index.*/
- float elev; /* Elevation angle (mean) for the sweep. */
+ float elev; /* Elevation angle (mean) for the sweep. Value is -999 for
+ * RHI. */
+ float azimuth; /* Azimuth for the sweep (RHI). Value is -999 for PPI. */
float beam_width; /* This is in the ray header too. */
float vert_half_bw; /* Vertical beam width divided by 2 */
float horz_half_bw; /* Horizontal beam width divided by 2 */
int *data;
} Histogram;
+enum scan_mode {PPI, RHI};
+
typedef struct {
int month, day, year;
int hour, minute;
int height; /* height of site in meters above sea level*/
int spulse; /* length of short pulse (ns)*/
int lpulse; /* length of long pulse (ns) */
+ int scan_mode; /* 0 = PPI, 1 = RHI */
int vcp; /* Volume Coverage Pattern (for WSR-88D only) */
} Radar_header;
* 9 = RH_INDEX = RhoHV: Horz-Vert power corr coeff
*10 = PH_INDEX = PhiDP: Differential phase angle
*11 = XZ_INDEX = X-band reflectivity.
- *12 = CR_INDEX = Corrected DR.
+ *12 = CD_INDEX = Corrected DR.
*13 = MZ_INDEX = DZ mask for 1C-51 HDF.
*14 = MR_INDEX = DR mask for 1C-51 HDF.
*15 = ZE_INDEX = Edited reflectivity.
*22 = CV_INDEX
*23 = AV_INDEX
*24 = SQ_INDEX = Signal Quality Index (Sigmet)
- */
+ *25 = VS_INDEX = Radial Velocity Combined (DORADE)
+ *26 = VL_INDEX = Radial Velocity Combined (DORADE)
+ *27 = VG_INDEX = Radial Velocity Combined (DORADE)
+ *28 = VT_INDEX = Radial Velocity Combined (DORADE)
+ *29 = NP_INDEX = Normalized Coherent Power (DORADE)
+ *30 = HC_INDEX = HydroClass (Sigmet)
+ *31 = VC_INDEX = Radial Velocity Corrected (Sigmet)
+ *32 = V2_INDEX = Radial Velocity for VCP 121 second Doppler cut.
+ *33 = S2_INDEX = Spectrum Width for VCP 121 second Doppler cut.
+ *34 = V3_INDEX = Radial Velocity for VCP 121 third Doppler cut.
+ *35 = S3_INDEX = Spectrum Width for VCP 121 third Doppler cut.
+ */
} Radar;
* VE Edited Velocity. VE_INDEX
*
* KD KDP (deg/km) Differencial Phase KD_INDEX
- * [Sigmet, Lassen]
+ * (Sigmet, Lassen)
*
* TI TIME (unknown) for MCTEX data. TI_INDEX
- * SQ SQI: Signal Quality Index. [Sigmet] SQ_INDEX
+ *
+ * SQ SQI: Signal Quality Index. (Sigmet) SQ_INDEX
* Decimal fraction from 0 to 1, where 0
* is noise, 1 is noiseless.
+ *
+ * VS Radial Velocity, Short PRT (m/s) (DORADE) VS_INDEX
+ *
+ * VL Radial Velocity, Long PRT (m/s) (DORADE) VL_INDEX
+ *
+ * VG Radial Velocity, combined (m/s) (DORADE) VG_INDEX
+ *
+ * VT Radial Velocity, combined (m/s) (DORADE) VT_INDEX
+ *
+ * NP Normalized Coherent Power. (DORADE) NP_INDEX
+ *
+ * HC HydroClass: enumerated class. (Sigmet) HC_INDEX
+ *
+ * VC Radial Velocity corrected for (Sigmet) VC_INDEX
+ * Nyquist unfolding.
*/
/*
* The number of *_INDEX must never exceed MAX_RADAR_VOLUMES.
- * Increase MAX_RADAR_VOLUMES appropriately, for new ingest formats.
+ * Increase MAX_RADAR_VOLUMES appropriately, for new ingest formats.
+ *
+ * Also, when adding new *_INDEXes, you must update the following three arrays
+ * located near the end of this file: RSL_ftype, RSL_f_list, and RSL_invf_list.
+ * You also need to modify volume.c, updating the initialization of array
+ * rsl_qfield by adding a '1' for each new volume index.
*/
-#define MAX_RADAR_VOLUMES 25
+
+#define MAX_RADAR_VOLUMES 42
#define DZ_INDEX 0
#define VR_INDEX 1
#define CV_INDEX 22
#define AV_INDEX 23
#define SQ_INDEX 24
+#define VS_INDEX 25
+#define VL_INDEX 26
+#define VG_INDEX 27
+#define VT_INDEX 28
+#define NP_INDEX 29
+#define HC_INDEX 30
+#define VC_INDEX 31
+#define V2_INDEX 32
+#define S2_INDEX 33
+#define V3_INDEX 34
+#define S3_INDEX 35
+#define CR_INDEX 36
+#define CC_INDEX 37
+#define PR_INDEX 38
+#define SD_INDEX 39
+#define ZZ_INDEX 40
+#define RD_INDEX 41
/* Prototypes for functions. */
void RSL_print_histogram(Histogram *histogram, int min_range, int max_range,
char *filename);
void RSL_print_version();
+void RSL_prune_radar_on();
+void RSL_prune_radar_off();
void RSL_radar_to_uf(Radar *r, char *outfile);
void RSL_radar_to_uf_gzip(Radar *r, char *outfile);
void RSL_radar_verbose_off(void);
float CV_F(Range x);
float AV_F(Range x);
float SQ_F(Range x);
+float VS_F(Range x);
+float VL_F(Range x);
+float VG_F(Range x);
+float VT_F(Range x);
+float NP_F(Range x);
+float HC_F(Range x);
+float VC_F(Range x);
+float SD_F(Range x);
Range DZ_INVF(float x);
Range VR_INVF(float x);
Range CV_INVF(float x);
Range AV_INVF(float x);
Range SQ_INVF(float x);
+Range VS_INVF(float x);
+Range VL_INVF(float x);
+Range VG_INVF(float x);
+Range VT_INVF(float x);
+Range NP_INVF(float x);
+Range HC_INVF(float x);
+Range VC_INVF(float x);
+Range SD_INVF(float x);
/* If you like these variables, you can use them in your application
*/
#ifdef USE_RSL_VARS
static char *RSL_ftype[] = {"DZ", "VR", "SW", "CZ", "ZT", "DR",
- "LR", "ZD", "DM", "RH", "PH", "XZ",
- "CD", "MZ", "MD", "ZE", "VE", "KD",
- "TI", "DX", "CH", "AH", "CV", "AV",
- "SQ"};
+ "LR", "ZD", "DM", "RH", "PH", "XZ",
+ "CD", "MZ", "MD", "ZE", "VE", "KD",
+ "TI", "DX", "CH", "AH", "CV", "AV",
+ "SQ", "VS", "VL", "VG", "VT", "NP",
+ "HC", "VC", "V2", "S2", "V3", "S3",
+ "CR", "CC", "PR", "SD", "ZZ", "RD"};
static float (*RSL_f_list[])(Range x) = {DZ_F, VR_F, SW_F, CZ_F, ZT_F, DR_F,
- LR_F, ZD_F, DM_F, RH_F, PH_F, XZ_F,
- CD_F, MZ_F, MD_F, ZE_F, VE_F, KD_F,
- TI_F, DX_F, CH_F, AH_F, CV_F, AV_F,
- SQ_F};
+ LR_F, ZD_F, DM_F, RH_F, PH_F, XZ_F,
+ CD_F, MZ_F, MD_F, ZE_F, VE_F, KD_F,
+ TI_F, DX_F, CH_F, AH_F, CV_F, AV_F,
+ SQ_F, VS_F, VL_F, VG_F, VT_F, NP_F,
+ HC_F, VC_F, VR_F, SW_F, VR_F, SW_F,
+ DZ_F, CZ_F, PH_F, SD_F, DZ_F, DZ_F};
static Range (*RSL_invf_list[])(float x)
- = {DZ_INVF, VR_INVF, SW_INVF, CZ_INVF, ZT_INVF, DR_INVF,
- LR_INVF, ZD_INVF, DM_INVF, RH_INVF, PH_INVF, XZ_INVF,
- CD_INVF, MZ_INVF, MD_INVF, ZE_INVF, VE_INVF, KD_INVF,
- TI_INVF, DX_INVF, CH_INVF, AH_INVF, CV_INVF, AV_INVF,
- SQ_INVF};
+ = {DZ_INVF, VR_INVF, SW_INVF, CZ_INVF, ZT_INVF, DR_INVF,
+ LR_INVF, ZD_INVF, DM_INVF, RH_INVF, PH_INVF, XZ_INVF,
+ CD_INVF, MZ_INVF, MD_INVF, ZE_INVF, VE_INVF, KD_INVF,
+ TI_INVF, DX_INVF, CH_INVF, AH_INVF, CV_INVF, AV_INVF,
+ SQ_INVF, VS_INVF, VL_INVF, VG_INVF, VT_INVF, NP_INVF,
+ HC_INVF, VC_INVF, VR_INVF, SW_INVF, VR_INVF, SW_INVF,
+ DZ_INVF, CZ_INVF, PH_INVF, SD_INVF, DZ_INVF, DZ_INVF};
#endif
/* Secret routines that are quite useful and useful to developers. */
void radar_load_date_time(Radar *radar);