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
16 void main(int argc, char **argv)
24 if (argc < 2 || argc > 3) {
25 fprintf(stderr, "Usage: %s infile [callid_or_firstfile]\n", argv[0]);
29 RSL_radar_verbose_on(); /* Not needed; it bides the time. */
30 RSL_select_fields("all", NULL);
31 radar = RSL_anyformat_to_radar(argv[1], argv[2]);
33 if (radar == NULL) exit(-1);
36 RSL_write_radar(radar, "rsl.rsl");
41 char time_string[100];
42 sprintf(time_string,"%2.2d%2.2d%2.2d_%2.2d%2.2d",
43 radar->h.month, radar->h.day, radar->h.year-1900,
44 radar->h.hour, radar->h.minute);
47 for (i=0; i<MAX_RADAR_VOLUMES; i++) {
48 sweep = RSL_get_first_sweep_of_volume(radar->v[i]);
49 ray = RSL_get_first_ray_of_volume(radar->v[i]);
53 RSL_load_sw_color_table();
54 else if (i == VR_INDEX || i == VE_INDEX) {
55 RSL_load_vel_color_table();
56 RSL_rebin_velocity_volume(radar->v[i]);
58 RSL_load_refl_color_table();
64 sprintf(fname, "%s_sweep.ppm", RSL_ftype[i]);
65 RSL_sweep_to_ppm(sweep, fname, 400, 400, 200.0);
66 fprintf(stderr, "Wrote %s\n", fname);
68 sprintf(fname, "%s_sweep", RSL_ftype[i]);
69 RSL_volume_to_gif(radar->v[i], fname, 400, 400, 200.0);