9 void process_args(int argc, char **argv, char *in_file, int *verbose,
10 char *site_id, char *tape_id,
11 int *qc_reflectivity, int *total_reflectivity,
12 int *differential_reflectivity,
13 int *velocity, int *spectral_width,
14 int *make_gif, int *make_pgm, int *make_bscan, int *make_uf,
15 int *num_sweeps, float *dbz_offset,
16 int *xdim, int *ydim, float *range,
17 float *gate_size_adjustment, int *print_azim,
18 char *gifdir, char *pgmdir, char *ufdir)
21 extern int optind, optopt;
24 while ((c = getopt(argc, argv, "vgpus:t:n:x:y:r:o:a:ADCQTWVG:P:U:")) != -1) {
30 case 'v': *verbose = TRUE; break;
33 s: First file or call sign
35 case 's': strcpy(site_id, optarg); break;
36 case 't': strcpy(tape_id, optarg); break;
42 z: zoom factor (km/pixel)
44 case 'x': *xdim = atoi(optarg); break;
45 case 'y': *ydim = atoi(optarg); break;
46 case 'r': *range = atof(optarg); break;
47 case 'a': *gate_size_adjustment = atof(optarg); break;
51 case 'o': *dbz_offset = atof(optarg); break;
54 Q: Do qc'd reflectivity
58 case 'Q': *qc_reflectivity = TRUE; break;
59 case 'T': *total_reflectivity = TRUE; break;
60 case 'V': *velocity = TRUE; break;
61 case 'W': *spectral_width = TRUE; break;
62 case 'A': *print_azim = TRUE; break;
63 case 'D': *differential_reflectivity = TRUE; break;
70 case 'g': *make_gif = TRUE; break;
71 case 'p': *make_pgm = TRUE; break;
72 case 'u': *make_uf = TRUE; break;
79 case 'G': strcpy(gifdir, optarg); break;
80 case 'P': strcpy(pgmdir, optarg); break;
81 case 'U': strcpy(ufdir, optarg); break;
84 num_sweeps: Number of sweeps to make images of
86 case 'n': *num_sweeps = atoi(optarg); break;
91 case '?': fprintf(stderr, "ERROR: option -%c is undefined\n", optopt);
93 case ':': fprintf(stderr, "ERROR: option -%c requires an argument\n",optopt);
100 Must have at the least a file listed on the command lines, everything
104 if (argc - optind != 1) {
106 fprintf(stderr,"ERROR:::\n");
107 fprintf(stderr,"%s [options] input_file:",argv[0]);
108 fprintf(stderr,"\n[options]: ");
109 fprintf(stderr,"\n\t[-v verbose_flag?] ");
110 fprintf(stderr,"\n\t[-s First file or call sign?] ");
111 fprintf(stderr,"\n\t[-t Tape ID] ");
112 fprintf(stderr,"\n\t[-u Make UF file]");
113 fprintf(stderr,"\n\t[-g Make GIF images?]");
114 fprintf(stderr,"\n\t[-p Make PGM images?]");
115 fprintf(stderr,"\n\t[-U Directory for UF output files]");
116 fprintf(stderr,"\n\t[-G Directory for GIF output files]");
117 fprintf(stderr,"\n\t[-P Directory for PGM output files]");
118 fprintf(stderr,"\n\t[-x X dimension]");
119 fprintf(stderr,"\n\t[-y Y dimension]");
120 fprintf(stderr,"\n\t[-r max range]");
121 fprintf(stderr,"\n\t[-n Number of sweeps to make images]");
122 fprintf(stderr,"\n\t[-Q Do qc reflectivity]");
123 fprintf(stderr,"\n\t[-T Do total reflectivity]");
124 fprintf(stderr,"\n\t[-V Do velocity]");
125 fprintf(stderr,"\n\t[-W Do spectral_width]");
126 fprintf(stderr,"\n\t[-D Do differential reflectivity");
127 fprintf(stderr,"\n\t[-o Apply dBZ offset");
128 fprintf(stderr,":::\n");
132 strcpy(in_file, argv[optind]);