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)
20 extern int optind, optopt;
23 while ((c = getopt(argc, argv, "vgpus:t:n:x:y:r:o:a:ADCQTWV")) != -1) {
29 case 'v': *verbose = TRUE; break;
32 s: First file or call sign
34 case 's': strcpy(site_id, optarg); break;
35 case 't': strcpy(tape_id, optarg); break;
41 z: zoom factor (km/pixel)
43 case 'x': *xdim = atoi(optarg); break;
44 case 'y': *ydim = atoi(optarg); break;
45 case 'r': *range = atof(optarg); break;
46 case 'a': *gate_size_adjustment = atof(optarg); break;
50 case 'o': *dbz_offset = atof(optarg); break;
53 Q: Do qc'd reflectivity
57 case 'Q': *qc_reflectivity = TRUE; break;
58 case 'T': *total_reflectivity = TRUE; break;
59 case 'V': *velocity = TRUE; break;
60 case 'W': *spectral_width = TRUE; break;
61 case 'A': *print_azim = TRUE; break;
62 case 'D': *differential_reflectivity = TRUE; break;
69 case 'g': *make_gif = TRUE; break;
70 case 'p': *make_pgm = TRUE; break;
71 case 'u': *make_uf = TRUE; break;
74 num_sweeps: Number of sweeps to make images of
76 case 'n': *num_sweeps = atoi(optarg); break;
81 case '?': fprintf(stderr, "ERROR: option -%c is undefined\n", optopt);
83 case ':': fprintf(stderr, "ERROR: option -%c requires an argument\n",optopt);
90 Must have at the least a file listed on the command lines, everything
94 if (argc - optind != 1) {
96 fprintf(stderr,"ERROR:::\n");
97 fprintf(stderr,"%s [options] input_file:",argv[0]);
98 fprintf(stderr,"\n[options]: ");
99 fprintf(stderr,"\n\t[-v verbose_flag?] ");
100 fprintf(stderr,"\n\t[-s First file or call sign?] ");
101 fprintf(stderr,"\n\t[-t Tape ID] ");
102 fprintf(stderr,"\n\t[-u Make UF file]");
103 fprintf(stderr,"\n\t[-g Make GIF images?]");
104 fprintf(stderr,"\n\t[-p Make PGM images?]");
105 fprintf(stderr,"\n\t[-x X dimension]");
106 fprintf(stderr,"\n\t[-y Y dimension]");
107 fprintf(stderr,"\n\t[-r max range]");
108 fprintf(stderr,"\n\t[-n Number of sweeps to make images]");
109 fprintf(stderr,"\n\t[-Q Do qc reflectivity]");
110 fprintf(stderr,"\n\t[-T Do total reflectivity]");
111 fprintf(stderr,"\n\t[-V Do velocity]");
112 fprintf(stderr,"\n\t[-W Do spectral_width]");
113 fprintf(stderr,"\n\t[-D Do differential reflectivity");
114 fprintf(stderr,"\n\t[-o Apply dBZ offset");
115 fprintf(stderr,":::\n");
119 strcpy(in_file, argv[optind]);