2 * Ingest NEXRAD (wsr88d) data and output images representing
3 * all field types found.
5 * This example is the most minimum of coding that you need to do
6 * to achieve good results from using the RSL code.
8 * This is short and sweet to demonstrate the simplicity of use for
17 int main(int argc, char **argv)
25 if (argc < 2 || argc > 3) {
26 fprintf(stderr, "Usage: %s infile [callid_or_firstfile]\n", argv[0]);
30 RSL_radar_verbose_on(); /* Not needed; it bides the time. */
31 RSL_select_fields("all", NULL);
32 radar = RSL_anyformat_to_radar(argv[1], argv[2]);
34 if (radar == NULL) exit(-1);
37 RSL_write_radar(radar, "rsl.rsl");
42 char time_string[100];
43 sprintf(time_string,"%2.2d%2.2d%2.2d_%2.2d%2.2d",
44 radar->h.month, radar->h.day, radar->h.year-1900,
45 radar->h.hour, radar->h.minute);
48 for (i=0; i<MAX_RADAR_VOLUMES; i++) {
49 sweep = RSL_get_first_sweep_of_volume(radar->v[i]);
50 ray = RSL_get_first_ray_of_volume(radar->v[i]);
54 RSL_load_sw_color_table();
55 else if (i == VR_INDEX || i == VE_INDEX) {
56 RSL_load_vel_color_table();
57 RSL_rebin_velocity_volume(radar->v[i]);
59 RSL_load_refl_color_table();
65 sprintf(fname, "%s_sweep.ppm", RSL_ftype[i]);
66 RSL_sweep_to_ppm(sweep, fname, 400, 400, 200.0);
67 fprintf(stderr, "Wrote %s\n", fname);
69 sprintf(fname, "%s_sweep", RSL_ftype[i]);
70 RSL_volume_to_gif(radar->v[i], fname, 400, 400, 200.0);