From 012916676d26251849e408aaf574458e196df2c4 Mon Sep 17 00:00:00 2001
From: Andy Spencer
Date: Wed, 28 Oct 2009 01:36:10 +0000
Subject: [PATCH] Initial import
---
.gitignore | 27 +
CHANGES | 1655 ++++++++++++++++++++++
CHECK_LIST | 84 ++
Copyright | 22 +
GPL | 339 +++++
LGPL | 481 +++++++
Makefile.am | 73 +
README | 237 ++++
africa.c | 141 ++
africa.h | 69 +
africa_to_radar.c | 163 +++
anyformat_to_radar.c | 171 +++
cappi.c | 192 +++
carpi.c | 302 ++++
colors/Makefile.am | 6 +
colors/blu_dz.clr | Bin 0 -> 206 bytes
colors/blu_height.clr | Bin 0 -> 236 bytes
colors/blu_hh.clr | Bin 0 -> 236 bytes
colors/blu_rainfall.clr | Bin 0 -> 216 bytes
colors/blu_reflectivity.clr | Bin 0 -> 206 bytes
colors/blu_reflectivity1.clr | Bin 0 -> 206 bytes
colors/blu_spectral_width.clr | Bin 0 -> 236 bytes
colors/blu_sw.clr | Bin 0 -> 236 bytes
colors/blu_velocity.clr | Bin 0 -> 192 bytes
colors/blu_vr.clr | Bin 0 -> 236 bytes
colors/blu_zdr.clr | Bin 0 -> 192 bytes
colors/grn_dz.clr | Bin 0 -> 206 bytes
colors/grn_height.clr | Bin 0 -> 236 bytes
colors/grn_hh.clr | Bin 0 -> 236 bytes
colors/grn_rainfall.clr | Bin 0 -> 216 bytes
colors/grn_reflectivity.clr | Bin 0 -> 206 bytes
colors/grn_reflectivity1.clr | Bin 0 -> 206 bytes
colors/grn_spectral_width.clr | Bin 0 -> 236 bytes
colors/grn_sw.clr | Bin 0 -> 236 bytes
colors/grn_velocity.clr | Bin 0 -> 192 bytes
colors/grn_vr.clr | Bin 0 -> 236 bytes
colors/grn_zdr.clr | Bin 0 -> 192 bytes
colors/red_dz.clr | Bin 0 -> 206 bytes
colors/red_height.clr | Bin 0 -> 236 bytes
colors/red_hh.clr | Bin 0 -> 236 bytes
colors/red_rainfall.clr | Bin 0 -> 216 bytes
colors/red_reflectivity.clr | Bin 0 -> 206 bytes
colors/red_reflectivity1.clr | Bin 0 -> 206 bytes
colors/red_spectral_width.clr | Bin 0 -> 236 bytes
colors/red_sw.clr | Bin 0 -> 236 bytes
colors/red_velocity.clr | Bin 0 -> 192 bytes
colors/red_vr.clr | Bin 0 -> 236 bytes
colors/red_zdr.clr | Bin 0 -> 192 bytes
configure.in | 90 ++
cube.c | 265 ++++
doc/Example_RSL_copy.html | 31 +
doc/Makefile.am | 12 +
doc/RSL_Er_loc_struct.html | 16 +
doc/RSL_add_dbz_offset.html | 43 +
doc/RSL_allocate_histogram.html | 25 +
doc/RSL_anyformat_to_radar.html | 87 ++
doc/RSL_area_of_ray.html | 31 +
doc/RSL_azimuth_hash_struct.html | 13 +
doc/RSL_bscan.html | 35 +
doc/RSL_cappi_at_h.html | 31 +
doc/RSL_cappi_struct.html | 26 +
doc/RSL_cappi_to_carpi.html | 31 +
doc/RSL_carpi_struct.html | 29 +
doc/RSL_carpi_value.html | 8 +
doc/RSL_carpi_value_struct.html | 8 +
doc/RSL_clear.html | 34 +
doc/RSL_color_table.html | 77 +
doc/RSL_copy.html | 34 +
doc/RSL_copyright.html | 36 +
doc/RSL_cube_struct.html | 19 +
doc/RSL_edge_to_radar.html | 48 +
doc/RSL_enum_sorted_type.html | 10 +
doc/RSL_fill_cappi.html | 31 +
doc/RSL_find_rng_azm.html | 28 +
doc/RSL_fix_time.html | 39 +
doc/RSL_fraction_of.html | 31 +
doc/RSL_fractional_area_of_sweep.html | 31 +
doc/RSL_free.html | 33 +
doc/RSL_free_cappi.html | 40 +
doc/RSL_free_histogram.html | 26 +
doc/RSL_free_radar.html | 30 +
doc/RSL_get_closest_ray_from_sweep.html | 32 +
doc/RSL_get_closest_sweep.html | 31 +
doc/RSL_get_first_ray_of.html | 32 +
doc/RSL_get_first_sweep_of_volume.html | 32 +
doc/RSL_get_gr_slantr_h.html | 31 +
doc/RSL_get_groundr_and_h.html | 30 +
doc/RSL_get_histogram_from.html | 33 +
doc/RSL_get_linear_value.html | 31 +
doc/RSL_get_next_cwise_ray.html | 35 +
doc/RSL_get_nyquist_from_radar.html | 32 +
doc/RSL_get_range_of_range_index.html | 27 +
doc/RSL_get_ray.html | 31 +
doc/RSL_get_ray_above-below.html | 35 +
doc/RSL_get_ray_from_sweep.html | 31 +
doc/RSL_get_slantr_and_elev.html | 30 +
doc/RSL_get_slantr_and_h.html | 30 +
doc/RSL_get_slice_from_cube.html | 33 +
doc/RSL_get_sweep.html | 33 +
doc/RSL_get_sweep_index_from_volume.html | 29 +
doc/RSL_get_value.html | 43 +
doc/RSL_get_value_from_cappi.html | 31 +
doc/RSL_get_volume.html | 69 +
doc/RSL_get_win.html | 34 +
doc/RSL_hash_table_struct.html | 15 +
doc/RSL_hdf_to_radar.html | 59 +
doc/RSL_histogram_struct.html | 17 +
doc/RSL_lassen_to_radar.html | 33 +
doc/RSL_load_color_table.html | 72 +
doc/RSL_mcgill_to_radar.html | 34 +
doc/RSL_new.html | 48 +
doc/RSL_new_cappi.html | 33 +
doc/RSL_new_carpi.html | 31 +
doc/RSL_nsig_to_radar.html | 57 +
doc/RSL_print_histogram.html | 31 +
doc/RSL_print_version.html | 40 +
doc/RSL_prune.html | 35 +
doc/RSL_radar_file_format.html | 14 +
doc/RSL_radar_header_struct.html | 41 +
doc/RSL_radar_intro.html | 112 ++
doc/RSL_radar_struct.html | 92 ++
doc/RSL_radar_to_hdf.html | 50 +
doc/RSL_radar_to_uf.html | 39 +
doc/RSL_radar_verbose.html | 29 +
doc/RSL_radtec_to_radar.html | 43 +
doc/RSL_range_struct.html | 20 +
doc/RSL_rapic_to_radar.html | 44 +
doc/RSL_ray_header_struct.html | 19 +
doc/RSL_ray_struct.html | 18 +
doc/RSL_read.html | 41 +
doc/RSL_read_histogram.html | 31 +
doc/RSL_read_radar.html | 33 +
doc/RSL_read_these_sweeps.html | 64 +
doc/RSL_rebin.html | 52 +
doc/RSL_rebin_velocity.html | 49 +
doc/RSL_return_eth_sweep.html | 48 +
doc/RSL_return_hzmax_sweep.html | 38 +
doc/RSL_return_zmax_sweep.html | 47 +
doc/RSL_reverse.html | 17 +
doc/RSL_select_fields.html | 71 +
doc/RSL_set_hdf_qc_parameters.html | 46 +
doc/RSL_sort.html | 41 +
doc/RSL_structures.html | 27 +
doc/RSL_sweep_header_struct.html | 20 +
doc/RSL_sweep_struct.html | 13 +
doc/RSL_sweep_to.html | 73 +
doc/RSL_sweep_to_cart.html | 31 +
doc/RSL_toga_to_radar.html | 33 +
doc/RSL_uf_to_radar.html | 37 +
doc/RSL_volume_header_struct.html | 18 +
doc/RSL_volume_struct.html | 14 +
doc/RSL_volume_to.html | 69 +
doc/RSL_volume_to_carpi.html | 31 +
doc/RSL_volume_to_cube.html | 36 +
doc/RSL_write.html | 40 +
doc/RSL_write_histogram.html | 31 +
doc/RSL_write_radar.html | 41 +
doc/RSL_wsr88d_to_radar.html | 33 +
doc/RSL_z_to_r.html | 30 +
doc/alan.mcconnell.html | 9 +
doc/changes.gif | Bin 0 -> 4336 bytes
doc/david.wolff.html | 19 +
doc/dennis.flanigan.html | 9 +
doc/field_but.gif | Bin 0 -> 2737 bytes
doc/functionality_index.html | 279 ++++
doc/gv_but.gif | Bin 0 -> 2726 bytes
doc/gv_sites_but.gif | Bin 0 -> 2771 bytes
doc/home_but.gif | Bin 0 -> 1611 bytes
doc/hot.gif | Bin 0 -> 500 bytes
doc/index.html | 164 +++
doc/internal_routines.html | 248 ++++
doc/john.merritt.html | 10 +
doc/mike.kolander.html | 9 +
doc/programmers_guide.html | 409 ++++++
doc/quick_ref.gif | Bin 0 -> 786 bytes
doc/quick_ref.html | 290 ++++
doc/quickref.gif | Bin 0 -> 4176 bytes
doc/rain.gif | Bin 0 -> 1901 bytes
doc/rsl.fig | 79 ++
doc/rsl.gif | Bin 0 -> 2194 bytes
doc/rsl3.gif | Bin 0 -> 15701 bytes
doc/rsl_big.jpg | Bin 0 -> 51776 bytes
doc/search.gif | Bin 0 -> 809 bytes
doc/search_rsl.html | 20 +
doc/software_but.gif | Bin 0 -> 1707 bytes
doc/t2do.gif | Bin 0 -> 8395 bytes
doc/users_guide.html | 751 ++++++++++
doc/whats_new.gif | Bin 0 -> 1030 bytes
doc/whats_new.html | 185 +++
doc/x_to_radar.fig | 48 +
dorade.c | 616 ++++++++
dorade.h | 324 +++++
dorade_print.c | 245 ++++
dorade_to_radar.c | 255 ++++
edge_to_radar.c | 496 +++++++
endian.c | 73 +
examples/Makefile.am | 24 +
examples/adjust_gate_size.c | 100 ++
examples/any_to_gif.c | 167 +++
examples/any_to_ppm.c | 78 +
examples/any_to_uf.c | 52 +
examples/any_to_ufgz.c | 52 +
examples/bscan.c | 88 ++
examples/cappi_image.c | 82 ++
examples/dorade_main.c | 21 +
examples/killer_sweep.c | 180 +++
examples/kwaj_subtract_one_day.c | 121 ++
examples/lassen_to_gif.c | 32 +
examples/print_hash_table.c | 121 ++
examples/print_header_info.c | 188 +++
examples/qlook.c | 688 +++++++++
examples/qlook_usage.c | 141 ++
examples/run_tests | 225 +++
examples/sector.c | 110 ++
examples/test_get_win.c | 128 ++
examples/wsr88d_to_gif.c | 59 +
examples/wsr_hist_uf_test.c | 86 ++
farea.c | 142 ++
fix_headers.c | 131 ++
fraction.c | 131 ++
get_win.c | 204 +++
gts.c | 111 ++
gzip.c | 109 ++
hdf_to_radar.c | 966 +++++++++++++
histogram.c | 280 ++++
image_gen.c | 1255 ++++++++++++++++
interp.c | 436 ++++++
lassen.c | 523 +++++++
lassen.h | 299 ++++
lassen_to_radar.c | 460 ++++++
mcgill.c | 430 ++++++
mcgill.h | 109 ++
mcgill_to_radar.c | 503 +++++++
nsig.c | 644 +++++++++
nsig.h | 921 ++++++++++++
nsig2_to_radar.c | 23 +
nsig_to_radar.c | 788 ++++++++++
prune.c | 107 ++
radar.c | 199 +++
radar_to_hdf_1.c | 1107 +++++++++++++++
radar_to_hdf_2.c | 781 ++++++++++
radar_to_uf.c | 539 +++++++
radtec.c | 300 ++++
radtec.h | 138 ++
radtec_to_radar.c | 216 +++
rainbow.c | 286 ++++
rainbow.h | 61 +
rainbow_to_radar.c | 308 ++++
range.c | 183 +++
rapic-lex.l | 119 ++
rapic.y | 624 ++++++++
rapic_routines.c | 323 +++++
rapic_routines.h | 115 ++
rapic_to_radar.c | 34 +
ray_indexes.c | 241 ++++
read_write.c | 382 +++++
reverse.c | 48 +
rsl.h | 819 +++++++++++
sort_rays.c | 235 +++
toga.c | 808 +++++++++++
toga.h | 346 +++++
toga_to_radar.c | 478 +++++++
toolkit_1BC-51_appl.h | 97 ++
toolkit_memory_mgt.c | 189 +++
uf_to_radar.c | 633 +++++++++
volume.c | 1620 +++++++++++++++++++++
wsr88d.c | 975 +++++++++++++
wsr88d.h | 219 +++
wsr88d_get_site.c | 98 ++
wsr88d_locations.dat | 146 ++
wsr88d_m31.c | 781 ++++++++++
wsr88d_to_radar.c | 433 ++++++
272 files changed, 37980 insertions(+)
create mode 100644 .gitignore
create mode 100644 CHANGES
create mode 100644 CHECK_LIST
create mode 100644 Copyright
create mode 100644 GPL
create mode 100644 LGPL
create mode 100644 Makefile.am
create mode 100644 README
create mode 100644 africa.c
create mode 100644 africa.h
create mode 100644 africa_to_radar.c
create mode 100644 anyformat_to_radar.c
create mode 100644 cappi.c
create mode 100644 carpi.c
create mode 100644 colors/Makefile.am
create mode 100644 colors/blu_dz.clr
create mode 100644 colors/blu_height.clr
create mode 100644 colors/blu_hh.clr
create mode 100644 colors/blu_rainfall.clr
create mode 100644 colors/blu_reflectivity.clr
create mode 100644 colors/blu_reflectivity1.clr
create mode 100644 colors/blu_spectral_width.clr
create mode 100644 colors/blu_sw.clr
create mode 100644 colors/blu_velocity.clr
create mode 100644 colors/blu_vr.clr
create mode 100644 colors/blu_zdr.clr
create mode 100644 colors/grn_dz.clr
create mode 100644 colors/grn_height.clr
create mode 100644 colors/grn_hh.clr
create mode 100644 colors/grn_rainfall.clr
create mode 100644 colors/grn_reflectivity.clr
create mode 100644 colors/grn_reflectivity1.clr
create mode 100644 colors/grn_spectral_width.clr
create mode 100644 colors/grn_sw.clr
create mode 100644 colors/grn_velocity.clr
create mode 100644 colors/grn_vr.clr
create mode 100644 colors/grn_zdr.clr
create mode 100644 colors/red_dz.clr
create mode 100644 colors/red_height.clr
create mode 100644 colors/red_hh.clr
create mode 100644 colors/red_rainfall.clr
create mode 100644 colors/red_reflectivity.clr
create mode 100644 colors/red_reflectivity1.clr
create mode 100644 colors/red_spectral_width.clr
create mode 100644 colors/red_sw.clr
create mode 100644 colors/red_velocity.clr
create mode 100644 colors/red_vr.clr
create mode 100644 colors/red_zdr.clr
create mode 100644 configure.in
create mode 100644 cube.c
create mode 100644 doc/Example_RSL_copy.html
create mode 100644 doc/Makefile.am
create mode 100644 doc/RSL_Er_loc_struct.html
create mode 100644 doc/RSL_add_dbz_offset.html
create mode 100644 doc/RSL_allocate_histogram.html
create mode 100644 doc/RSL_anyformat_to_radar.html
create mode 100644 doc/RSL_area_of_ray.html
create mode 100644 doc/RSL_azimuth_hash_struct.html
create mode 100644 doc/RSL_bscan.html
create mode 100644 doc/RSL_cappi_at_h.html
create mode 100644 doc/RSL_cappi_struct.html
create mode 100644 doc/RSL_cappi_to_carpi.html
create mode 100644 doc/RSL_carpi_struct.html
create mode 100644 doc/RSL_carpi_value.html
create mode 100644 doc/RSL_carpi_value_struct.html
create mode 100644 doc/RSL_clear.html
create mode 100644 doc/RSL_color_table.html
create mode 100644 doc/RSL_copy.html
create mode 100644 doc/RSL_copyright.html
create mode 100644 doc/RSL_cube_struct.html
create mode 100644 doc/RSL_edge_to_radar.html
create mode 100644 doc/RSL_enum_sorted_type.html
create mode 100644 doc/RSL_fill_cappi.html
create mode 100644 doc/RSL_find_rng_azm.html
create mode 100644 doc/RSL_fix_time.html
create mode 100644 doc/RSL_fraction_of.html
create mode 100644 doc/RSL_fractional_area_of_sweep.html
create mode 100644 doc/RSL_free.html
create mode 100644 doc/RSL_free_cappi.html
create mode 100644 doc/RSL_free_histogram.html
create mode 100644 doc/RSL_free_radar.html
create mode 100644 doc/RSL_get_closest_ray_from_sweep.html
create mode 100644 doc/RSL_get_closest_sweep.html
create mode 100644 doc/RSL_get_first_ray_of.html
create mode 100644 doc/RSL_get_first_sweep_of_volume.html
create mode 100644 doc/RSL_get_gr_slantr_h.html
create mode 100644 doc/RSL_get_groundr_and_h.html
create mode 100644 doc/RSL_get_histogram_from.html
create mode 100644 doc/RSL_get_linear_value.html
create mode 100644 doc/RSL_get_next_cwise_ray.html
create mode 100644 doc/RSL_get_nyquist_from_radar.html
create mode 100644 doc/RSL_get_range_of_range_index.html
create mode 100644 doc/RSL_get_ray.html
create mode 100644 doc/RSL_get_ray_above-below.html
create mode 100644 doc/RSL_get_ray_from_sweep.html
create mode 100644 doc/RSL_get_slantr_and_elev.html
create mode 100644 doc/RSL_get_slantr_and_h.html
create mode 100644 doc/RSL_get_slice_from_cube.html
create mode 100644 doc/RSL_get_sweep.html
create mode 100644 doc/RSL_get_sweep_index_from_volume.html
create mode 100644 doc/RSL_get_value.html
create mode 100644 doc/RSL_get_value_from_cappi.html
create mode 100644 doc/RSL_get_volume.html
create mode 100644 doc/RSL_get_win.html
create mode 100644 doc/RSL_hash_table_struct.html
create mode 100644 doc/RSL_hdf_to_radar.html
create mode 100644 doc/RSL_histogram_struct.html
create mode 100644 doc/RSL_lassen_to_radar.html
create mode 100644 doc/RSL_load_color_table.html
create mode 100644 doc/RSL_mcgill_to_radar.html
create mode 100644 doc/RSL_new.html
create mode 100644 doc/RSL_new_cappi.html
create mode 100644 doc/RSL_new_carpi.html
create mode 100644 doc/RSL_nsig_to_radar.html
create mode 100644 doc/RSL_print_histogram.html
create mode 100644 doc/RSL_print_version.html
create mode 100644 doc/RSL_prune.html
create mode 100644 doc/RSL_radar_file_format.html
create mode 100644 doc/RSL_radar_header_struct.html
create mode 100644 doc/RSL_radar_intro.html
create mode 100644 doc/RSL_radar_struct.html
create mode 100644 doc/RSL_radar_to_hdf.html
create mode 100644 doc/RSL_radar_to_uf.html
create mode 100644 doc/RSL_radar_verbose.html
create mode 100644 doc/RSL_radtec_to_radar.html
create mode 100644 doc/RSL_range_struct.html
create mode 100644 doc/RSL_rapic_to_radar.html
create mode 100644 doc/RSL_ray_header_struct.html
create mode 100644 doc/RSL_ray_struct.html
create mode 100644 doc/RSL_read.html
create mode 100644 doc/RSL_read_histogram.html
create mode 100644 doc/RSL_read_radar.html
create mode 100644 doc/RSL_read_these_sweeps.html
create mode 100644 doc/RSL_rebin.html
create mode 100644 doc/RSL_rebin_velocity.html
create mode 100644 doc/RSL_return_eth_sweep.html
create mode 100644 doc/RSL_return_hzmax_sweep.html
create mode 100644 doc/RSL_return_zmax_sweep.html
create mode 100644 doc/RSL_reverse.html
create mode 100644 doc/RSL_select_fields.html
create mode 100644 doc/RSL_set_hdf_qc_parameters.html
create mode 100644 doc/RSL_sort.html
create mode 100644 doc/RSL_structures.html
create mode 100644 doc/RSL_sweep_header_struct.html
create mode 100644 doc/RSL_sweep_struct.html
create mode 100644 doc/RSL_sweep_to.html
create mode 100644 doc/RSL_sweep_to_cart.html
create mode 100644 doc/RSL_toga_to_radar.html
create mode 100644 doc/RSL_uf_to_radar.html
create mode 100644 doc/RSL_volume_header_struct.html
create mode 100644 doc/RSL_volume_struct.html
create mode 100644 doc/RSL_volume_to.html
create mode 100644 doc/RSL_volume_to_carpi.html
create mode 100644 doc/RSL_volume_to_cube.html
create mode 100644 doc/RSL_write.html
create mode 100644 doc/RSL_write_histogram.html
create mode 100644 doc/RSL_write_radar.html
create mode 100644 doc/RSL_wsr88d_to_radar.html
create mode 100644 doc/RSL_z_to_r.html
create mode 100644 doc/alan.mcconnell.html
create mode 100644 doc/changes.gif
create mode 100644 doc/david.wolff.html
create mode 100644 doc/dennis.flanigan.html
create mode 100644 doc/field_but.gif
create mode 100644 doc/functionality_index.html
create mode 100644 doc/gv_but.gif
create mode 100644 doc/gv_sites_but.gif
create mode 100644 doc/home_but.gif
create mode 100644 doc/hot.gif
create mode 100644 doc/index.html
create mode 100644 doc/internal_routines.html
create mode 100644 doc/john.merritt.html
create mode 100644 doc/mike.kolander.html
create mode 100644 doc/programmers_guide.html
create mode 100644 doc/quick_ref.gif
create mode 100644 doc/quick_ref.html
create mode 100644 doc/quickref.gif
create mode 100644 doc/rain.gif
create mode 100644 doc/rsl.fig
create mode 100644 doc/rsl.gif
create mode 100644 doc/rsl3.gif
create mode 100644 doc/rsl_big.jpg
create mode 100644 doc/search.gif
create mode 100644 doc/search_rsl.html
create mode 100644 doc/software_but.gif
create mode 100644 doc/t2do.gif
create mode 100644 doc/users_guide.html
create mode 100644 doc/whats_new.gif
create mode 100644 doc/whats_new.html
create mode 100644 doc/x_to_radar.fig
create mode 100644 dorade.c
create mode 100644 dorade.h
create mode 100644 dorade_print.c
create mode 100644 dorade_to_radar.c
create mode 100644 edge_to_radar.c
create mode 100644 endian.c
create mode 100644 examples/Makefile.am
create mode 100644 examples/adjust_gate_size.c
create mode 100644 examples/any_to_gif.c
create mode 100644 examples/any_to_ppm.c
create mode 100644 examples/any_to_uf.c
create mode 100644 examples/any_to_ufgz.c
create mode 100644 examples/bscan.c
create mode 100644 examples/cappi_image.c
create mode 100644 examples/dorade_main.c
create mode 100644 examples/killer_sweep.c
create mode 100644 examples/kwaj_subtract_one_day.c
create mode 100644 examples/lassen_to_gif.c
create mode 100644 examples/print_hash_table.c
create mode 100644 examples/print_header_info.c
create mode 100644 examples/qlook.c
create mode 100644 examples/qlook_usage.c
create mode 100755 examples/run_tests
create mode 100644 examples/sector.c
create mode 100644 examples/test_get_win.c
create mode 100644 examples/wsr88d_to_gif.c
create mode 100644 examples/wsr_hist_uf_test.c
create mode 100644 farea.c
create mode 100644 fix_headers.c
create mode 100644 fraction.c
create mode 100644 get_win.c
create mode 100644 gts.c
create mode 100644 gzip.c
create mode 100644 hdf_to_radar.c
create mode 100644 histogram.c
create mode 100644 image_gen.c
create mode 100644 interp.c
create mode 100644 lassen.c
create mode 100644 lassen.h
create mode 100644 lassen_to_radar.c
create mode 100644 mcgill.c
create mode 100644 mcgill.h
create mode 100644 mcgill_to_radar.c
create mode 100644 nsig.c
create mode 100644 nsig.h
create mode 100644 nsig2_to_radar.c
create mode 100644 nsig_to_radar.c
create mode 100644 prune.c
create mode 100644 radar.c
create mode 100644 radar_to_hdf_1.c
create mode 100644 radar_to_hdf_2.c
create mode 100644 radar_to_uf.c
create mode 100644 radtec.c
create mode 100644 radtec.h
create mode 100644 radtec_to_radar.c
create mode 100644 rainbow.c
create mode 100644 rainbow.h
create mode 100644 rainbow_to_radar.c
create mode 100644 range.c
create mode 100644 rapic-lex.l
create mode 100644 rapic.y
create mode 100644 rapic_routines.c
create mode 100644 rapic_routines.h
create mode 100644 rapic_to_radar.c
create mode 100644 ray_indexes.c
create mode 100644 read_write.c
create mode 100644 reverse.c
create mode 100644 rsl.h
create mode 100644 sort_rays.c
create mode 100644 toga.c
create mode 100644 toga.h
create mode 100644 toga_to_radar.c
create mode 100644 toolkit_1BC-51_appl.h
create mode 100644 toolkit_memory_mgt.c
create mode 100644 uf_to_radar.c
create mode 100644 volume.c
create mode 100644 wsr88d.c
create mode 100644 wsr88d.h
create mode 100644 wsr88d_get_site.c
create mode 100644 wsr88d_locations.dat
create mode 100644 wsr88d_m31.c
create mode 100644 wsr88d_to_radar.c
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ccbb51d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+*.bz2
+*.gz
+*~
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+core
+depcomp
+gmon.out
+gtk-doc.make
+install-sh
+libtool
+local
+ltmain.sh
+missing
+stamp-h1
+tags
+valgrind.out
diff --git a/CHANGES b/CHANGES
new file mode 100644
index 0000000..af29ca9
--- /dev/null
+++ b/CHANGES
@@ -0,0 +1,1655 @@
+/* Changes for RSL
+ *
+ *---------------------------------------------------------------------
+ * v1.40 Released 10/10/2008
+ *
+ * 1. wsr88d_m31.c (load_wsr88d_m31_into_radar): Corrected a potential problem
+ * in which the end of sweep or volume might occur at a point in the program
+ * that was isolated from the code that handles that condition.
+ * Store vcp in radar header.
+ * 2. rsl.h: Added vcp to radar header structure for WSR-88D.
+ * 3. nsig_to_radar.c: Corrected a problem involving Extended Header, which
+ * when present, caused elevation in ray header to be set to 0.
+ * 4. wsr88d_m31.c (wsr88d_load_ray_into_radar): Changed the way we determine
+ * whether or not to keep the reflectivity field (we don't want it from
+ * Doppler split cuts). The previous method was inadequate for VCP 121.
+ * 5. read_write.c (RSL_write_radar_fp, RSL_write_volume, RSL_write_sweep)
+ * (RSL_write_ray): Initialize header_buf to zero to avoid junk in output
+ * files. This provides clean outputs for comparing in test situations.
+ *---------------------------------------------------------------------
+ * v1.39 Released 07/24/2008
+ *
+ * 1. Added wsr88d_m31.c. It contains routines to handle new Message Type 31
+ * in WSR-88D Level II Build 10.
+ * 2. wsr88d_to_radar.c: Modified to call message 31 routine.
+ * 3. wsr88d.c: Added code for VCPs 211, 212, 213.
+ * 4. lassen_to_radar.c: Added a fix for PhiDP provided by Scott Collis of BMRC.
+ *
+ *---------------------------------------------------------------------
+ * v1.38 Released 11/29/2007
+ *
+ * 1. wsr88d.c (wsr88d_read_sweep): Modified to handle unusual message packets
+ * at start of WSR-88D files from some future GPM sites.
+ *
+ *---------------------------------------------------------------------
+ * v1.37 Released 06/19/2007 (Severity: low)
+ *
+ * 1. radar_to_uf.c, uf_to_radar.c: Modified to use Local Use Header to store
+ * and retrieve WSR-88D VR azimuth. This is necessary because WSR-88D runs
+ * separate scans for DZ and VR at lower elevations, which means that they
+ * have different azimuths for a given ray. Thanks go to Pat Kennedy of CSU
+ * for discovering this problem and for bringing it to our attention.
+ * 2. lassen_load_sweep in lassen_to_radar.c: Removed 1.4 dB correction for
+ * reflectivity--BMRC version no longer uses it.
+ *
+ *---------------------------------------------------------------------
+ * v1.36 Released 08/29/2006 (Severity: low)
+ *
+ * 1. Forgot to put the modified wsr88d_locations.dat file into previous
+ * release.
+ *
+ *---------------------------------------------------------------------
+ * v1.35 Released 08/28/2006 (Severity: low)
+ *
+ * 1. lassen_to_radar.c: fixed a bug in lassen_load_sweep where sweep index
+ * was being used for sweep number in headers.
+ * 2. radar.c: Modified RSL_get_volume to return volume for any field type.
+ * It had been limited to velocity, spectrum width and reflectivity types.
+ * 3. Added SQ_INDEX for Signal Quality Index field. Files modified: rsl.h,
+ * volume.c, nsig_to_radar.c, nsig.h, uf_to_radar.c, radar_to_uf.c.
+ * 4. wsr88d_locations.dat modified to change height units from feet to meters.
+ * Thanks go to Dave Makofski for finding and fixing that one.
+ *
+ *---------------------------------------------------------------------
+ * v1.34 Released 02/15/2006 (Severity: low)
+ *
+ * 1. wsr88d.c: Fixed a bug in checking msg_type. The problem occurred while
+ * processing data from Houston, which recently switched over to the new
+ * Open RDA (ORDA) being implemented by NEXRAD. Msg_type is in the
+ * righthand byte of a two-byte word, the left containing Channel ID,
+ * but the full two-byte value was being used to check msg_type. This
+ * became a problem when ORDA used a non-zero value for Channel ID.
+ * 2. wsr88d.c and wsr88d_to_radar.c: Added information for new VCPs 12 and
+ * 121.
+ * 3. Added Huntsville site to wsr88d_locations.dat.
+ *
+ *---------------------------------------------------------------------
+ * v1.33 Began 02/25/2004. Released 08/27/2004 (Severity: low)
+ *
+ * 1. Modified wsr88d_to_radar.c and anyformat_to_radar.c to handle change in
+ * WSR-88D header record for Level II Build 5 data format.
+ * 2. Fixed a bug in wsr88d.c, wsr88d_read_sweep, which caused the last ray
+ * of sweep to be deleted along with empty rays in second tilt and above.
+ *
+ *---------------------------------------------------------------------
+ * v1.32 Began 11/05/2003. Released 02/13/2004 (Severity: low)
+ *
+ * 1. Changed computation of sweep seconds in nsig_to_radar.c to eliminate
+ * rounding error.
+ * 2. wsr88d_to_radar.c: removed call to wsr88d_get_wavelength, which computed
+ * the WSR-88D wavelength when parameters were available, or returned a
+ * constant otherwise. Replaced with constant wavelength of 10 cm. Thanks to
+ * Joe Holmes of SIGMET for noticing differing wavelengths between fields.
+ * 3. Added ingest for Rainbow format. Only handles DZ.
+ *
+ *---------------------------------------------------------------------
+ * v1.31 Began 04/30/2003. Released 09/03/2003 (Severity: low)
+ *
+ * 1. nsig_to_radar.c: removed unused #define, made some cosmetic changes in
+ * code and comment alignment.
+ * 2. Makefile.am: Added line to install include-directory under target
+ * install-exec-hook.
+ * 3. Added code to configure.in to fix yywrap unresolved reference that
+ * occurred when installing rsl when the TSDIS toolkit was not installed.
+ *
+ *---------------------------------------------------------------------
+ * v1.30 Began 07/30/2001. Released 03/13/2003 (Severity: low)
+ *
+ * 1. Increased the size of parameter arrays in nsig.c as recommended by
+ * Paul Kucera, to accommodate NPOL polarimetric parameters.
+ * 2. Fixed a bug in nsig_endianess in nsig.c.
+ * 3. Modified uf_to_radar to compute unambiguous range using PRF. Reduced
+ * UF record length by removing extra byte at end of record. Made to handle
+ * 4-digit years (previously assumed 2-digit, as declared in UF documention).
+ * 4. Modified hdf_to_radar to use more accurate value for sweep.h.nrays.
+ * 5. Corrected computation in function wsr88d_get_azimuth_rate in wsr88d.c.
+ * 6. Fixed bug in sweep rate computation in wsr88d.c
+ * 7. Changed wsr88d_ray_to_float in wsr88d.c to use field data pointers
+ * provided in the data, instead of computing offsets. The latter method is
+ * incorrect according to NOAA Radar Operations Center.
+ * 8. Modified radar_to_uf to get fixed angle for mandatory header from value
+ * stored in ray. Previously used average elevation of sweep.
+ * 9. Added examples/adjust_gate_size.c, and added enhanced version of qlook.c
+ * which uses it.
+ *10. Fixed problem in which rsl libraries could not be built if a library
+ * didn't already exist in the target directory. Brought configure.in up to
+ * date with autoconf version 2.53 standards. Removed acconfig.h.
+ *11. Removed outdated email addresses found in comments.
+ *
+ *---------------------------------------------------------------------
+ * v1.29 Began 09/19/2000. Released 4/3/2001 (Severity: low)
+ *
+ * 1. Modified radar_to_hdf_1.c maskBuild() to build MZ mask differently:
+ * maskBuild was checking where CZ and DZ volumes were equal
+ * to build MZ volume (mask). Now, maskBuild just checks where
+ * CZ volume == BADVAL, for runtime speed, and because the comparison between
+ * CZ and DZ volumes was corrupted by the addition of qcParm[ZCAL] to
+ * each CZ range bin in level_1_qc.c qualityControl(). This change is
+ * compatible with Danny Rosenfeld's algorithm by which CZ range bins
+ * are set to BADVAL.
+ * 2. Included Stacy Brodzik's modifications for storing calibration constants
+ * in UF (radar_to_uf.c, uf_to_radar.c).
+ * 3. Corrected version string and units for sweep rate written to UF mandatory
+ * header in radar_to_uf.c, thanks to Joseph Holmes of Sigmet for catching
+ * the inaccuracies. Corrected rounding error in latitude/longitude for UF
+ * mandatory header in same program. Modified assignments of sweep rate
+ * and/or azimuth rate in uf_to_radar.c and hdf_to_radar.c
+ *
+ *---------------------------------------------------------------------
+ * v1.28 Began 03/23/2000. Released: 7/24/2000 (Severity: low)
+ *
+ * 1. Added 3 functions to volume.c :
+ * RSL_add_dbz_offset_to_volume() , RSL_add_dbz_offset_to_sweep(),
+ * RSL_add_dbz_offset_to_ray()
+ * 2. Modified nsig.h , nsig_to_radar.c , volume.c to handle sigmet's
+ * RhoHV and PhiDP fields.
+ * 3. Modified volume.c to fix problem with subsequent calls to
+ * read_these_sweeps()
+ * 4. Modified uf_to_radar.c to compute unambiguous range for
+ * Radar structure.
+ *
+ *---------------------------------------------------------------------
+ *
+ * v1.27 Began 01/11/2000. Released: 2/17/2000 (Severity: low)
+ *
+ * 1. Modified files radar_to_hdf_1.c and radar_to_hdf_2.c
+ * to accomodate random ray lengths, eg, Berrimah data.
+ *
+ *----------------------------------------------------------------------
+ * v1.26 Began 12/11/1999. Released: 12/21/1999 (Severity: low)
+ *
+ * 1. Configuration change for rapic.l and rapic.y.
+ * 2. Changed dependency for rsl.h and wsr88d.h
+ *
+ *----------------------------------------------------------------------
+ * v1.25 Began 11/30/1999. Released: 12/10/1999 (Severity: medium)
+ *
+ * 1. Merged branch v1.24.1.
+ * 2. Added configure/configure.in/Makefile.in.
+ * 3. Added Makefile.am (automake) and other related files.
+ * 4. Configuration is a snap:
+ *
+ * configure --prefix=/some/dir/to/install
+ * make install
+ *
+ *----------------------------------------------------------------------
+ * v1.24.1 Began 8/1/1999. Released: 11/30/1999 (Severity: new features)
+ *
+ * 1. Introduced radar->h.project[24] -- project name.
+ * 2. Added dorade ingest -- RSL_dorade_to_radar.
+ * 3. Added examples/kwaj_subtract_one_day.c -- fix KWAJEX dates.
+ * 4. Removed rsl_popen/pclose routines from gzip.c. I found
+ * a way to eliminate the 'Broken pipe' message, the message
+ * reappeared in linux 2.2.* series, by flushing the
+ * stream when looking at the magic numbers in anyformat_to_radar.c.
+ * 5. HDF ROUTINES ARE REMOVED. I have moved them to gvs for level_1.
+ * See gvs/src/gvslib/. That's where they live now. The interface
+ * RSL_hdf_to_radar and RSL_radar_to_hdf remain as hooks. If
+ * you have libgvs, then you can specify -DHAVE_TSDIS_TOOLKIT in
+ * the Makefile.
+ *
+ *----------------------------------------------------------------------
+ * v1.24 Began 6/25/1999. Released: 6/28/1999 (Severity: bug fix)
+ *
+ * 1. UF ingest improperly set the Fixed angle.
+ * 2. Removed max_reasonable_dbz (60) from gts.c. The app must decide
+ * what a max allowable dbz is.
+ *
+ *----------------------------------------------------------------------
+ * v1.23 Began 3/31/1999. Released: 4/2/1999 (Severity: upgrade)
+ *
+ * 1. Added EDGE format ingest. This requires the library ETOR
+ * which is obtained from Enterprise Electronics.
+ * To build this component, set -DHAVE_EDGE in Makefile.
+ *
+ *----------------------------------------------------------------------
+ * v1.22 Began 3/4/1999. Released: 3/4/1999 (Severity: bux fix)
+ *
+ * 1. Forgot to set the global 'rsl_kdp_wavelen' in nsig_to_radar.c.
+ *
+ *----------------------------------------------------------------------
+ * v1.21 Began 02/16/1999. Released: 3/4/1999 (Severity: minor bux fix)
+ *
+ * 1. UF code didn't recognize VE, now it does.
+ * 2. RSL_SPEED_OF_LIGHT unifies c throughout the library.
+ * 3. Modification to KDP processing for Sigmet. New
+ * F and INVF functions.
+ *
+ *----------------------------------------------------------------------
+ * v1.20 Began 11/12/98. Released: 01/25/1999 (Severity: bug fix/upgrade)
+ *
+ * 1. Fixed RADTEC ingest. Does RHI too, but,
+ * RSL doesn't have any good RHI image routines.
+ *
+ * 2. Added: RSL_set_color_table
+ * RSL_get_color_table
+ *
+ * 3. Added: '-b x' option to any_to_gif. This makes images black below
+ * x dbz. This is a simple noise filter.
+ *----------------------------------------------------------------------
+ * v1.19 Began 9/15/98. Released: 9/23/98 (Severity: bug fix)
+ *
+ * 1. Modified file volume.c . New INV_F, _F routines for diff refl.
+ *
+ * 2. Created examples/images to hold a base-line set of images
+ * to compare when running 'run_tests'. Modified run_tests
+ * to compare images.
+ *
+ *----------------------------------------------------------------------
+ * v1.18 Began 4/28/98. Released: 8/13/98 (Severity: upgrade)
+ *
+ * 1. Added routines:
+ * RSL_radtec_to_radar -- in radtec_to_radar.c
+ * RSL_fix_time -- in volume.c
+ *
+ * 2. Added files:
+ * radtec.c
+ * radtec.h
+ * radtec_to_radar.c
+ *
+ * 3. Modified image generation. Images are produced out to 'range'
+ * specified. Each image pixels is no longer 1km, but radius/range.
+ *
+ * 4. any_to_gif can now accept range and image size arguments.
+ *
+ * 5. RADTEC requires PKWARE routines explode and crc32.
+ * RADTEC is built into RSL, if you specify -DHAVE_PKWARE in
+ * the Makefile. When using RADTEC, you must link your application
+ * staticly; with -static.
+ *
+ * Contact PKWARE at 414-354-8699.
+ *
+ * 6. Modified radar_to_hdf_1.c. Removed ZDR data from 1C-51 HDF.
+ *
+ * 7. Moved HDF_FILE_VERSION definition from toolkit_1BC-51_appl.h
+ * into the application level_1.c
+ *
+ *----------------------------------------------------------------------
+ * v1.17 Began 4/23/98. Released: 4/28/98 (Severity: upgrade)
+ *
+ * 1. Finally received info regarding KDP (KD_INDEX) for SIGMET.
+ * Assumming the units are similar for LASSEN. Boosted nsig_to_radar
+ * to recognize KDP. It is really KDP * wavelength.
+ * The units are deg*cm/km. You must divide out the wavelength,
+ * if that is desired.
+ *
+ * 2. BADVAL/NOECHO mod for nsig_to_radar.c. This should affect
+ * the values that may be stored in any possible UF output.
+ *
+ * WTD : lassen_to_radar.c - check the ZDR conversion, if any. Do
+ * we need this?
+ * WTD : RHI
+ *
+ *----------------------------------------------------------------------
+ * v1.16 Began 3/6/98. Released: 4/21/98 (Severity: bug fix/upgrade)
+ *
+ * 1. Changed how any_to_gif output's filenames produced. Now, they
+ * are written to stdout. -v (verbose) and -V (all volume) options
+ * are added. Changed image_gen.c (RSL_volume_to_gif) to output
+ * filenames to stdout.
+ *
+ * 2. You really do need 'bison' (GNU yacc), 'flex' (GNU lex) and
+ * make (GNU make) to build this library. This has been true
+ * since v1.15 when I introduced the rapic format. These programs
+ * are superior to those on your stock Unix system, so take the
+ * time to install them.
+ *
+ * 3. README explains how to apply patches.
+ *
+ * 4. Eliminated the reduce/reduce conflict in rapic.y
+ *
+ * 5. Year 2000 compliant.
+ *
+ * 6. I forgot the format in sprintf. See rapic.y.
+ *
+ *----------------------------------------------------------------------
+ * v1.15 Began 2/20/98. Released: 3/4/98 (Severity: bug fix/upgrade)
+ *
+ * 1. Michael Whimpey from BMRC, Australia changed code, for the
+ * different callibrations, between, Pre_mctex, mctex, Gunn_Pt
+ * periods. Please see code where there is m.whimpey. See
+ * lassen_to_radar.c
+ *
+ * 2. Added RAPIC format ingest. RSL_rapic_to_radar.
+ * I used GNU Bison (YACC) and GNU Flex (LEX) to code the RAPIC ingest.
+ * This format is used by the Berrimah radar. See rapic_to_radar.c,
+ * rapic_routines.c, rapic.y, and rapic.l.
+ * Not tested w/ older YACC and LEX found on older Unix systems.
+ *
+ * 3. Fixed a bug regarding the reading of stdin streams. Now
+ * you can read compressed or uncompressed files from stdin.
+ * Previously, you couldn't specify NULL as a filename and
+ * have it work reliably in all cases for any file format.
+ * This bug was found by accident and it is nothing you should
+ * be worried about in earlier RSL releases. The reason you need
+ * not worry about it is because 'RSL_anyformat_to_radar' cannot
+ * accept NULL as a filename. For you to notice this, you must
+ * have called the specific ingest routine for the format
+ * being read: RSL_lassen_to_radar, for example.
+ *
+ * 4. Bug in the UF ingest. The scale_factor needs to be float.
+ * When it was 'int', round off errors (truncation) were
+ * happening. This affected the Velocity data, only. The reflectivity
+ * data seemed unaffected, because, the magnitude of the values
+ * was high enough to avoid truncation.
+ *----------------------------------------------------------------------
+ * v1.14 Began 2/2/98. Released: 2/3/98 (Severity: upgrade)
+ *
+ * 1. Added calibration for Gunn Point radar. Assumes that
+ * the radar name will be 'Gunn_Pt'.
+ *
+ *----------------------------------------------------------------------
+ * v1.13 Began 1/16/98. Released: 1/26/98 (Severity: minor bug fix)
+ *
+ * 01/16/98
+ *
+ * 1. radar_to_hdf_1.c: Changed decision algorithm regarding
+ * whether or not to write a VOS into a 1C-51 HDF file.
+ * 1C-51 HDF VOS time_slot status is encoded within the
+ * metaData field 'TK_GEN_DATE_INPUT_FILES'.
+ *
+ *----------------------------------------------------------------------
+ * v1.12 Began 1/12/98. Released: 1/12/98 (Severity: minor bug fix)
+ *
+ * 1. Changed HDF metadata item for empty granules.
+ *
+ *----------------------------------------------------------------------
+ * v1.11 Began 12/17/97. Released: 12/17/97 (Severity: minor bug fix)
+ *
+ * 1. Increased the size of pipecmd in RSL_write_gif and TK_MAX_FILENAME to 256.* 2. Modified image_gen.c to increase the data range of Zdr values.
+ * 3. Bug fix in radar_to_hdf_1.c: No longer dumps core for "tiny" sweeps
+ having fewer than 5 rays.
+ *
+ *----------------------------------------------------------------------
+ * v1.10 Began 8/27/97. Released: 10/21/97 (Severity: minor upgrade)
+ *
+ * 1. Modified ZDR image generation: rsl.h, image_gen.c, ZDR color tables.
+ * 2. Added South Africa data format ingest. Not possible to
+ * interface in RSL_anyformat_to_radar, at this time. The format
+ * is primitive and I need to convert RVPC to dBZ.
+ * 3. Modified HDF component to maintain integrity of anomalous_condition
+ * flags. (RFVAL, APFLAG, NOECHO, BADVAL)
+ * Files: toolkit_1BC-51_appl.h, hdf_to_radar.c, radar_to_hdf_2.c
+ * 4. Modified radar_to_hdf_1.c for TSDIS/DAAC metadata requirements.
+ * 5. Modified any_to_gif.c to output site and date/time for image filenames.
+ * 6. Added QC algorithm parameter. Modified files:
+ * toolkit_1BC-51_appl.h, radar_to_hdf_1.c, radar_to_hdf_2.c,
+ * hdf_to_radar.c
+ *
+ *----------------------------------------------------------------------
+ * v1.9 Began 8/18/97. Released: 8/18/97 (Severity: bug fix)
+ *
+ * 1. Mofified radar_to_hdf_1.c : Metadata mods for TSDIS.
+ *
+ *----------------------------------------------------------------------
+ * v1.8 Began 7/30/97. Released: 8/05/97 (Severity: upgrade)
+ *
+ * 1. Added RSL_read_these_sweeps. Specify specific sweep numbers for
+ * ingest. This drastically speeds up ingest, if you're only interested
+ * in the first or first couple of sweeps. For example, making
+ * base scan images.
+ * wsr88d -done
+ * UF -done
+ * sigmet -done
+ * lassen -done
+ * HDF -done
+ * toga -done
+ * mcgill -done. BUT, apparently, mcgill ingest is broken!!!
+ * When did this happen?
+ *
+ * 2. Added RSL_load_zdr_color_table();
+ * Includes color tables for this field. See colors/
+ *
+ * 3. More HDF mods; more warning messages.
+ *
+ * 4. The TRMM Office has fixed several bugs in the TSDIS toolkit.
+ * For proper HDF creation, that conform to TSDIS HDF specifications,
+ * you will need toolkit 4.5r1.1.
+ *
+ * Toolkit 4.5r1.1 is an unofficial release; the TRMM office will
+ * pass this out upon request.
+ *
+ *----------------------------------------------------------------------
+ * v1.7 Began 7/23/97. Released: 7/25/97 (Severity: bug fix)
+ *
+ * 1. Handles corrupt SIGMET files more gracefully.
+ *
+ * 2. All lat/lon (degree,minute,second) triplets have the same sign.
+ * Except, if UF, then what ever the file tells me and if they're
+ * not all the same sign, then you'll have
+ * to correct the UF w/ an RSL application. In other words, UF
+ * stores the lat/lon as deg/min/sec and they have their own signs;
+ * Strict UF have deg/min/sec all w/ the same sign, anyway.
+ *
+ * 3. Minor changes to HDF component of RSL.
+ *----------------------------------------------------------------------
+ * v1.6 Began 5/02/97. Released: 7/23/97 (Severity: bug fix)
+ *
+ * 1. wsr88d_to_radar.c -- Was too permissive. No longer defaults to KMLB.
+ * If unable to establish a valid site based on callID or first_file,
+ * returns NULL.
+ *
+ * 2. 18 Jul 97 Kolander
+ * Modified radar_to_uf.c & uf_to_radar.c : Fixed some incorrect and
+ * missing sweep and ray header values. Salvaged some numerical precision.
+ *
+ * 3. Fixed a time problem in nsig_to_radar.c. Daylight savings time.
+ *
+ * 4. Saves lat/lon on each ray for UF.
+ *
+ *--------------------
+ * 16 Jun 97 Kolander
+ *
+ * Modifications to radar parameter calulations in:
+ * wsr88d_to_radar.c, wsr88d.h, wsr88d.c, nsig_to_radar.c,
+ * lassen_to_radar.c, rsl.h
+ *
+ * Modified HDF-related files:
+ * hdf_to_radar.c toolkit_1BC-51_appl.h
+ * and split file 'radar_to_hdf.c' into two files:
+ * radar_to_hdf_1.c and radar_to_hdf_2.c
+ * Can handle oddly sized and/or corrupt VOSs.
+ *----------------------------------------------------------------------
+ * v1.5 Began 3/17/97. Released: 4/30/97 (Severity: minor upgrade)
+ *
+ * 1. Additional error checking in wsr88d.c to warn when number of gates
+ * expected is exceeded.
+ * 2. Changes by Mike Kolander affect the HDF component of RSL. This
+ * version of RSL works with the TSDIS toolkit 4.0.
+ * 3. Changes to carpi and cube functions, see below.
+ *-------------------------
+ * Date: 26 Mar 97 kolander
+ *
+ * Files: radar_to_hdf.c, hdf_to_radar.c
+ * Moved QC parameters out of the metadata string into VOS comments
+ * field.
+ *
+ * Files: rsl.h, anyformat_to_radar.c
+ * Moved enum File_type definition from anyformat_to_radar.c into
+ * rsl.h
+ *--------------------------
+ * Date: 17 Mar 97 kolander
+ *
+ * File: rsl.h
+ * Changed carpi structure:
+ * Added f, invf fields.
+ * (Carpi_value **)data is now a doubly indexed array 'data[nrow][ncol]'
+ * Changed slice structure:
+ * Added f, invf fields.
+ * (Slice_value **)data is now a doubly indexed array 'data[nrow][ncol]'
+ * Added function prototypes for:
+ * RSL_free_carpi, RSL_free_cube, RSL_free_slice, RSL_new_cube,
+ * RSL_new_slice, RSL_carpi_to_cart, RSL_carpi_to_gif,
+ * RSL_carpi_to_pict, RSL_carpi_to_ppm, RSL_carpi_to_pgm
+ *
+ * File: cube.c
+ * Added functions:
+ * RSL_free_slice, RSL_new_slice, RSL_new_cube, RSL_free_cube
+ * Modified functions:
+ * RSL_volume_to_cube, RSL_get_slice_from_cube
+ *
+ * File: carpi.c
+ * Added functions:
+ * RSL_free_carpi
+ * Modified functions:
+ * RSL_new_carpi, RSL_find_rng_azm, RSL_cappi_to_carpi
+ *
+ * File: image_gen.c
+ * Added functions:
+ * (These are modified clones of the sweep image_gen functions.)
+ * RSL_carpi_to_cart, RSL_carpi_to_gif, RSL_carpi_to_pict,,
+ * RSL_carpi_to_ppm, RSL_carpi_to_pgm
+ *
+ *----------------------------------------------------------------------
+ * v1.4 Began 12/24/96. Released: 3/7/97 (Severity: bug fix)
+ *
+ * 1. Some WSR88D files have a 'radial status' of 28. This is un-
+ * documented. I assume it means some catastrophic reset has occured.
+ * Therefore, the code that counts the number of rays is modified
+ * to rely on the 'ray_num' reported upon reading the file.
+ * Also, I assume that when the status tells me that I'm reading
+ * the 'start of a new elevation' (status == 0) that all subsequent
+ * records will overwrite previously stored rays.
+ *
+ * I've seen this status number(28) occur, rarely, in the
+ * WSR88D data. See wsr88d.c.
+ *
+ * 2. Removed kwaj component. - Mike.
+ *
+ * 3. Installs toolkit_1BC-51_appl.h in INCDIR. This file is needed
+ * only if you plan to use the HDF component.
+ *
+ * 4. Fixes a freeing bug in nsig.c. Added member nparams to the
+ * NSIG_Sweep structure to track this for the free routine.
+ *
+ * 5. Ray indexing bug fixed in wsr88d_to_radar.c which produced an
+ * invalid time when the first wsr88d ray was null. Basically, using
+ * 'i' instead of 'iray'.
+ *----------------------------------------------------------------------
+ * v1.3 Began 08/26/96. Released: 12/17/96 (Severity: upgrade)
+ *
+ * 1. Lassen field 'Zdr' loaded into RSL 'ZD' field, not the RSL 'DR'
+ * field, as originally envisioned within HDF functions. Henceforth,
+ * 'ZD' represents (linear) reflectivity depolarization ratio:
+ * ZD = 10log(Z_horiz/Z_vert) in units dB
+ * as opposed to the circular depolarization ratio.
+ *
+ * What exactly are the RSL 'LR' and 'DR' fields??
+ *
+ *
+ * For consistency of field nomenclature:
+ *
+ * Renamed 'CR' to 'CD'. (corrected ZDR for 1C-51)
+ * 'MR' to 'MD'. (1C-51 mask for ZDR)
+ *
+ * CD_F returns ZD_F
+ * CD_INVF returns ZD_INVF
+ *
+ * 2. Sort by time forgot to compare the hour field. Minor fix.
+ *
+ * 3. Fix z_to_r to return proper value.
+ *
+ * 4. Lassen ingest: fix the sign of deg/min/sec so they match.
+ * Trusting that the sign of the deg is correct.
+ *
+ * 5. Added RSL_select_fields. This reduces memory requirements
+ * upon ingest. You can select, "all" (default), "none" (just to
+ * get header info) or "dz", "vr", ...
+ *
+ * WHAT? STATUS?
+ * lassen done
+ * wsr88d done
+ * UF done
+ * nsig done
+ * nsig2 done
+ * kwaj not applicable as it only has DZ.
+ * hdf done
+ * mcgill not applicable as it only has DZ.
+ * toga not done. If you want to do this, feel free.
+ *
+ * 6. Uses 'gzip -1'. This cuts the time for making UF files in half.
+ *
+ * 7. Renamed 'makefile' to 'Makefile'
+ *
+ * 8. The HDF component has changed drastically and is not compatable
+ * with previous versions. It may change again, contingent upon
+ * the TSDIS toolkit 3.5.2.1 (as of 12/17/96). Expect minor changes
+ * to the HDF component in the future.
+ *
+ * 9. Pruning of sweeps and rays now sets moved object pointers to
+ * NULL. See prune.c
+ *
+ *10. Updated nsig_to_radar.c to check for ant_scan_mode. If mode is
+ * RHI, then return NULL because RSL can't handle RHIs. --Paul
+ *
+ *11. Split memory management routines for hdf processing. --Mike K.
+ *----------------------------------------------------------------------
+ * v1.2 Began 08/26/96. Released: 9/6/96 (Severity: minor bug-fix upgrade)
+ *
+ * 1. Eliminated zero sized arrays in lassen.h. SGI 'cc' can't
+ * handle zero sized arrays. This brings back the -pedantic
+ * compile flag.
+ *
+ * 2. Implemented popen and pclose (called rsl_popen and rsl_pclose)
+ * to eliminate the annoying message 'Broken pipe.' on SGI and HP
+ * computers.
+ *
+ * 3. The HDF component is incompatable with earlier versions because
+ * of the use of additional fields. It now uses the MASK fields
+ * and calibration information. It should be considered that the
+ * HDF component is in a state of flux.
+ *
+ * 4. Minor bug in nsig.c wherein when rays are missing (0 sized)
+ * that not all rays present will be ingested. This is fixed.
+ *
+ * 5. Copyrighted the software.
+ *
+ * 6. 'anyformat_to_radar' can recognize HDF files.
+ *
+ *----------------------------------------------------------------------
+ * v1.1 Began 08/21/96. Released: 08/22/96 (Severity: SERIOUS bug fix)
+ * If you have already upgraded to RSL v1.0.1, then this is a minor
+ * upgrade.
+ *
+ * 1. I should have left well enough alone. But, getting rid
+ * of rsl.h.template in favor of only having rsl.h has revealed
+ * a serious bug.
+ *
+ * THIS BUG IS IN V1.0 ONLY.
+ *
+ * The type for 'Range' could be built into
+ * the RSL differently than how your application is built.
+ * For instance, if RSL is built with USE_TWO_BYTE_PRECISION, then
+ * your application will think 'Range' is a one byte storage class,
+ * because the default RSL configuration is to use one byte storage.
+ *
+ * This bug slipped through all the tests that I perform and was
+ * discovered only when using the radar_to_hdf component of RSL.
+ * Thanks to Mike Kolander for finding this one.
+ *
+ * Configuration instructions are changed so that you must edit
+ * rsl.h to use one byte precision.
+ *
+ * 2. All MCTEX fields are recognized and loaded into Radar.
+ * h.f and h.invf are modeled after LASSEN conversion functions.
+ * 3. Added radar_to_hdf.o to makefile.
+ * 4. In examples/any_to_gif.c, outputs all fields.
+ * 5. Three convience arrays are defined in rsl.h.
+ * a. RSL_ftype[];
+ * b. RSL_f_list[];
+ * c. RSL_invf_list[];
+ * Each array is MAX_RADAR_VOLUMES long and contain: strings
+ * representing the field type, a pointer
+ * to the F function, and a pointer to the INVF function.
+ *
+ * Usage is conditional by defining USE_RSL_VARS before including
+ * rsl.h. Use:
+ * #define USE_RSL_VARS
+ * #include "rsl.h"
+ *
+ * Normally, you shouldn't worry about this.
+ *
+ * 6. Removed -pedantic compile flag because LASSEN code has a 0
+ * sized array -- no warnings.
+ *----------------------------------------------------------------------
+ * v1.0 Began 04/19/96. Released: 8/18/96 (Severity: minor upgrade)
+ *
+ * 1. Ignore SIGPIPE when making images.
+ * 2. Can read UF files of MCTEX data. This UF file contains
+ * RH and PH fields. This is LASSEN data that has been converted
+ * to UF via a sun program. It is the LASSEN II format.
+ * 3. Fixed date/time == 0 when calling uf_to_radar multiple times.
+ * The second and subsequent calls produced 0 for the
+ * radar->h.year/month/day and radar->h.hour/min/second.
+ * 4. Always allocate MAX_RADAR_VOLUMES for new radars during ingest.
+ * This will allow one to test any volume index for presence.
+ * 5. Set the default functions to DZ_F. This sets CZ_F correctly.
+ * It is unclear if the other conversion fuctions are properly
+ * defined.
+ * 6. Pure UF file ingest bug fixes.
+ * 7. Added RSL_hdf_to_radar - Mike Kolander.
+ * 8. Added RSL_radar_to_hdf - Mike Kolander.
+ * 9. New field type: XZ for X-band Reflectivity.
+ * 10. Working version of nsig_to_radar. - Paul Kucera.
+ * This version works on both big endian and little endian (Linux),
+ * and, for both version 1 and version 2 formats. Version 2
+ * files are generated on big-endian machines (so far, SGI Iris
+ * computers), whereas, Version 1 files were written on
+ * little-endian DEC computers. Two routines are provided:
+ *
+ * RSL_nsig_to_radar(char *infile);
+ * RSL_nsig2_to_radar(char *infile);
+ *
+ * Nsig ingest can handle nsig files/tapes that were
+ * written on a DEC (little endian) or an SGI (big endian).
+ * It is handled automatically by examination of the 'magic' bytes.
+ * You will note that the byte-ordering in the file is dependant
+ * on which machine wrote the tape or file. The New-SIGMET
+ * documentation does not specify which byte-ordering is to be used
+ * when the file is written.
+ *
+ * Re-wrote nsig.c and beefed up nsig.h. Now, there is an
+ * interface to read an entire nsig sweep. You can loop through
+ * the returned sweep and pick your values, and load RSL.
+ * This re-write was done to make reading version 2 files easier.
+ * Additionally, all NSIG code for version 1 and version 2 files
+ * is centrally located in:
+ * nsig.h
+ * nsig.c
+ * nsig_to_radar.c
+ * To have both versions supported in the same files, I use #ifdef
+ * and the C preprocessor. 'nsig.h' is saturated with #ifdef NSIG_VER2
+ * constructs. Thus, only one source is maintained for both NSIG versions.
+ *
+ * 11. Added RSL_print_version();
+ * 12. Added docs for users guide, hdf.
+ * 13. Added html 'grouping by functionality' page.
+ * 14. Restores stdin and stdout when creating pipes.
+ * The pipe readers need to loop until no data available, because
+ * 'read/fread' will not get all the data in one call.
+ * 15. Added moving platform headers to Ray structure:
+ * float pitch; Pitch angle.
+ * float roll; Roll angle.
+ * float heading; Heading.
+ * float pitch_rate; (angle/sec)
+ * float roll_rate; (angle/sec)
+ * float heading_rate; (angle/sec)
+ * float lat; Latitude (degrees)
+ * float lon; Longitude (degrees)
+ * int alt; Altitude (m)
+ * int rvc; Radial velocity correction (units of velocity)
+ *
+ * This information typically comes from NSIG. For other formats
+ * the values are all zero.
+ * 16. Read version 1.3 and 1.4 of LASSEN data. RSL_lassen_to_radar.
+ * This means that RSL can read MCTEX data.
+ * 17. Users manual. Walk a novice through a simple example and explain
+ * what header information is important. Teach how to take advantage
+ * of the library.
+ * 18. Eliminated the #ifeq in makefile. Thus, rsl.h.template is removed
+ * and rsl.h is resurrected.
+ *----------------------------------------------------------------------
+ * v0.45 Began 03/26/96. Froze: 03/27/96 (Severity: minor)
+ *
+ * 1. Fixed broken pipe problem on HP and SGI. Cause unknown.
+ * All I did was to remove the pclose in any_format_to_radar.c
+ * It seems that if there is any data left in the pipe that a
+ * SIGPIPE is sent when trying to close the pipe.
+ * On SGI's this causes a core dump. This bug is difficult to
+ * reproduce.
+ * 2. Nsig ingest is severly broken. It always was. Work in
+ * progress.
+ * 3. It is important that TSDIS get this version to run on their SGI
+ * as it prevents a core dump. Normally, this shouldn't affect
+ * anyone.
+ *----------------------------------------------------------------------
+ * v0.44 Began 03/19/96. Froze: 03/19/96.
+ *
+ * 1. In prune.c, pointers that are pruned are now set to NULL.
+ * This elimated core dumps associated with trying to free structues.
+ * 2. On gzip-ed UF output, stdout is flushed before the pipe is opened.
+ * 3. Added reverse.c -- Reverse the order of the sweep pointers in
+ * a volume.
+ *----------------------------------------------------------------------
+ * v0.43 Began 03/01/96. Froze: 03/05/96.
+ *
+ * 1. farea.c -- nbins fix.
+ * 2. On UF output, checks for NOECHO.
+ *
+ *----------------------------------------------------------------------
+ * v0.42 Began 11/27/95. Froze: 02/16/96.
+ *
+ * 1. Removed '#include '.
+ * 2. Added a couple of missing prototypes in rsl.h.template.
+ * 3. Added:
+ * Ray *RSL_prune_ray (Ray *ray);
+ * Sweep *RSL_prune_sweep (Sweep *s);
+ * Volume *RSL_prune_volume(Volume *v);
+ * Radar *RSL_prune_radar (Radar *r);
+ *
+ * These routine remove dataless substructures. Prompted by
+ * poor NCAR ingest routines for UF files; it is wise to prune
+ * a Radar prior to calling RSL_radar_to_uf. Therefore, if
+ * software cannot read the UF files created by RSL, then try these
+ * prune functions before outputting the UF file. In either case,
+ * RSL_radar_to_uf produces valid UF files.
+ * 4. Removed trigraph in mcgill.c.
+ * 5. Fixed lassen ingest problem on Linux. I think XDR has a bug
+ * where bit fields are not loaded properly. This is a kludge fix.
+ * 6. Removed column.c. Code not mature and takes way too much
+ * RAM. Included in the removal are the vertical structure routines.
+ * The code has been moved to the application (qcwin).
+ * 7. RSL_get_first_ray_of_sweep now returns when the ray number is 1 or
+ * 0. This drasitically speeds the routine.
+ * 8. Increased the UF buffer size from 4096 to 16384.
+ *----------------------------------------------------------------------
+ * v0.41 Began 11/01/95. Froze: 11/20/95.
+ *
+ * 1. Minor doc changes. More up to date with implementation.
+ * 2. Implemented 'radar_type' in the radar_header structure. Values
+ * are strings and are: "wsr88d", "lassen", "uf", "nsig", "mcgill",
+ * "kwajalein", "toga".
+ * 3. Increased range of data (internal storage conversion functions)
+ * when using 2 byte storage. Some nsig data can have values below the
+ * default wsr88d function range.
+ * 4. 'farea.c' -- Volumes are used to compute the fractional area.
+ * This matches the latest specification of the function.
+ * 5. Automatically uncompress files. Transparently sets up
+ * a decompression pipe. If the input is not stdin, then 'anyformat_to...'
+ * can peek inside a compressed file and determine what ingest routine to
+ * use. Reading copmressed files from disk and internally uncompressing
+ * them turns out to be the fastest form of ingesting wsr88d (only format
+ * timed) data on my 486. However, I get mixed results on the HP 755.
+ * 'anyformat_to...' uses 'gunzip' to peek inside compressed files.
+ * 6. Can make gzip-ed UF files. The new routine is 'RSL_radar_to_uf_gzip'.
+ * Also, RSL_radar_to_uf_fp takes a file pointer. Thus, you can
+ * define your own output filter.
+ * 7. Added RSL_write_radar_fp, RSL_write_radar_gzip.
+ *----------------------------------------------------------------------
+ * v0.40 Began 10/24/95. Froze: 10/24/95.
+ *
+ * 1. Type cast for Sweep_header and Ray_header was removed so that
+ * stock 'cc' on SGI could digest the code. File: column.c. Why?
+ *
+ * Version 0.39 was short lived. :-)
+ *----------------------------------------------------------------------
+ * v0.39 Began 7/1/95. Froze: 10/24/95.
+ *
+ * 1. Mcgill library is not separate. Included in rsl in whole.
+ * 2. Interpolation routines added.
+ * 3. Added RSL_load_height_color_table -- and the colors/*height.clr
+ * 4. Added RSL_load_rainfall_color_table -- and the colors/*rainfall.clr
+ * 5. Removed RSL_print_{volume,sweep,ray}
+ * 6. Removed some unused routines.
+ * 7. Vertical_structure is its own type composed of Vertical_sweeps and
+ * Vertical_rays (columns).
+ * 8. Added doc/internal_routines.html.
+ * 9. UF is exchangable between big and little endian. Finally, this
+ * has been fixed. Now UF can be generated on little endian machines
+ * and read on big endian (the UF generated is in big endian format even
+ * on the little endian machine). And, visa versa.
+ *10. New version of RSL_get_vertical_structure in column.c. Doc's updated.
+ *11. Fixed bug in radar_to_uf. When the number of actual sweeps (and perhaps
+ * volumes) is less than the determined max of the entire radar structure,
+ * then the pointers may be erroneous. Paul caught this flounder.
+ *12. Added RSL_uf_to_radar_fp. The FILE *fp version of the UF ingest.
+ * Also, passing NULL to RSL_uf_to_radar means to read from stdin.
+ *13. Added NOECHO flag for f and invf. Currently, defined for UF, NSIG and
+ * Kwaj data.
+ *14. Included source for libraries: wsr88d, lassen, tg, nsig, mcgill,
+ * and kwajlein. Now linking needs only: -lrsl -lm
+ *15. Simplified the configuration procedure. All configuration
+ * is specified from 'makefile'. See README for new install instructions.
+ *16. Removed ray_status, sec_num, atm_att, min_dif, sys_cal from ray
+ * header. These are not used and specific for wsr88d.
+ *17. Summary of routine that handle NULL filenames as STDIN.
+ * RSL_wsr88d_to_radar
+ * RSL_uf_to_radar -- calls --> RSL_uf_to_radar_fp
+ * RSL_lassen_to_radar
+ * RSL_nsig_to_radar
+ * RSL_toga_to_radar
+ * RSL_mcgill_to_radar
+ *18. Removed RSL_get_sweep_index_from_volume.
+ *19. Removed RSL_X_ray_indexes. Actually, just renamed the routine
+ * to 'construct_sweep_hash_table'. The hash table retains the hi and
+ * low ray pointers for closest ray comparison. Angle diff's removed.
+ *20. Removed hash table implementation in the Sweep structure. It
+ * is now implemented internally in RSL.
+ *21. BADVAL valued depends on Range type. Picked to be out of range.
+ *
+ *----------------------------------------------------------------------
+ * v0.38 Began 6/1/95. Froze 6/29/95.
+ *
+ * 1. Makes 2's compliment, instead of 1's compliment, in sweep_to_cart.
+ * 2. Modifications to eth functions.
+ * 3. Added routine RSL_get_column. See column.c.
+ * 4. Added Column data structure.
+ * 5. Static pointer for image generation. Free up image pointer and
+ * reallocate. Otherwise, we've got a memory leak when making many
+ * images.
+ * 6. Added Paul's and Dennis's modifications of the cappi routines.
+ * I modified the cappi structure so that Sweep is a substructure.
+ * This makes image generation and get_value_from_cappi easy to implement.
+ * 7. Added a test program in examples/cappi_image.c to test cappi
+ * generation.
+ * 8. Change doc/ for the cappi routines. Routines added/modified are:
+ * float RSL_get_value_from_cappi(Cappi *cappi, float rng, float azm);
+ * int RSL_fill_cappi(Volume *v, Cappi *cap, int method);
+ * void RSL_free_cappi(Cappi *c);
+ * Cappi *RSL_new_cappi(Sweep *sweep, float height);
+ * Cappi *RSL_cappi_at_h(Volume *v, float height, float max_range);
+ * Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy,
+ * 9. Carpi structure modified to be compatable with cappi routines.
+ * 10. Added RSL_get_gr_slantr_h. -> range.c
+ * 11. RSL_uf_to_radar only recognizes UF files.
+ * 12. RSL_uf_to_radar handles TRUE UF, 2 and 4 byte record length delimeters.
+ * 13. Minor bug fix in ray_indexes.c to handle RHI input. The number of
+ * hash table entries is now a function of the beam_width and not the
+ * number of rays.
+ * 14. Bug fix in rebin_velocity_sweep. New velocity color tables.
+ * 'examples/qlook.c' added. Yet another image generation program;
+ * redundant.
+ * 15. RSL_uf_to_radar allocated additional space for sweeps, when the
+ * initial allocation is not enough.
+ * 16. Added a programmers guide. See programmers_guide.html.
+ * 17. Get_closest routines removed.
+ * 18. Added RSL_kwaj_to_radar. -- Mike Kolander.
+ * 19. Added docs for RSL_kwaj_to_radar.
+ *
+ * Note: Since v0.37 we've been using h.f and h.invf for the storage
+ * functions and, thus, the library is not compatable with earlier
+ * versions. All subsequent version are, however, compatable.
+ * This means, code that used v0.36 and earlier will break (not
+ * even link) with v0.37 or later.
+ *
+ * You must now use:
+ * ray->h.f(ray->range[i]) instead of F(ray->range[i])
+ * and
+ * ray->h.invf(x) instead of INVF(x).
+ *
+ *----------------------------------------------------------------------
+ * v0.37 Began 5/24/95. Froze 5/29/95.
+ *
+ * 1. Removed RSL_float_to_char; too specific.
+ * 2. Implemented seperate conversion functions for each field type.
+ * This added h.f and h.invf to Volume, Sweep and Ray headers.
+ * The ingest routines optionally define there own conversion function.
+ * Most of the time, though, I use the default: wsr88d conversions.
+ * Tested: wsr88d, lassen, mcgill, UF, rsl.
+ * Coded but not tested: toga, nsig.
+ * 3. Added ETH routines:
+ * Sweep *RSL_get_eth_sweep(Volume *v,float et_point);
+ * float RSL_get_echo_top_height(Volume *v,float azim,float grange, float et_point);
+ * 4. If using #define USE_TWO_BYTE_PRECISION, uses 100 as a storage
+ * factor. Now, there is no loss of precision when converting between
+ * internal and float. Before there was just a minor round off when
+ * using any data that used anything other than 1/2 dbz precision.
+ * Using 100 is more than enough.
+ *----------------------------------------------------------------------
+ * v0.36 Began 5/19/95. Froze 5/19/95.
+ *
+ * 1. Magic in anyformat_to_radar was slightly different than expected
+ * for lassen data. Tested on lassen data.
+ * 2. DEFAULT is to use 2 byte storage precision. See rsl.h.
+ * 3. Several changes to get_closest routines -- Flanigan.
+ *
+ *----------------------------------------------------------------------
+ * v0.35 Began 5/18/95. Froze 5/18/95.
+ *
+ * 1. Checks iazim validity in ray_indexes.c. Bad angles use to cause
+ * core dumps.
+ * 2. wsr88d_to_radar can handle bogus filenames and callid's.
+ *
+ *----------------------------------------------------------------------
+ * v0.34 Began 5/17/95. Froze 5/18/95.
+ *
+ * 1. Modified the bscan interface.
+ *
+ * 2. Fixed a minor nrays bookkeeping bug in radar_to_uf.
+ *
+ * 3. Updated Sweep searching routines.
+ *
+ * 4. Added get_closest and get_next_closest ray searching routines.
+ * Updated RSL_get_ray_from_sweep so that it uses the
+ * new_get_closest function.
+ *
+ *----------------------------------------------------------------------
+ * v0.33 Began 5/12/95. Froze 5/16/95.
+ *
+ * 1. Configure for building using 2 byte precision instead of 1 byte.
+ * This should quell any accuracy problems associated with the
+ * functions F and INVF.
+ *
+ * 2. Added 'RSL_mcgill_to_radar'. Link with -lmcgill.
+ *
+ * 3. Bug fix in cube.c, cappi.c, and carpi.c.
+ *----------------------------------------------------------------------
+ *
+ * v0.32 Began 5/5/95. Froze 5/12/95.
+ *
+ * 1. Compiles with -Wall -ansi -pedantic.
+ * 2. Minor bug fixes in get_win.c
+ * 3. Compiles on SGI, 486, SUN, HP using gcc or stock cc.
+ *----------------------------------------------------------------------
+ * v0.31 Began 4/28/95. Froze 5/5/95.
+ *
+ * 1. Added ray_high and ray_low Azimuth_hash pointers
+ * to Azimuth_hash data structure and code in the
+ * the routine RSL_sweep_ray_indexes to set these
+ * pointers. ray_low points to the Azimuth_hash
+ * with the next lowest ray_angle, with ray_high
+ * points to the next highest.
+ *
+ * 2. Created internal routine dir_angle_diff. Returns
+ * negitive difference if the second angle in
+ * the parameter list is counter-clockwise to the
+ * first angle. Returns positive is second
+ * angle is clockwise tk first angle.
+ *
+ * 3. Added internal routine the_closest_hash. This
+ * routine returns the an Azimuth_hash
+ * data structure that contains the closest
+ * ray to the requested angle.
+ *
+ * 4. Added two routines: RSL_get_closest_ray_from_sweep and
+ * RSL_get_next_closest_ray_from_sweep.
+ *
+ * 5. Added routines: RSL_get_window_from_radar,
+ * RSL_get_window_from_volume, RSL_get_window_from_sweep, and
+ * RSL_get_window_from_ray.
+ *
+ * 6. Modified farea.c.
+ * 7. Isolated contruction of azimuth table linked list.
+ * 8. Fixed get_sweep NULL sweep reference (See patch v0_29_3 also).
+ * 9. Compiles on HP CC, SGI CC, GNU CC. I had to #ifdef the
+ * varargs declaration in anyformat_to_radar.c. Why?
+ * 10. Added examples/killer_sweep.c. This randomizes the azimuth
+ * values of each ray. The output checks the sortedness of the
+ * hi and low links in the hash table.
+ * 11. Added doc/...closest... doc/...next_closest...
+ *
+ *-------------------------------------------------------------------------
+ * v0.30 Began 4/20/95. Froze 4/27/95
+ *
+ * 0. IMPORTANT: Renamed libradar.a to librsl.a. Also, radar.h to rsl.h.
+ * 1. Removed NOTFOUND_H reference in the get_ray function.
+ * 2. Simplified get_sweep.
+ * 3. Uses within 1/2 beam_width test in get_ray_from_sweep.
+ * 4. Checks -1 and +1 bin in azimuth hash table to really find the
+ * closest ray that is within 1/2 beam_width of the target azim.
+ * Surprisingly, it shortened the get_value_from_sweep routine.
+ *
+ * 5. Added anyformat_to_radar.c. Uses magic information to determine
+ * the file format. Handles: UF, RSL, WSR88D, LASSEN. Toga may
+ * be difficult. Unknown, yet, for NSIG. Alan will get me that
+ * information.
+ * 6. Added beam_width to the ray structure.
+ *-------------------------------------------------------------------------
+ * v0.29.1 Began 4/18/95. Froze 4/18/95.
+ *
+ * 1. Bug fix in endian.c. Needed to initialize the word.val to 0.
+ * 2. Bug fix in radar_to_uf.c. little_endian() call.
+ * 3. Added Azumuth_hash to structure list in doc/.
+ * 4. Other minor changes.
+ *-------------------------------------------------------------------------
+ * v0.29 Began 3/1/94. Froze ??/??/??
+ *
+ * 0. Thanks to Dennis Flanigan for helping with this release.
+ *
+ * 1. Modified sort_rays.c. By Dennis Flanigan, Jr.
+ * a. Added h.sorted_flag to Volume and Sweep header structures.
+ *
+ * b. Added routines:
+ * int ray_sort_compare_by_time(Ray **r1,Ray **r2);
+ * int sweep_sort_compare(Sweep **s1, Sweep **s2)
+ * Sweep *RSL_sort_rays_by_time(Sweep *s);
+ * Volume *RSL_sort_sweeps_in_volume(Volume *v)
+ * Volume *RSL_sort_volume(Volume *v)
+ * Radar *RSL_sort_radar(Radar *r)
+ *
+ * c. Routines that sort data structures now set the
+ * number of structures in the parent data structure.
+ *
+ * d. Fixed: nsweeps was not being set correctly by
+ * RSL_sort_sweeps_in_volume.
+ *
+ * 2. Removed sort calls in the ingest routines: (whatever)_to_radar.
+ *
+ * 3. Removed the auxillary trig tables in image_gen.c. It's just a
+ * memory hog.
+ *
+ * 4. Changed the extension of the tar archives to .tgz. This
+ * allows netscape to ftp the file rather than displaying it :-)
+ *
+ * 5. Added variables in the sweep data structures to represent
+ * the half of the beam width angles. These variables are
+ * vert_half_bw and horz_half_bw. Also added code to all
+ * RSL ingest routines (something_to_radar) to set these values.
+ * The half angle values are used in the volume.c searching routines.
+ *
+ * 6. Added h.indexes to Sweep structure. This is a simple hash
+ * table for making azimuth lookup cake. So far, I've only
+ * got the malloc part placed in the routines that create the
+ * radar structure. Added the file 'ray_indexes.c'. This changes
+ * RSL_get_value_from_ray.
+ *
+ * Code affected:
+ * Modify code:
+ * RSL_copy...
+ * RSL_free...
+ * RSL_clear...
+ * RSL_sort..??? really???
+ * RSL_get...
+ * RSL_{write,read}_radar
+ * RSL_get_ray???
+ *
+ * Modify doc
+ * RSL_sweep_struct.html
+ *
+ * 7. Updated doc/.
+ *
+ * 8. Added CHECK_LIST.
+ *
+ * 9. Changed the name from radar-v0.?? to rsl-v0.??.
+ *
+ *
+ *-------------------------------------------------------------------------
+ * v0.28 Began 7/23/94. Froze 2/16/95
+ * Changes:
+ *
+ * 1. Support for little endian machines (*86 PC's using Linux).
+ * Includes 'endian.c' in 'uf_to_radar.c' and 'radar_to_uf'. It is not
+ * needed in 'lassen.c' because that program uses xdr to transfer the
+ * data. Nor is it required in 'wsr88d_to_radar.c', 'nsig_to_radar.c'
+ * nor 'toga_to_radar.c' because the support for little endian is in
+ * the respective libraries: libwsr88d.a, libnsig.a, libtg.a.
+ *
+ * Requires:
+ * wsr88d_v1.12.taz
+ * lassen_v1.0.taz
+ * libnsig_v1.3.taz
+ * libtg_v1.1.taz
+ *
+ * In order to make this library compatable with versions on either
+ * big endian or little endian machines, it will be adopted that all
+ * output will be in big endian format. Little endian machines will
+ * have to do the extra work of swapping bytes upon input as well as
+ * swapping bytes on output. I could adopt to use the xdr library,
+ * however, it seems too complicated for the simple task of always
+ * guarenteeing that the output is in big endian format. After all,
+ * we only support one output format: UF. (Well, we will make our own
+ * radar format output in big endian format too, but we keep that
+ * knowledge hush hush).
+ *
+ * 2. Documentation in the seperate directory complete for all routines
+ * in the RSL. Documentation froze at v0.27 and is in HTML format.
+ * The documentation version number will be updated to match the version
+ * number of the most current release of RSL. Note: The live link is
+ * in /PUBLIC/httpd/htdocs/trmm_office/software/radar/quick_reference.
+ * It is a symbolic link to ~/proj/trmm/radar/doc/v0.xx.
+ *
+ * 3. Added RSL_ prefix to all documentation. This renamed the HTML files
+ * to begin with RSL_, also.
+ *
+ * 4. Prefixed all routines with RSL_. Status is that it builds.
+ * 5. Combined radar.h, cube.h and volume.h into radar.h.
+ *
+ *-------------------------------------------------------------------------
+ * v0.27 Began 7/23/94. Froze 9/13/94.
+ * Changes:
+ *
+ * 1. Beam width calculation in get_value_from_sweep is not 1/2 on either
+ * side. No provision for best fit. See WTD #2.
+ * 2. Added sort_rays.c. Sort rays in a sweeps and volumes.
+ * 3. Added Vset_earth_radius. Set global variable 'Re' (Default: 4/3R).
+ * 4. Added trig modification of get_slantr_and_h.
+ * 5. Added sort rays call to: toga_to_radar, wsr88d_to_radar,
+ * uf_to_radar, lassen_to_radar.
+ * 6. Added cube.c. By Mike Kolander.
+ * 7. Added carpi.c
+ * 8. Added toga_to_radar.c. By Mike Kolander.
+ * 9. Signed all source files.
+ * 10. Quieted some image print statements. See image_gen.c.
+ * 11. Changed wsr88d_to_radar so it takes 'first_file' or the 4 character
+ * call sign (eg. KMLB).
+ * 12. Fixed makefile so it removes libradar.a before building. This prevents
+ * duplicate object files, only the long filenamed ones, from
+ * appearing in the archive file.
+ * 13. Added gts.c. By Dave Wolff.
+ * 14. Fixed minor round off error in 'uf_to_radar' which caused a 0 dBZ spike.
+ * 15. Added histogram.c. By Dave Wolff.
+ * 16. Added nsig_to_radar.c. By Alan McConnell.
+ *
+ * WTD:
+ *
+ *
+ * 2. Vget_value_from_sweep. When the beam width is increased we
+ * want to return the value that is the best fit for a ray and not
+ * just the first fit. Currently when the beam width is really
+ * large then we will pick the wrong beam for the desired point.
+ *
+ * 3. Add the following to the ray header:
+ * - u,v for ray.
+ * - offset for azim, range, elev (for moving radar)
+ * - lat/lon (for moving radar)
+ *
+ * 4. Bilinear interpolation.
+ * 6. Modify get_ray_above to return a good ray so that QC doesn't zap points
+ * near the radar.
+ * 7. Optimize/Improve the get_value routine.
+ * 8. Remove V prefix to routine names?
+ * 10. Fix why there are bands of missing data when making images.
+ * 11. Specify resolution when making images.
+ * 14. Update: doc's (in HTML), README, etc.
+ * 16. NEED *TESTING* suite of programs.
+ *
+ * Proposed changes for v0.28
+ * 1. Add support for little endian machines (386, 486, etc.)
+ * 2. F(x, DZ) or ray->f.dz(x). I.e., object function conversion functions.
+ *
+ *
+ *-------------------------------------------------------------------------
+ * v0.26 Began 7/23/94.
+ * Changes:
+ * 1. Adding cappi_to_carpi.
+ * 2. Enhanced the Cappi structure; not the same as a sweep anymore.
+ *
+ *-------------------------------------------------------------------------
+ * v0.26 Began 7/13/94. Froze 7/20/93.
+ * Changes:
+ * 1. Units for wavelength, in radar_to_uf, changed from meters to cm;
+ * as they should be.
+ * 2. Library runs quietly. No noisy print statements. Call
+ * radar_verbose_on() and radar_verbose_off() to control printing.
+ *-------------------------------------------------------------------------
+ * v0.25 Began 7/1/94. Froze 7/1/94
+ * Changes:
+ * 1. Modifications to makefile to add portibility to building on
+ * other systems w/o gcc. Change to CFLAGS.
+ * 2. Passes lint.
+ * 3. Moved documents radar.ez and volume.ez to ../doc (../doc_RCS).
+ * This means that the version of the documentation will not be kept
+ * up to the version of the RSL library. Only changes to the doc. will
+ * force a new version of the documentation. I'll want to see if this
+ * is a good idea.
+ *-------------------------------------------------------------------------
+ * v0.24 Began 6/29/94. Froze 6/29/94
+ * Changes:
+ * 1. radar_to_uf, uf_to_radar. Fixed inconsistant use of BADVAL vs.
+ * UF_NO_DATA. The latter is check and used.
+ * 2. Added function:
+ * float get_nyquist_from_radar(Radar *radar);
+ * Useful, for loading non-velocity fields with PRF, PRT and NYQUIST.
+ * 3. Made the makefile more general and added comments.
+ *
+ * WTD:
+ * 1. Modify wsr88d_to_radar to fill PRF, PRT and NYQUIST values in
+ * non-velocity rays.
+ *-------------------------------------------------------------------------
+ * v0.23 Began 6/27/94. Froze 6/27/94
+ * Changes:
+ * 1. First distribution release.
+ * 2. Added README w/ installation instructions.
+ * 3. Made example_main and colors directories.
+ * 4. Shortened lassen.h to be close to minimial.
+ * 5. Modified makefile to only make libradar.a. Example_main/ has it's
+ * own makefile.
+ *-------------------------------------------------------------------------
+ * v0.22 Began 6/24/94. Froze 6/24/94
+ * Changes:
+ * 1. radar_to_uf/uf_to_radar PRF/PRT calculation corrected.
+ *
+ *-------------------------------------------------------------------------
+ * v0.21 Began 6/24/94. Froze 6/24/94
+ * Changes:
+ * 1. radar_to_uf: prf now in microseconds.
+ * 2. uf_to_radar: prf now converted from microseconds to seconds.
+ *
+ *-------------------------------------------------------------------------
+ * v0.20
+ * Changes:
+ * Need to determine the changes.
+ *-------------------------------------------------------------------------
+ * v0.19 Began 6/17/94. Froze: 6/17/94.
+ * Changes:
+ * 1. Fixed NULL access in write_radar subroutine.
+ *
+ *-------------------------------------------------------------------------
+ * v0.19 Began 6/15/94. Froze: 6/15/94.
+ * Changes:
+ * 1. Check for NULL in Vget_ray_from_sweep fixes a segmentation fault on
+ * Sun.
+ *-------------------------------------------------------------------------
+ * v0.18 Began 6/11/94. Froze: 6/12/94 2pm.
+ * Changes:
+ * 1. Minor changes in volume.c. Vget_value_from_sweep now uses the
+ * beam_width for matching rays. See Vget_sweep too.
+ * 2. cappi.c sets the beam_width.
+ * 3. Added radar types. There is no sure fire way to set
+ * radar->h.radar_type to one of these values automatically, ie. from
+ * information in the input file. It may have to be done by the
+ * application; a runtime parameter, option.
+ * Types are:
+ * TOGACOARE_TOGA_SIGMET
+ * TOGACOARE_MIT_SIGMET
+ * TRMM_DARWIN_LASSEN
+ * DARWIN_TOGA_SIGMET
+ * TRMM_MELBOURNE_WSR88D
+ * TRMM_KWAJALEIN_SIGMET
+ * TRMM_HOUSTON_WSR88D
+ * 4. Added function:
+ * Sweep *Vget_first_sweep_of_volume(Volume *v);
+ * 5. Placed the wsr88d code in wsr88d_to_radar.c (removed from radar.c).
+ *
+ * WORK TO DO:
+ * 1. Rework Vget_value_from_sweep to do a better search for the value.
+ *
+ *-------------------------------------------------------------------------
+ * v0.17 Began 6/10/94. Froze 6/10/94 3:30pm.
+ * Changes:
+ * 1. Corrected the pulse width calculation in uf_to_radar and in
+ * radar_to_uf.
+ *-------------------------------------------------------------------------
+ * v0.16 Began 6/10/94. Froze 6/10/94 12:30pm.
+ * Changes:
+ * 1. Minor changes to radar.c because v1.3 of the wsr88d library is
+ * now using WSR88D_DZ, WSR88D_VR, WSR88D_SW as the field type mask.
+ * REFLECTIVITY, VELOCITY and SPECTRUM_WIDTH are not used.
+ *
+ *-------------------------------------------------------------------------
+ * v0.15 Began 6/7/94. Froze 6/7/94 1pm.
+ * Changes:
+ * 1. Discovered that the range to bin1 calculation in radar_to_uf.c and
+ * uf_to_radar.c was incorrect. See fh[2] and fh[3].
+ *
+ *-------------------------------------------------------------------------
+ * v0.14 Began 6/2/94. Froze 6/2/94 1pm.
+ * Changes:
+ * 1. Modified the date for the Radar structure for UF reading to reflect
+ * the time of the first ray. It was the generation time of the radar
+ * structure, however, Dave Wolff insists that it reflect the time of
+ * the first ray. Modification to 'uf_to_radar.c'
+ *
+ *-------------------------------------------------------------------------
+ * v0.13 Began 6/2/94. Froze 6/2/94 11am.
+ * Changes:
+ * 1. Modified radar_to_uf.c to undo the faking of the headers. This is
+ * the correct way.
+ *
+ *-------------------------------------------------------------------------
+ * v0.12 Began 5/31/94. Froze 5/31/94 7pm.
+ * Changes:
+ * 1. Check for malloc errors in Vnew* routines.
+ * 2. Fixed a nasty bug in radar_to_uf. I was letting 'j' get to high
+ * for a particular ray in a sweep. 'j' is looping on the maximum
+ * rays possible. I noticed this bug only after Vcopy_volume to
+ * replace a radar->v[i].
+ *-------------------------------------------------------------------------
+ * v0.11 Began 5/27/94. Froze 5/27/94 12:50pm.
+ * Changes:
+ * 1. Modified radar_to_uf.c to fake header information when fields do
+ * exist, eventually, but not in the current sweep. This is to allow
+ * brain dead UF ingestors (Zeb, RDSS, etc.) to read the UF file; they
+ * assume that whatever fields exist in the first UF sweep is constant
+ * throughout the file.
+ *
+ * 2. Added functions to volume.c
+ * Ray *Vget_first_ray_of_sweep(Sweep *s);
+ * Ray *Vget_first_ray_of_volume(Volume *v);
+ *
+ *-------------------------------------------------------------------------
+ * v0.10 Began 5/26/94. Froze 5/27/94 9am.
+ * Changes:
+ * 1. Modified the names of the INDEX and MASK variables.
+ *
+ * ZT Total Reflectivity (dBZ) ZT_INDEX
+ * May be uncommon, but important
+ *
+ * DZ Reflectivity (dBZ), may contain some DZ_INDEX
+ * signal-processor level QC and/or
+ * filters. This field would contain
+ * Darwin's CZ, or WSR88D's standard
+ * reflectivity. In other words, unless
+ * the field is described otherwise, it
+ * should always go here. In essence, this
+ * is the "cleanest" reflectivity field
+ * for a radar.
+ *
+ * DR Differential reflectivity DR_INDEX
+ * DR and LR are for dual-polarization
+ * radars only. Unitless or in dB.
+ *
+ * LR Another form of differential ref LR_INDEX
+ * called LDR, not sure of units
+ *
+ * CZ QC Reflectivity (dBZ), contains
+ * post-processed QC'd data CZ_INDEX
+ *
+ * VR Radial Velocity (m/s) VR_INDEX
+ *
+ * SW Spectral Width (m2/s2) SW_INDEX
+ *
+ * 2. Fixed some MAX_RADAR_VOLUMES references in the wsr88d_to_radar code.
+ *
+ *-------------------------------------------------------------------------
+ * v0.9 Began 5/25/94. Froze: 5/26/94, 10am.
+ * Changes:
+ * 1. Added lassen_to_radar.c
+ * 2. Added lassen.h
+ *
+ *-------------------------------------------------------------------------
+ * v0.8 Began 5/23/94. Froze: 5/24/94, 10am.
+ * Changes:
+ * 1. F and INVF handle APFLAG.
+ * 2. Image generation creates unsigned char images.
+ * 3. 255-val for negative dBz (val < 0).
+ *
+ *-------------------------------------------------------------------------
+ * v0.7 Began 4/30/94. Froze: 5/20/94.
+ *
+ * Changes:
+ *
+ * 1. Uses char storage for data values, to reduce RAM allocation.
+ *
+ * 2. F(x) ((x-2)/2. - 64.)
+ * 0 is for BADVAL. Bad value.
+ * 1 is for RFVAL. Range folded.
+ *
+ * 3. Added functions:
+ * Vfloat_to_char(float *x, unsigned char *c, int n);
+ * float F(unsigned char c);
+ * unsigned char INVF(float x); -- Inverse of F.
+ * Radar *uf_to_radar(char *infile);
+ * void radar_to_uf(Radar *radar, char *outfile);
+ *
+ * 4. Minor bug fix in wsr88d_to_radar routine. It was setting the
+ * number of volumes to six even though we were only asking for 3.
+ *
+ * 5. Changed the value of BADVAL to 0500 (Octal 500). This is
+ * a value higher than 255 (the maximum byte value) but small enough
+ * to that when a scale factor (typically 100) is applied, the result
+ * does not exceed the I*2 (short) magnitude. I needed this for the
+ * UF programs. I could have tested for BADVAL, RFVAL, etc., and not
+ * applied a scale factor when loading the UF buffer, however, changing
+ * BADVAL and scaling everything was more general.
+ *
+ * 6. Made some slight modifications to the Radar header and Volume header.
+ *
+ *-------------------------------------------------------------------------
+ * v0.6 Began 4/16/94. Froze: 4/30/94.
+ *
+ * Changes:
+ *
+ * 1. Azimuth angles range from -180,180 to 0,360.
+ * 2. New color index binning function for velocity. -nyquist,nyquist
+ * using 15 bin values. See Vrebin_velocity_sweep.
+ * 3. Added the following routines:
+ *
+ * Memory management.
+ * Ray *Vcopy_ray(Ray *r);
+ * Sweep *Vcopy_sweep(Sweep *s);
+ * Volume *Vcopy_volume(Volume *v);
+ * Radar *clear_radar(Radar *r);
+ * void Vget_groundr_and_h(float slant_r, float elev, float *gr, float *h);
+ * void Vget_slantr_and_elev(float gr, float h, float *slant_r, float *elev);
+ * void Vget_slantr_and_h(float gr, float elev, float *slant_r, float *h);
+ *
+ * Image generation preparation.
+ * void Vrebin_velocity_ray (Ray *r); /* Modifies r */
+ * void Vrebin_velocity_sweep (Sweep *s); /* Modifies s */
+ * void Vrebin_velocity_volume(Volume *v); /* Modifies v */
+ *
+ * Color table functions.
+ * void load_red_table(char *infile);
+ * void load_green_table(char *infile);
+ * void load_blue_table(char *infile);
+ *
+ * 4. Added 4/3Re calculation to Vget_slantr_and_elev and Vget_groundr...
+ * 5. Checked for null in the Vclear routines.
+ *
+ *-------------------------------------------------------------------------
+ * v0.5 Began 4/7/94
+ *
+ * Changes:
+ *
+ * 1. Color table functions taken out of the image routines.
+ * You must call load_refl_table(), load_vel_table(), load_sw_table()
+ * to load the appropriate color table before making color images.
+ * There are seperate color tables for R, V, S. See volume.h.
+ *
+ * 2. Range is now used in Vsweep_to_cart.
+ * 3. Gate size (pixel resolution in km) is now used.
+ * 4. Added range to cappi_at_h function. It is the effective range.
+ * 5. Added the following routines:
+ *
+ * Read radar from disk.
+ * Ray *read_ray (FILE *fp);
+ * Sweep *read_sweep (FILE *fp);
+ * Volume *read_volume(FILE *fp);
+ * Radar *read_radar (char *infile);
+ *
+ * Write radar to disk
+ * int write_ray (Ray *r, FILE *fp);
+ * int write_sweep (Sweep *s, FILE *fp);
+ * int write_volume(Volume *v, FILE *fp);
+ * int write_radar (Radar *r, char *outfile);
+ *
+ * Area calculations
+ * float Varea_of_ray(Ray *r, float lo, float hi, float range);
+ * float Vfractional_area_of_sweep(Sweep *s, float lo, float hi, float range);
+ *
+ * Pixel fractions
+ * Vfraction_of_ray(Ray *r, float lo, float hi, float range);
+ * Vfraction_of_sweep(Sweep *s, float lo, float hi, float range);
+ * Vfraction_of_volume(Volume *v, float lo, float hi, float range);
+ *
+ *
+ * 6. radar.c calls wsr88d_get_site to get additional wsr88d information
+ * not included in the file. Routines compliments of Dan Austin.
+ * 7. Added RFVAL. Range Folded value. Any base data value of 0 is
+ * data below SNR thresholds set for that specific base data. Any
+ * data value of 1 is data considered range ambiguous (folded).
+ * A color table entry needs to be picked to represent this value.
+ *
+ * To do:
+ * o I have to do something about MAX_RADAR_VOLUMES. We really should
+ * rely on radar->h.nvolumes;
+ *
+ * o Add 4/3Rearth calculation to get value routines.
+ * o Incorporate nsig_to_radar. Dennis Flanigan is writing that interface.
+ * o Add fraction of area function.
+ * o Add the following functions: ??? really ???
+ * Sweep *Vget_closest_sweep(Volume *v, float elev);
+ * Ray *Vget_closest_ray(Sweep *s, float azim);
+ * float Vget_closest_value_in_beam(Ray *ray, float range);
+ * float Vget_closest_value(Ray *ray, float range);
+ * (I'm not sure how this will be different than Vget_value)
+ *
+ * o Sort the rays so locating azimuth is trivial; instead of a search
+ * algorithm as it is now. Hey, would a binary search be good enough or
+ * do we need some hashing function? Is the lookup fast enough already?
+ * o Add CAPPI at h. (Option for bilinear interpolation about h).
+ *-------------------------------------------------------------------------
+ * v0.4 Began 3/23/94 Froze: 4/7/94
+ *
+ * Changes:
+ *
+ * 1. Made Sweep (sweep) and Ray (ray) members an array of pointers.
+ * This changes the syntax of the access to be
+ * v->sweep[is]->ray[ir]->range[ibin] instead of
+ * v.sweep[is].ray[ir].range[ibin]. The benifit of this is to
+ * be able to dynamically specify the number of sweeps or rays,
+ * even volumes for the Radar structure, and not allocate a maximum.
+ * This makes Vnew_sweep and Vnew_ray useful.
+ *
+ * 2. Added the following functions:
+ * Volume *Vget_volume(Radar *r, int itype);
+ * itype = REFLECTIVITY, VELOCITY, or SPECTRUM_WIDTH, etc.
+ *
+ * Sweep *Vget_sweep(Volume *v, float theta);
+ * Ray *Vget_ray (Volume *v, float theta, float azimuth);
+ * float Vget_value(Volume *v, float theta, float azimuth, float range);
+ * Ray *Vget_ray_from_sweep(Sweep *s, float azimuth, float range);
+ * float Vget_value_from_sweep(Sweep *s, float azimuth, float range);
+ * float Vget_value_from_ray(Ray *r, float range);
+ * float Vget_value_at_h(Volume *v, float azim, float grnd_r, float h);
+ *
+ * Ray *QC_ray (Ray *ray, int radar_type);
+ * Sweep *QC_sweep (Sweep *sweep, int radar_type);
+ * Volume *QC_volume(Volume *volume, int radar_type);
+ *
+ * Radar *QC_radar (Radar *radar);
+ *
+ * void write_gif(char *outfile, char *image, int xdim, int ydim, char c_table[256][3]);
+ * void write_pict(char *outfile, char *image, int xdim, int ydim, char c_table[256][3]);
+ * char *Vsweep_to_cart(Sweep *s, int xdim, int ydim, float range);
+ * void Vsweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range);
+ * void Vsweep_to_pict(Sweep *s, char *outfile, int xdim, int ydim, float range);
+ * void Vvolume_to_gif(Volume *v, char *basename, int xdim, int ydim, float range);
+ * char *Vsweep_to_cart(
+ * 3. When a sweep does not have any rays with any bins, then NULL is
+ * assigned to that Sweep pointer. This occurs for reflectivity for
+ * the 2-nd sweep index (as defined by the data) where the is no
+ * reflectivity data, only doppler and spectrum width. Velocity and
+ * spectrum width data do not exist for sweep number 1 (index 0).
+ *
+ * 4. Speed ups in Vto_cart_sweep. Math is precomputed and saved in
+ * arrays for faster lookup. Still the ppmtogif is a snail and it
+ * overwhelms the runtime. I only saw a 35 second improvment with
+ * these new arrays when outputting 20 gif images. I think the -O
+ * compile flag is doing a good job.
+ *
+ * 5. Added CAPPI at h. Routine in cappi.c. Cappi type is syntatically
+ * identical to the Sweep type.
+ *
+ * Cappi *cappi_at_h(Volume *v, float h);
+ *
+ * 6. Make builds libradar.a which contains radar.c, volume.c, cappi.c and
+ * image_gen.c. Builds on SGI, SUN and HP.
+ *
+ * 7. Add QC routines. See 2. above for the list. Currently they are
+ * place holding functions with only QC_ray needing to be coded.
+ * Paul Kucera will take care of that.
+ *
+ * 8. Improvments to radar.ez and volume.ez.
+ *
+ * To do:
+ * o Add the following functions:
+ * Sweep *Vget_closest_sweep(Volume *v, float elev);
+ * Ray *Vget_closest_ray(Sweep *s, float azim);
+ * float Vget_closest_value_in_beam(Ray *ray, float range);
+ * float Vget_closest_value(Ray *ray, float range);
+ * (I'm not sure how this will be different than Vget_value)
+ *
+ * o Add range resolution to the image generation subroutines.
+ * o Add range resolution to all the 'get_value' routines.
+ * o Sort the rays so locating azimuth is trivial; instead of a search
+ * algorithm as it is now. Hey, would a binary search be good enough or
+ * do we need some hashing function? It the lookup fast enough already?
+ * o Add CAPPI at h. (Option for bilinear interpolation about h).
+ *
+ *-------------------------------------------------------------------------
+ * v0.3 Began 3/22/94 Froze 3/23/94.
+ *
+ * Changes:
+ * 1. Implimented the Radar structure. The heart of it is an array of
+ * Volume pointers.
+ * 2. Using 'data_mask' which is a bitwise ( | operator in C ) of
+ * REFL_MASK, VEL_MASK, or SW_MASK, you can get any field type volume:
+ * reflectivity, doppler velocity, or spectrum width respectively.
+ * 3. Load volume, sweep and ray header information.
+ * 4. Added Radar header information; need a good definition of say date and
+ * time.
+ *
+ * Work to do:
+ * - Improve carteasean image generation.
+ * Input: radar range, pix_width, pix_height. No distortion.
+ * - Need to specify the output GIF filename as options.
+ * - Incorporate Vto_fraction (?? name ??) Dave's new function.
+ *-------------------------------------------------------------------------
+ * v0.2 Began 3/21/94 Froze 3/22/94.
+ *
+ * I am freezing this here because both BSCAN and CARTESEAN image generation
+ * works. You have to hand edit the source to restrict the number of
+ * Sweeps that are converted to images, currently only sweep 0. The inclusion
+ * of sweep/ray header information and the collection of doppler and spectrum
+ * width data requires substantial effort and will be in the next version.
+ * This version freeze is a check point.
+ *
+ * Changes:
+ * 1. Name rsphere change to volume.
+ * 2. File rsphere.c changed to volume.c. (Moved the RCS file rsphere.c,v
+ * to the graveyard directory in RCS/
+ * 3. Added color gif support. Reads red.clr, green.clr, blue.clr files.
+ * This renamed the Vto_cart_pgm function to Vto_cart_gif. It is likely
+ * that ppm support is not needed. We'll see.
+ * 4. Fixes minor glitches in output images where the tan is undefined.
+ * 5. Added BSCAN production as GIF files.
+ * 6. Output sweep.xx file names; sweep.00.gif, etc. and bscan.00.gif too.
+ *
+ * Work to do:
+ * - Add routines to get volumes for doppler and spectrum width. (Radar lib?)
+ * - Improve carteasean image generation.
+ * Input: radar range, pix_width, pix_height. No distortion.
+ * - Add sweep header information.
+ * - Need to specify the output GIF filename as options.
+ * - Incorporate Vto_fraction (?? name ??) Dave's new function.
+ *
+ *-------------------------------------------------------------------------
+ *v0.1 3/21/94 by John Merritt.
+ * 1. First development version of the radar and rsphere library.
+ * Includes test driver. radar.ez and rsphere.ez document the
+ * functionality of the programs. This version exists to check point
+ * the development.
+ *-------------------------------------------------------------------------
+ */
diff --git a/CHECK_LIST b/CHECK_LIST
new file mode 100644
index 0000000..1527b79
--- /dev/null
+++ b/CHECK_LIST
@@ -0,0 +1,84 @@
+Checklist for Making New Software Release
+-----------------------------------------
+
+Check each item, when completed, when updating the version of RSL.
+
+1. Change version number reference in index.html, in the directory doc/.
+
+2. Change README to indicate the new version number and freeze date.
+
+3. Change CHANGES, change FREEZE date.
+
+4. In doc/, change version number reference in RSL_radar_intro.html.
+
+5. In doc/, run 'netscape index.html'.
+
+6. Check that the structures in RSL_structures.html, RSL_ray_struct.html,
+ etc., match those in rsl.h.
+
+7. Change the version number in Makefile.am
+
+8. Change the version number in configure.in
+
+============================================================================
+The following are the steps for freezing a new version.
+
+1. Before freezing:
+
+ a. cd rsl
+ b. autoreconf
+ c. configure
+ d. setenv LD_LIBRARY_PATH `pwd`:$LD_LIBRARY_PATH
+ e. make
+ f. cd examples
+ g. make
+ h. run_tests
+
+2. cd rsl
+ make install
+ cvs commit (Tagging is done in step 4.)
+
+3. make dist
+ Unpack it and try to build it -- 'make distcheck' will not work.
+
+*************************************************************
+*** run_tests contains, at least, the following commands. ***
+*************************************************************
+ any_to_gif /DATA2/merritt/nex.file.{2,1}
+ xv dz_sweep.gif -- Look familiar?
+ killer_sweep /DATA2/merritt/nex.file.{2,1} | less -- Check 'OUT OF ORDER'.
+ wsr88d_to_gif /DATA2/merritt/nex.file.{2,1}
+ xv dz_sweep.gif -- Look familiar?
+ wsr_hist_uf_test /DATA2/merritt/nex.file.2
+ diff *.dat (There should be no differences.)
+ bscan /DATA2/merritt/pafb_swap
+ bscan /DATA2/merritt/pafb_unswap
+
+4. make install
+ cvs rtag v1_? rsl (Tag only when step 3 works.)
+
+5. scp rsl-v1.?.tgz trmm:/public/ftp/pub/software
+ (Reset rsl-LATEST to point to this new version).
+
+6. mv rsl-v1.?.tgz distributions/
+
+7. Copy the doc/ directory to the http on trmm:
+
+ scp -r doc/* trmm:/public/httpd/htdocs/trmm_office/software/rsl
+ scp -r README trmm:/public/httpd/htdocs/trmm_office/software/rsl
+ scp -r CHANGES trmm:/public/httpd/htdocs/trmm_office/software/rsl
+
+8. Install on trmm
+ Install on raindrop1
+ Install on nyquist
+ Install on echo
+
+9. Make a patch.
+
+ cvs rdiff -r v1_10 rsl > rsl.v1.10_to_v1.11.patch
+ gzip rsl.v1.10_to_v1.11.patch
+ scp rsl.v1.10_to_v1.11.patch.gz trmm:/public/ftp/pub/software
+
+10. Change the version number in the mainline distribution (rsl/) to
+ the next value. That's in Makefile.am and configure.in.
+
diff --git a/Copyright b/Copyright
new file mode 100644
index 0000000..baa40d6
--- /dev/null
+++ b/Copyright
@@ -0,0 +1,22 @@
+/*
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1996-1999
+ John H. Merritt
+ Space Applications Corporation
+ Vienna, Virginia
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
diff --git a/GPL b/GPL
new file mode 100644
index 0000000..a43ea21
--- /dev/null
+++ b/GPL
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C) 19yy
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/LGPL b/LGPL
new file mode 100644
index 0000000..eb685a5
--- /dev/null
+++ b/LGPL
@@ -0,0 +1,481 @@
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..361f169
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,73 @@
+## Process w/ automake. Or, autoreconf; make ##
+AUTOMAKE_OPTIONS = foreign
+SUBDIRS = . colors doc examples
+INCLUDES = -I. -I$(srcdir) -I$(prefix)/include -I$(prefix)/toolkit/include
+
+includedir = $(prefix)/include
+colordir = $(libdir)/colors
+
+lib_LTLIBRARIES = librsl.la
+
+librsl_la_LDFLAGS = -version-info 1:40
+librsl_la_SOURCES = \
+$(rapic_c) $(radtec_c)\
+dorade.c dorade_print.c dorade_to_radar.c\
+lassen.c lassen_to_radar.c \
+edge_to_radar.c \
+ radar.c volume.c image_gen.c cappi.c fraction.c read_write.c farea.c \
+ range.c radar_to_uf.c uf_to_radar.c wsr88d_to_radar.c \
+ carpi.c cube.c sort_rays.c toga_to_radar.c gts.c histogram.c \
+ ray_indexes.c anyformat_to_radar.c get_win.c endian.c mcgill_to_radar.c \
+ mcgill.c interp.c toga.c wsr88d.c wsr88d_get_site.c wsr88d_m31.c \
+ gzip.c prune.c reverse.c fix_headers.c \
+ nsig_to_radar.c nsig.c nsig2_to_radar.c \
+ africa_to_radar.c africa.c \
+ radar_to_hdf_2.c hdf_to_radar.c toolkit_memory_mgt.c \
+ radar_to_hdf_1.c rainbow.c rainbow_to_radar.c $(headers)
+
+librsl_la_DEPENDENCIES = $(build_headers)
+
+build_headers = rsl.h wsr88d.h toolkit_1BC-51_appl.h
+
+headers = africa.h dorade.h lassen.h \
+ mcgill.h nsig.h radtec.h rainbow.h \
+ rapic_routines.h toga.h \
+ $(build_headers)
+
+rapic_c = rapic_to_radar.c rapic.y rapic-lex.l rapic_routines.c
+radtec_c = radtec_to_radar.c radtec.c
+
+
+rsl.h: Makefile
+ @for h in $(build_headers); do \
+ echo -n "Checking substitutions in header file $$h ... "; \
+ cp $$h $$h.in; \
+ sed -e 's/RSL_VERSION_STR.*/RSL_VERSION_STR \"$(VERSION)\"/' \
+ -e 's|#define COLORDIR.*|#define COLORDIR \"$(colordir)\"|' \
+ -e 's|#define WSR88D_SITE_INFO_FILE.*|#define WSR88D_SITE_INFO_FILE \"$(libdir)/wsr88d_locations.dat\"|' \
+ < $$h.in > $$h.new; \
+ if cmp -s $$h $$h.new; then \
+ rm $$h.new; \
+ echo "$$h remains untouched."; \
+ else \
+ mv $$h.new $$h; \
+ echo "substitutions made in $$h."; \
+ fi; \
+ rm -f $$h.in; \
+ done
+
+PREFIX = rapic
+LFLAGS = -P$(PREFIX)
+YFLAGS = -d -p $(PREFIX)
+LEX_OUTPUT_ROOT = lex.$(PREFIX)
+
+
+install-exec-hook:
+ $(INSTALL) -d $(includedir)
+ $(INSTALL) -m 644 rsl.h $(includedir)
+ $(INSTALL) -m 644 toolkit_1BC-51_appl.h $(includedir)
+ $(INSTALL) -m 644 wsr88d_locations.dat $(libdir)
+
+EXTRA_DIST = CHANGES CHECK_LIST Copyright GPL LGPL wsr88d_locations.dat rapic.h
+
+DISTCLEANFILES = rapic.c rapic-lex.c
diff --git a/README b/README
new file mode 100644
index 0000000..33a8b80
--- /dev/null
+++ b/README
@@ -0,0 +1,237 @@
+v1.40 (Released 10/10/2008)
+
+This is the README file for the Radar Software Library (RSL).
+
+The author of RSL is John H. Merritt.
+
+What is RSL?
+ This software manipulates NexRad, Lassen, UF, sigmet, kwajalein,
+toga, RAPIC, RADTEC, mcgill and EDGE radar formats.
+
+The radar data is used by the NASA TRMM Office to produce rain
+and climatological products. This software
+can ingest an entire input data file, representing it in RAM as it
+is on disk, manipulate the data and produce simple images. The intent
+of this library is to provide you with the tools to manipulate the
+data. With those tools you gain easy access to the different radar
+fields (reflectivity, velocity, spectral width, etc.) and ancilliary
+information (headers: time, beam width, angles, etc). And, with the
+tools you can code a scientific application that are radar format
+independent.
+
+COPYRIGHT NOTICE:
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1996-1999
+ John H. Merritt
+ SM&A Corp.
+ Vienna, Virginia
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+System Requirements:
+ HP (755/hpux), Linux, SUN (SparcII), SGI(4D/IRIX). Should run on any
+other hardware.
+
+Memory Requirements:
+ 16 Mbytes of RAM just to ingest the data. Plus any for your application.
+ If you expect to use the TSDIS toolkit component, which requires the HDF
+ library, then you'll need at least 64 MB RAM!
+
+Software Environment. Additional libraries may be needed for building
+or linking, especially if you plan to use the TSDIS Toolkit and HDF.
+All the source for wsr88d, lassen, tg, nsig, mcgill, kwajalein,
+etc, are included in librsl.a and librsl.so. RSL works on big or
+little endian machines. HP, SUN, SGI are examples of big endian machines.
+Intel 386/486/Pentium is an example of a little endian machine.
+
+Additional software needed for executing RSL code is listed below.
+Note, RSL can be built without TSDIS toolkit and without HDF and
+without PKWARE support.
+
+ pbmplus (Jef Poskanzer) Available via anon ftp to ftp.uu.net. This is
+ used when making GIF, PPM, PBM, PGM, PICT, etc.
+ images. Output via pipes. Required for executing
+ your RSL application, if you plan to output images.
+ This is not required when
+ linking your application with the RSL.
+
+ You only need ppmtogif and ppmtopict.
+
+ gcc (GNU cc compiler) Normal cc or acc (sun) will work. Not required,
+ but, you do need an ansi compilier.
+
+ gzip (GNU compress) Available via anon ftp to ftp.uu.net. Unpacking.
+ Input and output filters for auto un/compressing.
+
+
+ make (GNU make) GNU make version 3.76. Standard make on SGI
+ IRIX 6.2 doesn't work. It's a good idea
+ to have GNU make (GNU tar too).
+
+ PKWARE Data Version 1.11. Needed for the RAPIC ingest.
+ Compression library. Call PKWARE, Inc. at 414-354-8699 or via
+ http://www.pkware.com.
+
+ libetor The EDGE libraray to decode the EDGE format.
+ This is available from Enterprise Electronics
+ Corporation, Enterprise, Alabama, USA 36330
+ 334-347-3478.
+
+Example mainlines are provided in the directory examples.
+
+INSTALLATION INSTRUCTIONS
+--------------------------
+
+1. Unpack the GNU compressed tar archive, example:
+
+ gtar -xzf rsl-v1.29.tgz
+
+ -or-
+
+ gzcat rsl-v1.29.tgz | tar xf -
+
+2. If you DON'T want LASSEN capability or you find that your system
+ can not compile the lassen routines, you must edit acconfig.h and
+ change '#define HAVE_LASSEN 1' to '#undef HAVE_LASSEN'.
+
+3. configure
+ make install -- Installs the RSL library, and then installs
+ any_to_gif and any_to_uf.
+
+NOTE: You can specify the --prefix=/some/other/dir as an option to
+ the configure command. This will install the librsl.so there
+ and will install the examples there. Also, when resolving
+ whether you have hdf, tsdistk, etc. the --prefix instructs
+ configure to look in the prefix/lib directory for those libraries.
+ The examples installed are any_to_gif and any_to_uf.
+
+APPLYING PATCHES
+----------------
+
+Using patch files saves network transmission times when upgrading
+to the next version of RSL. Patch files are context differences
+from one RSL release to the next. The patch files are located
+in the anonymous ftp directory pub/software on trmm.gsfc.nasa.gov,
+and they typically have the name of the form rsl.v1.14_to_v1.15.patch.gz.
+
+You will be applying the patch files from the directory where 'rsl' is
+a subdirectory (from the parent directory of rsl).
+
+Follow these steps to upgrade using patch files. This demonstrates applying
+patches from version 1.11 to 1.15.
+
+1. Make a symbolic link called 'rsl' that points to the current version
+ of RSL you have. For example:
+
+ ln -s rsl-v1.11 rsl
+
+2. Apply patches. Here we'll go from v1.11 to v1.15.
+
+ zcat rsl.v1.11_to_v1.12.patch.gz | patch
+ zcat rsl.v1.12_to_v1.13.patch.gz | patch
+ zcat rsl.v1.13_to_v1.14.patch.gz | patch
+ zcat rsl.v1.14_to_v1.15.patch.gz | patch
+
+3. Rename the rsl-v1.11 directory to be rsl-v1.15. You no longer
+ need the 'rsl' directory.
+
+ mv rsl-v1.11 rsl-v1.15
+ rm rsl
+
+
+BUILDING APPLICATIONS
+---------------------
+Place the following line in your C code:
+
+#include "rsl.h"
+
+And link your application with:
+
+ -lrsl -lm
+
+If you're on a SUN, you might have to specify:
+
+ -lrsl -lnsl -lm
+
+If you want HDF and TSDIS toolkit libraries (the link line looks messy):
+
+ setenv TSDISTK /usr/local/toolkit (or your top-level directory name)
+
+ -lrsl -L/usr/local/hdf/lib -L/usr/local/toolkit/lib \
+ -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm
+
+ Be sure to substitute the appropriate -L specification for the HDF
+ and the TSDISTK library paths on your system.
+
+PROBLEMS
+--------
+
+1. If you don't have ppmtogif nor ppmtopict, you can still make images. The
+ images will be PPM files. Create two commands called 'ppmtogif' and
+ 'ppmtopict' that consists of the following two lines:
+---- cut ----
+#!/bin/csh -f
+cat
+---- cut ----
+ Make these new commands executable and
+ place them in a directory that is in your $PATH. No translation
+ of PPM will happen and you can use 'xv', for instance, to view
+ the files.
+
+2. Linking on SUN running SunOS 5.4, you may need to add '-lnsl' to
+ the link line to link your application. 'libnsl.{a,so}' is where
+ the 'xdr' routines reside.
+
+3. On our HP, gcc cannot build a shared library in one fell swoop. You
+ must use the '-v' option. You'll get an error similiar to that shown
+ in the following 'make' excerpt.
+
+
+----- cut -----
+gcc -v -shared -W1,-soname,librsl.so.1 -o librsl.so.1.17 rapic_to_radar.o rapic.tab.o lex.rapic.o rapic_routines.o radar.o volume.o image_gen.o cappi.o fraction.o read_write.o farea.o range.o radar_to_uf.o uf_to_radar.o lassen_to_radar.o wsr88d_to_radar.o carpi.o cube.o sort_rays.o toga_to_radar.o gts.o histogram.o ray_indexes.o anyformat_to_radar.o get_win.o endian.o mcgill_to_radar.o mcgill.o interp.o toga.o lassen.o wsr88d.o wsr88d_get_site.o gzip.o prune.o reverse.o fix_headers.o radar_to_hdf_1.o radar_to_hdf_2.o nsig_to_radar.o nsig.o nsig2_to_radar.o hdf_to_radar.o toolkit_memory_mgt.o africa_to_radar.o africa.o
+Reading specs from /opt/hppd/lib/gcc/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2.1/specs
+gcc version 2.7.2.1
+ /opt/hppd/lib/gcc/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2.1/ld -b -o librsl.so.1.17 -L/opt/hppd/lib/gcc/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2.1 -L/opt/hppd/lib/gcc rapic_to_radar.o rapic.tab.o lex.rapic.o rapic_routines.o radar.o volume.o image_gen.o cappi.o fraction.o read_write.o farea.o range.o radar_to_uf.o uf_to_radar.o lassen_to_radar.o wsr88d_to_radar.o carpi.o cube.o sort_rays.o toga_to_radar.o gts.o histogram.o ray_indexes.o anyformat_to_radar.o get_win.o endian.o mcgill_to_radar.o mcgill.o interp.o toga.o lassen.o wsr88d.o wsr88d_get_site.o gzip.o prune.o reverse.o fix_headers.o radar_to_hdf_1.o radar_to_hdf_2.o nsig_to_radar.o nsig.o nsig2_to_radar.o hdf_to_radar.o toolkit_memory_mgt.o africa_to_radar.o africa.o
+/bin/ld: DP-Relative Code in file /usr/tmp/cca11778.o - Shared Library must be Position-Independent
+collect2: ld returned 1 exit status
+make: *** [librsl.so.1.17] Error 1
+----- cut -----
+
+ Take the 'ld' command that is shown, the second of the two commands,
+ and execute it directly at the Unix prompt. It will create the
+ shared library. I don't get it, but, it works. My guess is that
+ the 'gcc' command is doing something that is not shown. What is
+ shown are the correct commands. Go figure.
+
+
+Contributions
+-------------
+Dave Wolff - Most of the specifications for the functionality and feedback
+ during debugging.
+Mike Kolander - The HDF, Mcgill and kwaj to radar routines.
+Alan McConnell - The toga_to_radar routine.
+Dennis Flanigan - New sorting code. Echo top height routines. Vertical
+ structure code.
+Thuy Nguyen - Bug fixes and testing.
+Paul Kucera - Testing, bug reports and SIGMET code.
+Michael Whimpy - BMRC, Austrailia. Lassen modifications.
+Don Burrows - The edge_to_radar routine.
+
+QUESTIONS
+---------
+
+Contact the TRMM Office help at help@radar.gsfc.nasa.gov
diff --git a/africa.c b/africa.c
new file mode 100644
index 0000000..7348587
--- /dev/null
+++ b/africa.c
@@ -0,0 +1,141 @@
+/*
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1997
+ John H. Merritt
+ Space Applications Corporation
+ Vienna, Virginia
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+#include
+#include
+#include "africa.h"
+
+int africa_read_buffer(FILE *fp, Africa_buffer *buffer)
+{
+ int n;
+
+ n = fread(buffer, 1, sizeof(Africa_buffer), fp);
+ return n;
+}
+
+float africa_bcd_convert(unsigned short bcd)
+{
+ int val;
+
+ val =
+ ((bcd >> 12) & 0xf) * 1000
+ + ((bcd >> 8) & 0xf) * 100
+ + ((bcd >> 4) & 0xf) * 10
+ + ( bcd & 0xf);
+ return val/10.0;
+}
+
+Africa_sweep * africa_new_sweep(int nray)
+{
+ Africa_sweep *sweep;
+
+ sweep = (Africa_sweep *)calloc(nray, sizeof(Africa_sweep));
+ if (! sweep) {
+ perror("africa_new_sweep:sweep");
+ return NULL;
+ }
+ sweep->nrays = nray;
+ sweep->ray = (Africa_ray **) calloc(nray, sizeof(Africa_ray *));
+ if (! sweep -> ray) {
+ perror("africa_new_sweep:ray");
+ return NULL;
+ }
+ return sweep;
+}
+
+Africa_ray *africa_new_ray(void)
+{
+ Africa_ray *ray;
+ ray = (Africa_ray *)calloc(1, sizeof(Africa_ray));
+ if (! ray) {
+ perror("africa_new_ray:ray");
+ return NULL;
+ }
+ return ray;
+}
+
+void africa_free_ray(Africa_ray *r)
+{
+ if (! r) return;
+ free(r);
+}
+
+void africa_free_sweep(Africa_sweep *s)
+{
+ int i;
+ if (! s) return;
+ if (! s->ray) return;
+ for (i=0; inrays; i++) {
+ africa_free_ray(s->ray[i]);
+ }
+ free(s->ray);
+ free(s);
+}
+
+Africa_sweep *africa_read_sweep(FILE *fp)
+{
+ /* This contains the next ray of data, except
+ * when this is the first ray. This is a
+ * read-ahead buffer.
+ */
+ static Africa_buffer *buf = NULL; /* The read ahead buffer, too. */
+ Africa_sweep *sweep = NULL;
+ int cur_elev, ielev, iray;
+ Africa_ray *ray = NULL;
+ int nray;
+
+ if (! buf) {
+ buf = (Africa_buffer *) calloc(1, sizeof(Africa_buffer));
+ if (! buf) {
+ perror("allocate buf in read_sweep");
+ return NULL;
+ }
+ /* (pre)Read a record */
+ africa_read_buffer(fp, buf); /* allocates space for buffer */
+
+ }
+ /* Allocate 500 (should be enough) ray pointers. */
+
+ sweep = africa_new_sweep(1000); /* 500 times 2 field types ? */
+ /* Determine the elevation step we're on so we know when to
+ * return the sweep. Basically, the last read will be the
+ * data for the next sweep; the meaning of the above code.
+ */
+ cur_elev = ielev = buf->raycount/512;
+ nray = 0;
+ while(cur_elev == ielev) {
+ iray = buf->raycount - cur_elev*512;
+ if (iray != 0) {
+ ray = sweep->ray[nray];
+ if (!ray) sweep->ray[nray] = ray = africa_new_ray();
+ memcpy(ray, buf, sizeof(Africa_buffer));
+ nray++;
+ }
+ if (africa_read_buffer(fp, buf) == 0) break;
+ cur_elev = buf->raycount/512;
+ /* isite = buf->xmit_power_site & 0x1f; */
+ }
+ if (nray == 0) return NULL;
+ sweep->nrays = nray;
+
+ return sweep;
+}
diff --git a/africa.h b/africa.h
new file mode 100644
index 0000000..9b493cb
--- /dev/null
+++ b/africa.h
@@ -0,0 +1,69 @@
+/*
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1997
+ John H. Merritt
+ Space Applications Corporation
+ Vienna, Virginia
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+typedef struct {
+ unsigned short
+ yearjday, /* Year * 512 + Julian day. */
+ hour, /* Hour. */
+ minute_sec, /* Minute * 60 + seconds. */
+ bcd_start_azim, /* BCD code for start of azimuth. */
+ bcd_end_azim, /* BCD code for end of azimuth. */
+ raycount, /* Raycount + elstep * 512. Set to 0 for last ray of ppi */
+ bcd_azimuth, /* BCD code for azimuth. */
+ bcd_elevation, /* BCD code for elevation. */
+ mds, /* Minumum detectable signal (MDS). */
+ mus, /* Minumum usable signal (MUS). */
+ rvpc_high,
+ rvpc_low, /* High and low level, in RVPC units. */
+ phi, /* PHI - RVPC high level in dbm * 32. */
+ plo, /* PLO - RVPC high level in dbm * 32. */
+ xmit_power_site, /* Transimitter Power * 32 + Site number. */
+ skip_width_azim_avg, /* Skip + Bin width * 256 +
+ * Azimuth Averaging Factor * 4096.
+ */
+ bin[224], /* RVPC COUNT for range bin[1..224] */
+ notused[256-241+1]; /* Not used. */
+} Africa_buffer;
+
+typedef Africa_buffer Africa_ray;
+
+typedef struct {
+ int nrays;
+ Africa_ray **ray; /* 0..nrays-1 of Africa_rays */
+} Africa_sweep;
+
+
+typedef struct {
+ int nsweeps;
+ Africa_sweep **sweep; /*0..nsweeps-1 of Africa_sweeps */
+} Africa_volume;
+
+/* Prototype routine definitions */
+
+int africa_read_buffer(FILE *fp, Africa_buffer *buffer);
+float africa_bcd_convert(unsigned short bcd);
+Africa_sweep * africa_new_sweep(int nray);
+Africa_ray *africa_new_ray(void);
+void africa_free_ray(Africa_ray *r);
+void africa_free_sweep(Africa_sweep *s);
+Africa_sweep *africa_read_sweep(FILE *fp);
diff --git a/africa_to_radar.c b/africa_to_radar.c
new file mode 100644
index 0000000..a5bffdd
--- /dev/null
+++ b/africa_to_radar.c
@@ -0,0 +1,163 @@
+/*
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1997
+ John H. Merritt
+ Space Applications Corporation
+ Vienna, Virginia
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+#include
+#include
+#include
+#include "rsl.h"
+#include "africa.h"
+
+static void ymd(int jday, int yy, int *mm, int *dd);
+
+static int daytab[2][13] = {
+ {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365},
+ {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366}
+};
+
+static void ymd(int jday, int year, int *mm, int *dd)
+{
+ /* Input: jday, yyyy */
+ /* Output: mm, dd */
+ int leap;
+ int i;
+
+ leap = (year%4 == 0 && year%100 != 0) || year%400 == 0;
+ for (i=0; daytab[leap][i]v[DZ_INDEX] = RSL_new_volume(20);
+ v = radar->v[DZ_INDEX];
+
+ for(i=0; (sweep = africa_read_sweep(fp)); i++) {
+
+ /* Load the sweep into the radar volume */
+ v->sweep[i] = RSL_new_sweep((int)sweep->nrays);
+ s = v->sweep[i];
+ if (radar_verbose_flag) printf("NUMBER OF RAYS: %d\n", sweep->nrays);
+ for (n=0; n < sweep->nrays; n++) {
+ ray = sweep->ray[n];
+ if (ray == NULL) continue;
+ year = ray->yearjday/512;
+ jday = ray->yearjday & 0x1ff;
+ year += 1900;
+ if (year < 1970) year += 100; /* >=2000 */
+ ymd(jday, year, &month, &day);
+ hour = ray->hour;
+ min = ray->minute_sec/60;
+ sec = ray->minute_sec - min*60;
+
+ elev = africa_bcd_convert (ray->bcd_elevation);
+ azim = africa_bcd_convert (ray->bcd_azimuth);
+ s_azim = africa_bcd_convert (ray->bcd_start_azim);
+ e_azim = africa_bcd_convert (ray->bcd_end_azim);
+
+ /* Values that I CANNOT trust.
+ * e_azim
+ *
+ * DATA ORGANIZATION:
+ * Usually, 10 ray groups for each field type. Field type is in
+ * ray->xmit_power_site (Doc wrong?)
+ * iray == 0 when at the end of the sweep. (Don't need lookahead)
+ */
+
+ ielev = ray->raycount/512;
+ iray = ray->raycount - ielev*512;
+ isite = ray->xmit_power_site & 0x1f;
+ printf("Record %d, time = %.2d:%.2d:%.2d %.2d/%.2d/%.2d --> elev,azim = %f, %f. Start: %f, %f, iray/ielev %d %d, site=%d\n", n,
+ hour, min, sec, month, day, year-1900, elev, azim, s_azim, e_azim, iray, ielev, isite);
+
+
+ if (isite != 22) continue;
+ /* ONLY LOAD from isite==22, for now. */
+ r = RSL_new_ray(224);
+ s->ray[n] = r;
+ r->h.month = month;
+ r->h.day = day;
+ r->h.year = year;
+ r->h.hour = hour;
+ r->h.minute = min;
+ r->h.sec = sec;
+ r->h.azimuth = azim;
+ r->h.ray_num = iray;
+ r->h.elev = elev;
+ r->h.elev_num = ielev;
+ r->h.beam_width = 1.0;
+ r->h.gate_size = 1000;
+
+ /* What are the others? */
+
+ r->h.invf = DZ_INVF;
+ r->h.f = DZ_F;
+ s->h.horz_half_bw = 0.5;
+ s->h.vert_half_bw = 0.5;
+ s->h.beam_width = r->h.beam_width;
+
+ for (ibin=0; ibinh.nbins; ibin++) {
+ r->range[ibin] = r->h.invf(ray->bin[ibin]/8.0/100.0 + 0.5);
+ }
+ }
+ }
+ fclose(fp);
+
+ sprintf(radar->h.radar_type, "south_africa");
+ sprintf(radar->h.name, "SAFRICA");
+ sprintf(radar->h.radar_name, "SAFRICA");
+ sprintf(radar->h.city, "I don't know");
+ sprintf(radar->h.state, "??");
+ sprintf(radar->h.country, "South Africa");
+
+ radar_load_date_time(radar);
+ return radar;
+}
diff --git a/anyformat_to_radar.c b/anyformat_to_radar.c
new file mode 100644
index 0000000..601a6f3
--- /dev/null
+++ b/anyformat_to_radar.c
@@ -0,0 +1,171 @@
+/*
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1996, 1997
+ John H. Merritt
+ Space Applications Corporation
+ Vienna, Virginia
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+/*
+ * By John H. Merritt
+ * Science Applications Corporation, Vienna, VA
+ */
+
+#include
+#include
+#include
+#include
+#include "rsl.h"
+void rsl_readflush(FILE *fp);
+/*********************************************************************/
+/* */
+/* RSL_filetype */
+/* */
+/*********************************************************************/
+enum File_type RSL_filetype(char *infile)
+{
+ /* Open the input file and peek at the first few bytes to determine
+ * the type of file.
+ *
+ * UF - First two bytes 'UF'
+ * - or 3,4 bytes 'UF'
+ * - or 5,6 bytes 'UF'. This is the most common.
+ *
+ * WSR88D - First 8 bytes: 'ARCHIVE2' or 'AR2V0001'
+ *
+ * TOGA - ??
+ * NSIG - ??
+ * LASSEN - SUNRISE
+ * RSL - RSL
+ * MCGILL - P A B
+ * RAPIC - /IMAGE:
+ * RADTEC - 320 (decimal, in first two bytes)
+ * RAINBOW - First two bytes: decimal 1, followed by 'H'
+ */
+ FILE *fp;
+ char magic[11];
+
+ if ((fp = fopen(infile, "r")) == NULL) {
+ perror(infile);
+ return UNKNOWN;
+ }
+
+ /* Read the magic bytes. */
+ fp = uncompress_pipe(fp); /* If gzip available. */
+ if (fread(magic, sizeof(magic), 1, fp) != 1) {
+ char *magic_str = (char *)calloc(sizeof(magic)+1, sizeof(char));
+ memcpy(magic_str, magic, sizeof(magic));
+ fprintf(stderr,"Error fread: Magic is %s\n", magic_str);
+ free (magic_str);
+ perror("RSL_filetype");
+ fclose(fp);
+ return UNKNOWN;
+ }
+
+ rsl_readflush(fp); /* Fork, read and exit -- eliminates the 'Broken pipe' */
+
+ if (strncmp("ARCHIVE2.", magic, 9) == 0) return WSR88D_FILE;
+ if (strncmp("AR2V000", magic, 7) == 0) return WSR88D_FILE;
+ if (strncmp("UF", magic, 2) == 0) return UF_FILE;
+ if (strncmp("UF", &magic[2], 2) == 0) return UF_FILE;
+ if (strncmp("UF", &magic[4], 2) == 0) return UF_FILE;
+ if ((int)magic[0] == 0x0e &&
+ (int)magic[1] == 0x03 &&
+ (int)magic[2] == 0x13 &&
+ (int)magic[3] == 0x01
+ ) return HDF_FILE;
+ if (strncmp("RSL", magic, 3) == 0) return RSL_FILE;
+ if ((int)magic[0] == 7) return NSIG_FILE_V1;
+ if ((int)magic[1] == 7) return NSIG_FILE_V1;
+ if ((int)magic[0] == 27) return NSIG_FILE_V2;
+ if ((int)magic[1] == 27) return NSIG_FILE_V2;
+ if (strncmp("/IMAGE:", magic, 7) == 0) return RAPIC_FILE;
+ if ((int)magic[0] == 0x40 &&
+ (int)magic[1] == 0x01
+ ) return RADTEC_FILE;
+ if ((int)magic[0] == 0x01 && magic[1] == 'H') return RAINBOW_FILE;
+
+ if (strncmp("SUNRISE", &magic[4], 7) == 0) return LASSEN_FILE;
+/* The 'P A B' is just too specific to be a true magic number, but that's all
+ * I've got.
+ */
+ if (strncmp("P A B ", magic, 6) == 0) return MCGILL_FILE;
+ /* Byte swapped ? */
+ if (strncmp(" P A B", magic, 6) == 0) return MCGILL_FILE;
+ if (strncmp("Volume", magic, 6) == 0) return EDGE_FILE;
+ if (strncmp("VOLD", magic, 4) == 0) return DORADE_FILE;
+
+ return UNKNOWN;
+}
+
+
+
+
+
+
+
+/*********************************************************************/
+/* */
+/* RSL_anyformat_to_radar */
+/* */
+/*********************************************************************/
+
+Radar *RSL_anyformat_to_radar(char *infile, ...)
+{
+ va_list ap;
+ char *callid_or_file;
+ Radar *radar;
+
+/* If it is detected that the input file is WSR88D, use the second argument
+ * as the call id of the site, or the file name of the tape header file.
+ *
+ * Assumption: Input files are seekable.
+ */
+ radar = NULL;
+ switch (RSL_filetype(infile)) {
+ case WSR88D_FILE:
+ callid_or_file = NULL;
+ va_start(ap, infile);
+ callid_or_file = va_arg(ap, char *);
+ va_end(ap);
+ radar = RSL_wsr88d_to_radar(infile, callid_or_file);
+ break;
+ case UF_FILE: radar = RSL_uf_to_radar(infile); break;
+ case TOGA_FILE: radar = RSL_toga_to_radar(infile); break;
+ case NSIG_FILE_V1: radar = RSL_nsig_to_radar(infile); break;
+ case NSIG_FILE_V2: radar = RSL_nsig2_to_radar(infile); break;
+ case RAPIC_FILE: radar = RSL_rapic_to_radar(infile); break;
+ case RADTEC_FILE: radar = RSL_radtec_to_radar(infile); break;
+ case RSL_FILE: radar = RSL_read_radar(infile); break;
+#ifdef HAVE_LIBTSDISTK
+ case HDF_FILE: radar = RSL_hdf_to_radar(infile); break;
+#endif
+ case RAINBOW_FILE: radar = RSL_rainbow_to_radar(infile); break;
+ case MCGILL_FILE: radar = RSL_mcgill_to_radar(infile); break;
+ case EDGE_FILE: radar = RSL_EDGE_to_radar(infile); break;
+ case LASSEN_FILE: radar = RSL_lassen_to_radar(infile); break;
+ case DORADE_FILE: radar = RSL_dorade_to_radar(infile); break;
+
+ default:
+ fprintf(stderr, "Unknown input file type. File <%s> is not recognized by RSL.\n", infile);
+ return NULL;
+ }
+
+ return radar;
+}
+
+
diff --git a/cappi.c b/cappi.c
new file mode 100644
index 0000000..6a8ed20
--- /dev/null
+++ b/cappi.c
@@ -0,0 +1,192 @@
+/*
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1995 Dennis F. Flanigan Jr. of Applied Research Corporation,
+ Landover, Maryland, a NASA/GSFC on-site contractor.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* File: cappi.c
+ *
+ * 1/9/95 DFF
+ * Version 0.29 updates
+ */
+
+#include
+#include
+#include
+#include "rsl.h"
+
+extern int radar_verbose_flag;
+
+
+/*********************************************************************/
+/* */
+/* RSL_get_value_from_cappi */
+/* */
+/*********************************************************************/
+float RSL_get_value_from_cappi(Cappi *cappi, float rng, float azm)
+ {
+ return RSL_get_value_from_sweep(cappi->sweep, azm, rng);
+ }
+
+/*********************************************************************/
+/* */
+/* RSL_new_cappi */
+/* RSL_free_cappi */
+/* */
+/* Dennis Flanigan */
+/* Mods by John Merritt 6/14/95 */
+/*********************************************************************/
+
+Cappi *RSL_new_cappi(Sweep *sweep, float height)
+ {
+ /* Modeled after a sweep structure. */
+ int a;
+ Cappi *c;
+ float grange;
+ Ray *ray;
+ int num_bin;
+ float start_bin, size_bin;
+
+ if((c = (Cappi *)calloc(1, sizeof(Cappi))) == NULL)
+ {
+ fprintf(stderr,"RSL_new_cappi: Calloc failed for Cappi data structure.\n");
+ return(NULL);
+ }
+
+ c->height = height;
+ ray = RSL_get_first_ray_of_sweep(sweep);
+ num_bin = ray->h.nbins;
+ start_bin = ray->h.range_bin1/1000.0;
+ size_bin = ray->h.gate_size/1000.0;
+
+ /* Allocate space for elev angle,range array */
+ if((c->loc =(Er_loc *)calloc(num_bin,sizeof(Er_loc))) == NULL)
+ {
+ fprintf(stderr,"RSL_new_cappi: Calloc failed for er_loc array. \n");
+ free(c);
+ return(NULL);
+ }
+
+ /* Calculate elevation angle verse range array */
+ for(a=0;aloc[a].srange,&c->loc[a].elev);
+ }
+
+ /* Allocate Space for the data */
+ c->sweep = RSL_copy_sweep(sweep);
+ RSL_clear_sweep(c->sweep); /* This maintains header info. */
+
+ return c;
+ }
+
+void RSL_free_cappi(Cappi *c)
+ {
+ if (c == NULL) return;
+ RSL_free_sweep(c->sweep);
+ free(c->loc);
+ free(c);
+
+ return;
+ }
+
+
+/*********************************************************************/
+/* */
+/* RSL_cappi_at_h */
+/* */
+/* DFF 10/28/94 */
+/* Modified by John Merritt 6/14/95 */
+/*********************************************************************/
+Cappi *RSL_cappi_at_h(Volume *v, float height, float max_range)
+ /*
+ * h and max_range in KM.
+ */
+ {
+ int n;
+ Cappi *c;
+ Sweep *sweep;
+
+ if (v == NULL) return NULL;
+ sweep = RSL_get_first_sweep_of_volume(v); /* 1st non-NULL sweep */
+
+ if((c = RSL_new_cappi(sweep, height)) == NULL)
+ {
+ fprintf(stderr,"RSL_cappi_at_h: Vnew_cappi failed\n");
+ return (NULL);
+ }
+
+ if((n = RSL_fill_cappi(v,c,0)) < 0)
+ {
+ fprintf(stderr,"RSL_cappi_at_h: Vfill_cappi_at_h failed: returned: %d\n",n);
+ RSL_free_cappi(c);
+ return(NULL);
+ }
+
+ return(c);
+ }
+
+
+/*********************************************************************/
+/* */
+/* RSL_fill_cappi */
+/* DFF 10/28/94 */
+/*********************************************************************/
+int RSL_fill_cappi(Volume *v, Cappi *cap, int method)
+ {
+ int a,b;
+ float x;
+ Ray *ray;
+ Sweep *sweep;
+
+ if (v == NULL) return(-1);
+ if (cap == NULL) return(-1);
+
+ /* get data from frist ray. */
+ ray = RSL_get_first_ray_of_volume(v);
+ cap->month = ray->h.month;
+ cap->day = ray->h.day;
+ cap->year = ray->h.year;
+ cap->hour = ray->h.hour;
+ cap->minute = ray->h.minute;
+ cap->sec = ray->h.sec;
+ cap->field_type = 1; /** default setting -- PAK **/
+ cap->interp_method = method; /* ?? nearest neighbor */
+
+ ray = RSL_get_first_ray_of_sweep(cap->sweep);
+ sweep = cap->sweep;
+ for(a=0;a < sweep->h.nrays; a++)
+ {
+ ray = sweep->ray[a];
+ for(b=0; b < ray->h.nbins; b++)
+ {
+ x = RSL_get_value(v,
+ cap->loc[b].elev,
+ cap->sweep->ray[a]->h.azimuth,
+ cap->loc[b].srange);
+
+ ray->range[b] = ray->h.invf(x);
+ }
+ }
+
+ return 1;
+ }
+
+
+
diff --git a/carpi.c b/carpi.c
new file mode 100644
index 0000000..211c558
--- /dev/null
+++ b/carpi.c
@@ -0,0 +1,302 @@
+/*
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1996, 1997
+ Mike Kolander
+ Space Applications Corporation
+ Vienna, Virginia
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+/* Mike Kolander
+ * Space Applications Corporation
+ * NASA/Goddard 910.1
+ */
+
+#include
+#include
+#include
+#include
+
+#include "rsl.h"
+
+#define RAD2DEG 57.29578 /* radian to degree conversion */
+#define MAXRAYS 512 /* loop safety valve when traversing a sweep */
+
+extern int radar_verbose_flag;
+
+
+/*************************************************************/
+/* */
+/* RSL_free_carpi */
+/* */
+/*************************************************************/
+void RSL_free_carpi(Carpi *carpi)
+{
+ /* Frees memory allocated to a carpi structure, and associated
+ pointer and data arrays.
+ */
+
+ if (carpi != NULL)
+ {
+ if (carpi->data != NULL)
+ {
+ if (carpi->data[0] != NULL)
+ free(carpi->data[0]); /* Free the 2D data array. */
+ free(carpi->data); /* Free the vector of pointers. */
+ }
+ free(carpi); /* Free the carpi structure. */
+ }
+}
+
+/*************************************************************/
+/* */
+/* RSL_new_carpi */
+/* */
+/*************************************************************/
+Carpi *RSL_new_carpi(int nrows, int ncols)
+{
+ /* Allocates memory for a carpi structure, and associated pointer
+ and data arrays.
+ */
+ Carpi *c;
+ Carpi_value *data;
+ int row;
+
+ /* Allocate a carpi. */
+ c = (Carpi *)calloc(1, sizeof(Carpi));
+ if (c == NULL) perror("RSL_new_carpi");
+ /* Allocate a vector of 'nrows' pointers. */
+ c->data = (Carpi_value **)calloc(nrows, sizeof(Carpi_value *));
+ if (c->data == NULL) perror("RSL_new_carpi");
+ /* Allocate a 2 dimensional array for the actual data values. */
+ data = (Carpi_value *)calloc(nrows*ncols, sizeof(Carpi_value));
+ if (data == NULL) perror("RSL_new_carpi");
+ /* Fill all the 'nrows' pointer slots created above. */
+ for (row=0; rowdata[row] = data + row*ncols;
+
+ return(c);
+}
+
+/*************************************************************/
+/* */
+/* RSL_volume_to_carpi */
+/* */
+/*************************************************************/
+Carpi *RSL_volume_to_carpi(Volume *v, float h, float grnd_r,
+ float dx, float dy, int nx, int ny,
+ int radar_x, int radar_y, float lat, float lon)
+/*
+ * Creates a carpi from a volume structure.
+ *
+ * +--------------------+ ^
+ * | | |
+ * | | |
+ * | cell size dx,dy | ny
+ * | | |
+ * | | |
+ * +--------------------+ V
+ * lat,lon
+ * <-------- nx -------->
+ *
+ * Radar centered at radar_x, radar_y.
+ */
+
+{
+ Cappi *cappi;
+ Carpi *carpi;
+
+ if (v == NULL) return NULL;
+ cappi = RSL_cappi_at_h(v, h, grnd_r);
+ cappi->lat = lat;
+ cappi->lon = lon;
+ cappi->interp_method = 0;
+
+ carpi = RSL_cappi_to_carpi(cappi, dx, dy, lat, lon, nx, ny,
+ radar_x, radar_y);
+ if (carpi == NULL) return NULL;
+ RSL_free_cappi(cappi);
+ return carpi;
+}
+
+/*************************************************************/
+/* */
+/* RSL_find_rng_azm */
+/* */
+/*************************************************************/
+void RSL_find_rng_azm(float *r, float *ang, float x, float y)
+{
+/* Convert Cartesian coords (x,y) to polar (rng,angle); 0 0.0)
+ *ang = 90.0 - *ang;
+ else
+ *ang = 270.0 - *ang;
+ }
+ else /* x is 0.0 */
+ {
+ if (y >= 0.0) *ang = 0.0;
+ else *ang = 180.0;
+ }
+}
+
+/*************************************************************/
+/* */
+/* RSL_cappi_to_carpi */
+/* */
+/*************************************************************/
+Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy, float lat,
+ float lon, int nx, int ny, int radar_x, int radar_y)
+ /****** Simple and straightforward algorithm:
+ Divide each of the nx*ny carpi cells into scx*scy subcells.
+ Find the data value for each subcell from the cappi rays.
+ Average the subcell data values over a cell to obtain the cell value.
+ Store the cell value into the 2_D carpi array.
+ ********/
+{
+ Carpi *carpi;
+ Ray *first_ray;
+ int row, col, j, k, m, n, scx, scy, valid_subcells;
+ float x, y, rng, azm, cell, cell_diag, gate_size;
+ float carpi_max_rng, radar_max_rng;
+ float subcell[3][3]; /* Maximum of 9 subcells per carpi cell*/
+
+ if (cappi == NULL) return NULL;
+ if (cappi->sweep == NULL) return NULL;
+ first_ray = RSL_get_first_ray_of_sweep(cappi->sweep);
+ if (first_ray == NULL) return NULL; /* No data. */
+
+ if (radar_verbose_flag) fprintf(stderr,"\nCreating carpi...\n");
+
+ /* Allcate space for a carpi, and fill in its values. */
+ carpi = RSL_new_carpi(ny, nx);
+ carpi->month = cappi->month;
+ carpi->day = cappi->day;
+ carpi->year = cappi->year;
+ carpi->hour = cappi->hour;
+ carpi->minute = cappi->minute;
+ carpi->sec = cappi->sec;
+ carpi->dx = dx;
+ carpi->dy = dy;
+ carpi->nx = nx;
+ carpi->ny = ny;
+ carpi->radar_x = radar_x;
+ carpi->radar_y = radar_y;
+ carpi->height = cappi->height;
+ carpi->lat = lat;
+ carpi->lon = lon;
+ strncpy(carpi->radar_type, cappi->radar_type, sizeof(cappi->radar_type));
+ carpi->field_type = cappi->field_type;
+ carpi->interp_method = cappi->interp_method;
+ carpi->f = first_ray->h.f;
+ carpi->invf = first_ray->h.invf;
+
+ gate_size = first_ray->h.gate_size / 1000.0; /* km */
+ cell_diag = sqrt(dx*dx + dy*dy);
+ /* How many subcells per carpi cell? The larger the carpi cell relative
+ to gate_size, the more subcells we want. Will have scx*scy subcells
+ per carpi cell. Note below that the max no. of subcells is 9 . */
+ if ((dy - gate_size) < 0.0)
+ scy = 1;
+ else if ((dy - gate_size) <= 1.0)
+ scy = 2;
+ else
+ scy = 3;
+
+ if ((dx - gate_size) < 0.0)
+ scx = 1;
+ else if ((dx - gate_size) <= 1.0)
+ scx = 2;
+ else
+ scx = 3;
+
+ /* Max range of the radar data */
+ radar_max_rng = first_ray->h.nbins * gate_size; /* km */
+ /* Max range of desired carpi is max of x and y directions. */
+ carpi_max_rng = nx / 2.0 * dx; /* km */
+ if ( (ny / 2.0 * dy) > carpi_max_rng )
+ carpi_max_rng = ny / 2.0 * dy;
+ /* carpi_max_rng is smaller of (radar_max_rng, carpi_max_rng) */
+ if (radar_max_rng < carpi_max_rng)
+ carpi_max_rng = radar_max_rng;
+
+ if (radar_verbose_flag)
+ fprintf(stderr,"carpi_max_rng:%.1f(km) beam_width:%.1f gate_size:%d(m)\n",
+ carpi_max_rng, cappi->sweep->h.beam_width, first_ray->h.gate_size);
+
+ /* For each cell (row,col) comprising the carpi...*/
+ for (row=0; row carpi_max_rng)
+ {
+ /* Totality of carpi cell lies outside data range. */
+ cell = (float) BADVAL;
+ goto escape;
+ }
+ } /* end if (m == 0) */
+ /* cell lies in data range. Get data value from cappi. */
+ subcell[n][m] = RSL_get_value_from_cappi(cappi,rng,azm);
+ } /* end for (m=... */
+ } /* end for (n=... */
+
+ /* All subcell values have now been determined. Average them
+ to determine the cell value. */
+ valid_subcells = 0; /* number subcells having valid data values.*/
+ cell = 0.0;
+ for (j=0; j= NOECHO))
+ continue;
+ else /* valid data value. */
+ {
+ cell = cell + subcell[j][k];
+ valid_subcells++;
+ }
+ } /* end for (j=0; jdata[row][col] = (Carpi_value) carpi->invf(cell);
+ } /* end for (col=... */
+ } /* end for (row=... */
+
+ return(carpi);
+}
diff --git a/colors/Makefile.am b/colors/Makefile.am
new file mode 100644
index 0000000..709a367
--- /dev/null
+++ b/colors/Makefile.am
@@ -0,0 +1,6 @@
+AUTOMAKE_OPTIONS = foreign
+
+colordir = $(prefix)/lib/colors
+color_DATA = *.???
+
+EXTRA_DIST = $(color_DATA)
diff --git a/colors/blu_dz.clr b/colors/blu_dz.clr
new file mode 100644
index 0000000000000000000000000000000000000000..2f06f91c1710ccff6b606846d5574a82f054262a
GIT binary patch
literal 206
zcmZQ@;1!ngv2^qds%z|@yZZm}tB*haXMh1EFe61vTZchkS)3at45YiKFWI>7zX_7a
HU|<3O8gUQ<
literal 0
HcmV?d00001
diff --git a/colors/blu_height.clr b/colors/blu_height.clr
new file mode 100644
index 0000000000000000000000000000000000000000..0e8d07095146bdfd6841e2696f229a7c05efbccf
GIT binary patch
literal 236
zcmZQDPMC0D%J$p;85o&ZIJkKE8QA$ml~mN!HMMp03=EA;%q%ReZS5SKoL${LynKB9
z1A{`s!Xu+&;t~>*Q`0gsvvczbii%6iE2?U0>l>R|+S)t2d-^6!oIG{fjG43N&RekP
z|I+0vR;^jPe&ePs+qUoAy=UKngNKhEJ8|mt*>e{zUA}t##;rSd?>~I>@;sUkCsI
literal 0
HcmV?d00001
diff --git a/colors/blu_hh.clr b/colors/blu_hh.clr
new file mode 100644
index 0000000000000000000000000000000000000000..0e8d07095146bdfd6841e2696f229a7c05efbccf
GIT binary patch
literal 236
zcmZQDPMC0D%J$p;85o&ZIJkKE8QA$ml~mN!HMMp03=EA;%q%ReZS5SKoL${LynKB9
z1A{`s!Xu+&;t~>*Q`0gsvvczbii%6iE2?U0>l>R|+S)t2d-^6!oIG{fjG43N&RekP
z|I+0vR;^jPe&ePs+qUoAy=UKngNKhEJ8|mt*>e{zUA}t##;rSd?>~I>@;sUkCsI
literal 0
HcmV?d00001
diff --git a/colors/blu_rainfall.clr b/colors/blu_rainfall.clr
new file mode 100644
index 0000000000000000000000000000000000000000..4c873a8ba631e8f2fa54883b5cbbf67ed5fcb2bd
GIT binary patch
literal 216
zcmZShe`?j-90nlx|9|V&mKFvP5E~!(4+pE^;3OQtB@qmu$ut937$P_HFhp+30b(77
P$o>k3$ms?Qk<%Oi80ePQ
literal 0
HcmV?d00001
diff --git a/colors/blu_reflectivity.clr b/colors/blu_reflectivity.clr
new file mode 100644
index 0000000000000000000000000000000000000000..2f06f91c1710ccff6b606846d5574a82f054262a
GIT binary patch
literal 206
zcmZQ@;1!ngv2^qds%z|@yZZm}tB*haXMh1EFe61vTZchkS)3at45YiKFWI>7zX_7a
HU|<3O8gUQ<
literal 0
HcmV?d00001
diff --git a/colors/blu_reflectivity1.clr b/colors/blu_reflectivity1.clr
new file mode 100644
index 0000000000000000000000000000000000000000..2f06f91c1710ccff6b606846d5574a82f054262a
GIT binary patch
literal 206
zcmZQ@;1!ngv2^qds%z|@yZZm}tB*haXMh1EFe61vTZchkS)3at45YiKFWI>7zX_7a
HU|<3O8gUQ<
literal 0
HcmV?d00001
diff --git a/colors/blu_spectral_width.clr b/colors/blu_spectral_width.clr
new file mode 100644
index 0000000000000000000000000000000000000000..9a5cf6c4cee888ec100c76772915de4acdcd5ac1
GIT binary patch
literal 236
zcmV}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq0ReDz0000000960{}~w?8yp=TA0QzjBP1mzCnzZ@Dl054E-x@K
zGBY$aHa9pqIy*Z&Jw87`K|(`BMMg(RNlHshOifNtP*GA-R8>}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq4Q4P*Td-=&{{IYG+B!&rV5#ouOE&KNZvs&^
GfFuAi#1KUQ
literal 0
HcmV?d00001
diff --git a/colors/grn_dz.clr b/colors/grn_dz.clr
new file mode 100644
index 0000000000000000000000000000000000000000..826170c65103c5af25c470c64f5ae2a7c9fee13f
GIT binary patch
literal 206
zcmZQ@;1!Ybv2^qbs^b=w(=fMo^^2Gq7@JuZ-#>fBmIY^TKKt~ar)SRU#B*0}J($1%
U1ph$<1A~l3XyJbo2z$_w01a6ey8r+H
literal 0
HcmV?d00001
diff --git a/colors/grn_height.clr b/colors/grn_height.clr
new file mode 100644
index 0000000000000000000000000000000000000000..bf29d331e11d64aa9bd9c26cd57a0a637c421cd3
GIT binary patch
literal 236
zcmZQDPMC0j!J+X`%%l_l8Gzu^$^>yG6*YBDZ5=%WLt_&&3rlNTI|nCcS9cFDA7B5#
zppdZe$mp23gv8|3w2aK`+`NLK;?nYps+!vR#-^6G_Rj8}z6ld2Pn|Yn=Ipui7A#^|
zx_rf|HEY*z+_Yue_MN-;>^pGq@X=!@PMtn`?!u+ZSFhi=b?5H=hmW2-d;aqEn|B{R
se*XIH$FJXi!L9+h2m?3<1-ZZk1w;iK1VrvB2#By&2nhQbz{Ii909k%lV*mgE
literal 0
HcmV?d00001
diff --git a/colors/grn_hh.clr b/colors/grn_hh.clr
new file mode 100644
index 0000000000000000000000000000000000000000..bf29d331e11d64aa9bd9c26cd57a0a637c421cd3
GIT binary patch
literal 236
zcmZQDPMC0j!J+X`%%l_l8Gzu^$^>yG6*YBDZ5=%WLt_&&3rlNTI|nCcS9cFDA7B5#
zppdZe$mp23gv8|3w2aK`+`NLK;?nYps+!vR#-^6G_Rj8}z6ld2Pn|Yn=Ipui7A#^|
zx_rf|HEY*z+_Yue_MN-;>^pGq@X=!@PMtn`?!u+ZSFhi=b?5H=hmW2-d;aqEn|B{R
se*XIH$FJXi!L9+h2m?3<1-ZZk1w;iK1VrvB2#By&2nhQbz{Ii909k%lV*mgE
literal 0
HcmV?d00001
diff --git a/colors/grn_rainfall.clr b/colors/grn_rainfall.clr
new file mode 100644
index 0000000000000000000000000000000000000000..a06b95644aace0f711933c4538a3737840113b05
GIT binary patch
literal 216
zcmZSh|9JO;ssHcqZDat0IdjU&{)51A5afBmIY^TKKt~ar)SRU#B*0}J($1%
U1ph$<1A~l3XyJbo2z$_w01a6ey8r+H
literal 0
HcmV?d00001
diff --git a/colors/grn_reflectivity1.clr b/colors/grn_reflectivity1.clr
new file mode 100644
index 0000000000000000000000000000000000000000..826170c65103c5af25c470c64f5ae2a7c9fee13f
GIT binary patch
literal 206
zcmZQ@;1!Ybv2^qbs^b=w(=fMo^^2Gq7@JuZ-#>fBmIY^TKKt~ar)SRU#B*0}J($1%
U1ph$<1A~l3XyJbo2z$_w01a6ey8r+H
literal 0
HcmV?d00001
diff --git a/colors/grn_spectral_width.clr b/colors/grn_spectral_width.clr
new file mode 100644
index 0000000000000000000000000000000000000000..df015b41657e2081e9139cd74c8e4d26b8b87d67
GIT binary patch
literal 236
zcmV}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq0?H6*F+u
literal 0
HcmV?d00001
diff --git a/colors/red_height.clr b/colors/red_height.clr
new file mode 100644
index 0000000000000000000000000000000000000000..7bf8fc34fef0850f0a89b108dfd66f9d40cf0fa0
GIT binary patch
literal 236
zcmZSZNtkee0Sap8?z{K@)YJqe6*YBDZ5=%WLt_&&3rlNTI|nCcS9cFDA7B5#ppdZe
z$mp23gv8|3w2aK`+`NLK;?nYps+!vR#-^6G_Rj8}z6ld2Pn|Yn=Ipui7A*R|boq)^
zYu2vcxM|C_?K^kx*>~XJ;iJb+oH~8>+=WY*uU@}#>(1T#4<9{w_Wb4RH}5`t{QULX
Ok6*w4{)f4WYBT_MdsAWn
literal 0
HcmV?d00001
diff --git a/colors/red_hh.clr b/colors/red_hh.clr
new file mode 100644
index 0000000000000000000000000000000000000000..7bf8fc34fef0850f0a89b108dfd66f9d40cf0fa0
GIT binary patch
literal 236
zcmZSZNtkee0Sap8?z{K@)YJqe6*YBDZ5=%WLt_&&3rlNTI|nCcS9cFDA7B5#ppdZe
z$mp23gv8|3w2aK`+`NLK;?nYps+!vR#-^6G_Rj8}z6ld2Pn|Yn=Ipui7A*R|boq)^
zYu2vcxM|C_?K^kx*>~XJ;iJb+oH~8>+=WY*uU@}#>(1T#4<9{w_Wb4RH}5`t{QULX
Ok6*w4{)f4WYBT_MdsAWn
literal 0
HcmV?d00001
diff --git a/colors/red_rainfall.clr b/colors/red_rainfall.clr
new file mode 100644
index 0000000000000000000000000000000000000000..ec754ac96633346901812879ac7539a159e462df
GIT binary patch
literal 216
zcmZQ5bPZHjXMlsFM|bS_j|H3rfkqH`1qTRa8{uFgCSX9QqdE)jZV*F2l*Ivt0Y&DY
ARR910
literal 0
HcmV?d00001
diff --git a/colors/red_reflectivity.clr b/colors/red_reflectivity.clr
new file mode 100644
index 0000000000000000000000000000000000000000..cdcf7738ee42b52ec3a6d48fd3c229bf24267b86
GIT binary patch
literal 206
zcmZQ@;1!ngwRH3hs$&EK22`K~;wtn0|Nnm*5dZ(*H*5Lk|7UJK{RHOy|8Ih-e871C
D4Ko>u
literal 0
HcmV?d00001
diff --git a/colors/red_reflectivity1.clr b/colors/red_reflectivity1.clr
new file mode 100644
index 0000000000000000000000000000000000000000..cdcf7738ee42b52ec3a6d48fd3c229bf24267b86
GIT binary patch
literal 206
zcmZQ@;1!ngwRH3hs$&EK22`K~;wtn0|Nnm*5dZ(*H*5Lk|7UJK{RHOy|8Ih-e871C
D4Ko>u
literal 0
HcmV?d00001
diff --git a/colors/red_spectral_width.clr b/colors/red_spectral_width.clr
new file mode 100644
index 0000000000000000000000000000000000000000..7b8a19c8f863436f9ec651640364641a00dcfad2
GIT binary patch
literal 236
zcmV}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq}2SXo+ITwPsWUtnQk
zV`OD!XJ~0^Yiw<9Zf|gLa&vTbc6WGrdV73*et&;}fr5jCg@%WSiHeJijgF6ykdcy;
zl$Dm3n3Lo_tE{cAuduPQva__cwzs&sy1Tr+zQ4f1!o$PF
m#m2|T$;!*j&Cbuz(bCh@)YaD4*xB0K+}+;a;Njxq
+#include
+#include "rsl.h"
+
+extern int radar_verbose_flag;
+
+/*************************************************************/
+/* */
+/* RSL_free_slice */
+/* */
+/*************************************************************/
+void RSL_free_slice(Slice *slice)
+{
+ /* Frees memory allocated to a slice structure, and associated
+ pointer and data arrays.
+ */
+
+ if (slice != NULL)
+ {
+ if (slice->data != NULL)
+ {
+ if (slice->data[0] != NULL)
+ free(slice->data[0]); /* Free the 2D data array. */
+ free(slice->data); /* Free the vector of pointers. */
+ }
+ free(slice); /* Free the slice structure. */
+ }
+}
+
+/*************************************************************/
+/* */
+/* RSL_new_slice */
+/* */
+/*************************************************************/
+Slice *RSL_new_slice(int nrows, int ncols)
+{
+ /* Allocates memory for a slice structure, and associated pointer
+ and data arrays.
+ */
+ Slice *s;
+ Slice_value *data;
+ int row;
+
+ /* Allocate a slice. */
+ s = (Slice *)calloc(1, sizeof(Slice));
+ if (s == NULL) perror("RSL_new_slice");
+ /* Allocate a vector of 'nrows' pointers. */
+ s->data = (Slice_value **)calloc(nrows, sizeof(Slice_value *));
+ if (s->data == NULL) perror("RSL_new_slice");
+ /* Allocate a 2 dimensional array for the actual data values. */
+ data = (Slice_value *)calloc(nrows*ncols, sizeof(Slice_value));
+ if (data == NULL) perror("RSL_new_slice");
+ /* Fill all the 'nrows' pointer slots created above. */
+ for (row=0; rowdata[row] = data + row*ncols;
+
+ return(s);
+}
+
+/*************************************************************/
+/* */
+/* RSL_new_cube */
+/* */
+/*************************************************************/
+Cube *RSL_new_cube(int ncarpi)
+{
+ /* Allocate memory for a cube structure, and an associated array
+ of carpi pointers.
+ */
+ Cube *cube;
+
+ cube = (Cube *) calloc(1, sizeof(Cube));
+ if (cube == NULL) return(NULL);
+ cube->carpi = (Carpi **) calloc(ncarpi, sizeof(Carpi *));
+ if (cube->carpi == NULL) return(NULL);
+ return(cube);
+}
+
+/*************************************************************/
+/* */
+/* RSL_free_cube */
+/* */
+/*************************************************************/
+void RSL_free_cube(Cube *cube)
+{
+ /* Frees memory allocated to a cube structure and associated
+ carpi structures.
+ */
+ int j;
+
+ if (cube != NULL)
+ {
+ if (cube->carpi != NULL)
+ {
+ for (j=0; jnz; j++)
+ if (cube->carpi[j] != NULL)
+ RSL_free_carpi(cube->carpi[j]);
+ free(cube->carpi);
+ }
+ free(cube);
+ }
+}
+
+/*************************************************************/
+/* */
+/* RSL_volume_to_cube */
+/* */
+/*************************************************************/
+Cube *RSL_volume_to_cube(Volume *v, float dx, float dy, float dz,
+ int nx, int ny, int nz, float grnd_r,
+ int radar_x, int radar_y, int radar_z)
+/* radar_z = 0 is the only thing that makes sense. Why pass it? */
+{
+ float lat=0;
+ float lon=0;
+ int i;
+ Cube *cube;
+
+ if (v == NULL) return NULL;
+ /* check validity of radar site coordinates in cube. */
+ if (radar_z != 0) return NULL;
+ if ((radar_x < 0) || (radar_x > nx)) return NULL;
+ if ((radar_y < 0) || (radar_y > ny)) return NULL;
+
+ cube = (Cube *)RSL_new_cube(nz);
+ if (cube == NULL) return NULL;
+
+ cube->nx = nx;
+ cube->ny = ny;
+ cube->nz = nz;
+ cube->dx = dx;
+ cube->dy = dy;
+ cube->dz = dz;
+ if (v->h.type_str != (char *) NULL)
+ cube->data_type = (char *)strdup(v->h.type_str);
+ cube->lat = lat;
+ cube->lon = lon;
+
+ /* Create nz carpis */
+ for (i=0; icarpi[i] = (Carpi *)RSL_volume_to_carpi(v, (i+1)*dz, grnd_r,
+ dx, dy, nx, ny,
+ radar_x, radar_y,
+ lat, lon);
+ return cube;
+}
+
+/*************************************************************/
+/* */
+/* RSL_get_slice_from_cube */
+/* */
+/*************************************************************/
+Slice *RSL_get_slice_from_cube(Cube *cube, int x, int y, int z)
+/*
+ Check validity of parameters x,y,z , which define the plane of the
+ required slice. Two of the three parameters must equal -1 and the
+ third must be nonnegative; eg, the vertical plane y=100 is
+ specified by the parameters x=-1, y=100, z=-1
+
+ Assumes valid ranges for x, y, z are:
+ 0 <= x <= nx-1 , 0 <= y <= ny-1 , 1 <= z <= nz
+ The range of z starts at 1 , since a cappi (or carpi) at
+ height z=0 makes no sense.
+*/
+{
+ int i, j;
+ Slice *slice;
+
+ if (cube == NULL) return(NULL);
+
+ /* Slice defined by the plane y = const */
+ if ((x == -1) && (z == -1) && (y > -1) && (y < cube->ny))
+ {
+ slice = (Slice *) RSL_new_slice(cube->nz, cube->nx);
+ slice->data_type = (char *)strdup(cube->data_type);
+ slice->dx = cube->dx;
+ slice->dy = cube->dz;
+ slice->nx = cube->nx;
+ slice->ny = cube->nz;
+ slice->f = cube->carpi[0]->f;
+ slice->invf = cube->carpi[0]->invf;
+ /* Retrieve the required data values from the cube and place into
+ the slice structure. */
+ for (j=0; jnz; j++)
+ for (i=0; inx; i++)
+ slice->data[j][i] = (Slice_value) cube->carpi[j]->data[y][i];
+ }
+
+
+ /* Slice defined by the plane x = const */
+ else if ((y == -1) && (z == -1) && (x > -1) && (x < cube->nx))
+ {
+ slice = (Slice *) RSL_new_slice(cube->nz, cube->ny);
+ slice->data_type = (char *)strdup(cube->data_type);
+ slice->dx = cube->dy;
+ slice->dy = cube->dz;
+ slice->nx = cube->ny;
+ slice->ny = cube->nz;
+ slice->f = cube->carpi[0]->f;
+ slice->invf = cube->carpi[0]->invf;
+ /* Retrieve the required data values from the cube and place into
+ the slice structure. */
+ for (j=0; jnz; j++)
+ for (i=0; iny; i++)
+ slice->data[j][i] = (Slice_value) cube->carpi[j]->data[i][x];
+ }
+
+
+ /* Want slice defined by the plane z = const ; ie, a carpi */
+ else if ((x == -1) && (y == -1) && (z > 0) && (z <= cube->nz))
+ {
+ slice = (Slice *) RSL_new_slice(cube->ny, cube->nx);
+ slice->data_type = (char *)strdup(cube->data_type);
+ slice->dx = cube->dx;
+ slice->dy = cube->dy;
+ slice->nx = cube->nx;
+ slice->ny = cube->ny;
+ slice->f = cube->carpi[z-1]->f;
+ slice->invf = cube->carpi[z-1]->invf;
+ /* Just copy carpi data values into slice structure. */
+ for (j=0; jny; j++)
+ for (i=0; inx; i++)
+ slice->data[j][i] = (Slice_value) cube->carpi[z-1]->data[j][i];
+ }
+
+
+ else /* Invalid parameters. */
+ {
+ if (radar_verbose_flag)
+ {
+ fprintf(stderr,"\nRSL_get_slice_from_cube(): passed invalid parameters\n");
+ fprintf(stderr,"nx:%d ny:%d nz:%d x:%d y:%d z:%d\n",cube->nx,
+ cube->ny,cube->nz,x,y,z);
+ }
+ return(NULL);
+ }
+
+ return(slice);
+}
diff --git a/doc/Example_RSL_copy.html b/doc/Example_RSL_copy.html
new file mode 100644
index 0000000..94736ff
--- /dev/null
+++ b/doc/Example_RSL_copy.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+#include "rsl.h"
+
+main()
+{
+Radar *radar;
+Volume *dz_copy;
+Sweep *s1_copy;
+Ray r33_copy;
+
+radar = RSL_wsr88d_to_radar("nex.file.2", "KMLB");
+
+/* Copy of Volume for DZ. */
+dz_copy = RSL_copy_volume(radar->v[DZ_INDEX]);
+
+/* Copy of Sweep 1. */
+s1_copy = RSL_copy_sweep(dz_copy->sweep[0]);
+
+/* Copy of Ray 33. */
+r33_copy = RSL_copy_ray(s1_copy->ray[32]);
+}
+
+
+
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..6acc059
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,12 @@
+AUTOMAKE_OPTIONS = foreign
+
+docdir = $(prefix)/doc/$(PACKAGE)
+doc_DATA = *.html *.gif *.jpg
+
+EXTRA_DIST = $(doc_DATA) *.fig
+
+install-exec-hook:
+ -mkdir $(prefix)/doc
+ -mkdir $(docdir)
+ $(INSTALL) -m 444 ../README $(docdir)
+ $(INSTALL) -m 444 ../CHANGES $(docdir)
diff --git a/doc/RSL_Er_loc_struct.html b/doc/RSL_Er_loc_struct.html
new file mode 100644
index 0000000..f62bfe3
--- /dev/null
+++ b/doc/RSL_Er_loc_struct.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+typedef struct
+{
+float elev; /* elevation angle */
+float srange; /* slant range !!! */
+}
+Er_loc;
+
+
diff --git a/doc/RSL_add_dbz_offset.html b/doc/RSL_add_dbz_offset.html
new file mode 100644
index 0000000..813bb41
--- /dev/null
+++ b/doc/RSL_add_dbz_offset.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+RSL_add_dbz_offset...
+
+
+
+Synopsis
+#include "rsl.h"
+
void RSL_add_dbz_offset_to_ray(Ray *r, float dbz_offset);
+
void RSL_add_dbz_offset_to_sweep(Sweep *s, float dbz_offset);
+
void RSL_add_dbz_offset_to_volume(Volume *v, float dbz_offset);
+
+
+
+Description
+
+RSL_add_dbz_offset_to_ray Adds a calibration factor 'dbz_offset' to a ray's range bins
+containing valid values. Valid values are those other than NOECHO.
+
+
+ RSL_add_dbz_offset_to_sweep Calls RSL_add_dbz_offset_to_ray for each ray in the sweep.
+
+
+ RSL_add_dbz_offset_to_volume Calls RSL_add_dbz_offset_to_sweep for each sweep in the volume.
+
+
+
+Return value
+None.
+
+
+
+
+Author: Mike Kolander.
+
+
diff --git a/doc/RSL_allocate_histogram.html b/doc/RSL_allocate_histogram.html
new file mode 100644
index 0000000..4748290
--- /dev/null
+++ b/doc/RSL_allocate_histogram.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+RSL_allocate_histogram
+
+
+
+Synopsis
+#include "rsl.h"
+Histogram *RSL_allocate_histogram(int low, int hi);
+
+
+Description
+Allocate space for the structure Histogram. low and hi specify the low and high dBZ bin values. The bin spacing is 1 dBZ.
+
+
+Return value
+Upon successful completion, Vallocate_histogram returns a pointer to the structure Histogram. Otherwise, NULL is returned and errno is set.
+
Author: David B. Wolff
+
diff --git a/doc/RSL_anyformat_to_radar.html b/doc/RSL_anyformat_to_radar.html
new file mode 100644
index 0000000..880f339
--- /dev/null
+++ b/doc/RSL_anyformat_to_radar.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+ Title
+
+
+
+
+
+
+
+
+RSL_anyformat_to_radar
+
+
+
+Synopsis
+#include "rsl.h"
+
Radar *RSL_anyformat_to_radar(char
+*infile [, char *callid_or_first_file]);
+
+
+
+Description
+Reads radar input files. The format of the input file is automatically
+determined by using magic numbers. The input file may be compressed (with
+old unix compress or GNU gzip) and the magic numbers are
+obtained by passing the data through the GNU gzip decompression
+filter. Magic numbers are standard for the following file formats and,
+thus, are recognized by RSL_anyformat_to_radar:
+
+WSR-88D (NEXRAD)
+
HDF (TSDIS format)
+
LASSEN (version 1.3 and version 1.4 files)
+
Universal Format (UF)
+
NSIG (SIGMET version 1 and version 2 raw product files)
+
MCGILL
+
RSL output format
+
RAPIC (Berrimah Austrailia)
+
RADTEC (SPANDAR, requires PKWARE compression tools)
+
EDGE
+
DORADE
+
For TOGA and KWAJALEIN files, there is no standard magic information
+available. It may not be possible for RSL_anyformat_to_radar to recognize
+them. The optional second argument is valid for reading wsr88d files. See
+RSL_wsr88d_to_radar.
+Once the file type is determined, the appropriate ingest routine is called.
+
In order to reduce the memory requirements during ingest, you can call
+RSL_select_fields
+to specify the field types. For instance, you can select to read only DZ
+from the input file. The input file may contain other fields, but, they
+will be ignored.
+
PKWARE compression tools are required for the RADTEC module. The
+data has been
+
compressed with implode and must be uncompressed with explode
+.
+
+
+
+Return value
+Upon successful completion, RSL_anyformat_to_radar returns a pointer to
+the structure Radar. Otherwise, NULL is returned.
+
+
+
+See also
+RSL_wsr88d_to_radar, RSL_lassen_to_radar
+,
+RSL_read_radar,
+RSL_uf_to_radar
+,
+RSL_toga_to_radar,
+RSL_nsig_to_radar
+,
+RSL_nsig2_to_radar,
+RSL_mcgill_to_radar
+RSL_kwaj_to_radar,
+RSL_rapic_to_radar
+,
+RSL_radtec_to_radar.
+
+
+Author: John H. Merritt.
+
+
diff --git a/doc/RSL_area_of_ray.html b/doc/RSL_area_of_ray.html
new file mode 100644
index 0000000..9946085
--- /dev/null
+++ b/doc/RSL_area_of_ray.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_area_of_ray
+
+
+
+Synopsis
+#include "rsl.h"
+float RSL_area_of_ray(Ray *r, float lo, float hi, float min_range, float max_range);
+
+
+
Description
+Compute the volumetric area of a sweep given a range of dBZ, a minimum range and a maximum range in km. Ranges are specified in km. lo and hi are the minimum and maximum dBZ values within which the fractional area is computed. The name of this routine is unfortunately misleading. The area is really a volume. The total volume for pixels present within the range of lo to hi is computed and returned. This routine is used by the routine RSL_fractional_area_of_sweep.
+
+
+Return value
+Upon successful completion, a valid floating point number is returned.
+
+
+See also
+RSL_fractional_area_of_sweep
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_azimuth_hash_struct.html b/doc/RSL_azimuth_hash_struct.html
new file mode 100644
index 0000000..c945b18
--- /dev/null
+++ b/doc/RSL_azimuth_hash_struct.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+typedef struct _azimuth_hash {
+ Ray *ray;
+ struct _azimuth_hash *next,*ray_high,*ray_low;
+} Azimuth_hash;
+
diff --git a/doc/RSL_bscan.html b/doc/RSL_bscan.html
new file mode 100644
index 0000000..4c98b6a
--- /dev/null
+++ b/doc/RSL_bscan.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+RSL_bscan_...
+
+
+
+Synopsis
+#include "rsl.h"
+void RSL_bscan_ray(Ray *r, FILE *fp);
+void RSL_bscan_sweep(Sweep *s, char *outfile);
+void RSL_bscan_volume(Volume *v, char *basename);
+
+
+
Description
+Output image format is PPM. If basename is "bscan", RSL_bscan_volume outputs filenames bscan.01.gif, bscan.02.gif, etc. as PPM images. These are simple ray dumps; aka, B-SCANS. The output file is specified as the outfile parameter to RSL_bscan_sweep. These routines assume the color table has been loaded, otherwise you will get a black image. The output image dimensions are nbins by nrays which are determined from sweep and first-ray-of-the-sweep header information.
+
+
+Return value
+None.
+
+
+See also
+RSL_sweep_to_gif, RSL_sweep_to_pict, RSL_sweep_to_pgm, RSL_sweep_to_ppm,
+RSL_load_color_table, RSL_load_green_table, RSL_load_red_table, RSL_load_blue_table,
+RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_cappi_at_h.html b/doc/RSL_cappi_at_h.html
new file mode 100644
index 0000000..3156f63
--- /dev/null
+++ b/doc/RSL_cappi_at_h.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_cappi_at_h
+
+
+
+Synopsis
+#include "rsl.h"
+Cappi *RSL_cappi_at_h(Volume *v, float h, float max_range);
+
+
+
Description
+Produce a Constant Altitude PPI at h out to the maximum ground range max_range. h and max_range are expressed in km. Memory is allocated using the system calloc routine. A Sweep structure is used to store the data of the cappi. Thus, it is easy to make images by using RSL_sweep_to_gif.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.
+
+
+See also
+RSL_free_cappi, RSL_cappi_to_carpi.
+
+
+
Author: John H. Merritt
+
diff --git a/doc/RSL_cappi_struct.html b/doc/RSL_cappi_struct.html
new file mode 100644
index 0000000..5b44c01
--- /dev/null
+++ b/doc/RSL_cappi_struct.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+typedef struct {
+ int month; /* Begin time for this Cappi; month (1-12). */
+ int day; /* Begin time for this Cappi; day (1-31). */
+ int year; /* Begin time for this Cappi; year (eg. 1993). */
+ int hour; /* Begin date for this Cappi; hour (0-23). */
+ int minute; /* Begin date for this Cappi; minute (0-59).*/
+ float sec; /* Begin date for this Cappi; second + fraction of second. */
+ float height; /* Height for this Cappi. */
+ float lat;
+ float lon; /* Lat/lon of lower left corner of Carpi. */
+ int field_type;
+ char radar_type[50]; /* Value of Constant radar->h.radar_type */
+ int interp_method; /* ??? string describing interpolation method. */
+ Er_loc *loc; /* elevation and range coordinate array */
+ Sweep *sweep; /* Pointers to rays of data */
+} Cappi;
+
+
diff --git a/doc/RSL_cappi_to_carpi.html b/doc/RSL_cappi_to_carpi.html
new file mode 100644
index 0000000..65859be
--- /dev/null
+++ b/doc/RSL_cappi_to_carpi.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_cappi_to_carpi
+
+
+
+Synopsis
+#include "rsl.h"
+Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy, float lat, float lon, int nx, int ny, int radar_x, int radar _y);
+
+
+
Description
+Produce a Constant Altitude Rectangular from Polar Image at h out to the maximum ground range grnd_range. h and grnd_range are expressed in km. The dimensions of the Carpi are given by nx and ny. radar_x and radar_y are the location of the radar within the Carpi structure (the rectangular grid). lat and lon represent the lower left corner (SE) of the rectangular grid. The routine allocates space for the resulting Carpi.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.
+
+
+See also
+RSL_free_cappi, RSL_volume_to_carpi, Carpi, Cappi, RSL_new_cappi.
+
+
+
Author: Mike Kolander
+
diff --git a/doc/RSL_carpi_struct.html b/doc/RSL_carpi_struct.html
new file mode 100644
index 0000000..aa2b388
--- /dev/null
+++ b/doc/RSL_carpi_struct.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+typedef struct {
+ int month; /* (1-12). */
+ int day; /* (1-31). */
+ int year; /* (eg. 1993). */
+ int hour; /* (0-23). */
+ int minute; /* (0-59).*/
+ float sec; /* second + fraction of second. */
+ float dx, dy; /* Size of cell in km. */
+ int nx, ny; /* Number of cells. */
+ int radar_x, radar_y; /* Location of center of radar. */
+ float height; /* Height of this Carpi. */
+ float lat, lon; /* Lat/lon of lower left corner of Carpi. */
+ char radar_type[50]; /* Radar types. */
+ int field_type; /* Same as for Radar. */
+ int interp_method; /* ??? string describing interpolation method. */
+ float (*f)(Carpi_value x); /* Data conversion function. f(x). */
+ Carpi_value (*invf)(float x); /* Data conversion function. invf(x). */
+ Carpi_value **data; /* data[ny][nx] */
+} Carpi;
+
+
diff --git a/doc/RSL_carpi_value.html b/doc/RSL_carpi_value.html
new file mode 100644
index 0000000..6b83837
--- /dev/null
+++ b/doc/RSL_carpi_value.html
@@ -0,0 +1,8 @@
+
+
+
+
+t
+
+ypedef Range Carpi_value;
+
diff --git a/doc/RSL_carpi_value_struct.html b/doc/RSL_carpi_value_struct.html
new file mode 100644
index 0000000..6b83837
--- /dev/null
+++ b/doc/RSL_carpi_value_struct.html
@@ -0,0 +1,8 @@
+
+
+
+
+t
+
+ypedef Range Carpi_value;
+
diff --git a/doc/RSL_clear.html b/doc/RSL_clear.html
new file mode 100644
index 0000000..ab8e55d
--- /dev/null
+++ b/doc/RSL_clear.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+RSL_clear_...
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_clear_ray(Ray *r);
+Sweep *RSL_clear_sweep(Sweep *s);
+Volume *RSL_clear_volume(Volume *v);
+
+
+
Description
+RSL_clear_volume calls RSL_clear_sweep for the number of sweeps. RSL_clear_sweep calls RSL_clear_ray for the number of rays. And RSL_clear_ray clears the array of Range of size nbins. All header information is preserved. This may or may not be a desired capability.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned.
+
+
+See also
+Example
+RSL_free_volume, RSL_free_sweep, RSL_free_ray
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_color_table.html b/doc/RSL_color_table.html
new file mode 100644
index 0000000..040089d
--- /dev/null
+++ b/doc/RSL_color_table.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+RSL_get_color_table
+RSL_set_color_table
+
+
+
+
+
+
+Synopsis
+#include "rsl.h"
+
void RSL_get_color_table(int icolor, char buffer[256], int *ncolors)
+
void RSL_set_color_table(int icolor, char buffer[256], int ncolors)
+
+
+
Description
+RSL_get_color_table: Given a color table index, one of RSL_RED_TABLE,
+RSL_GREEN_TABLE or RSL_BLUE_TABLE, return up to 256 color
+indexes each containing the color intensity for that color at each index.
+The number of colors in the table is indicated in *ncolors.
+RSL_set_color_table: Given a color table index icolor, one of
+RSL_RED_TABLE, RSL_GREEN_TABLE or RSL_BLUE_TABLE,
+and a character buffer, at most 256 color indexes long, and the number
+of indexes in the character buffer, set the color table. Each color
+index in buffer contains the color intensity for that color.
+Range of color intensities is 0 to 255.
+
You must make three calls to both the get and set functions to change
+the entire color table entry for a particular index. For example,
+to change the 5th index of the color table to cyan (Red=0, Green=255,
+Blue=255), perform the following (provided a color table is already loaded):
+
char r[256], g[256], b[256];
+
RSL_get_color_table(RSL_RED_TABLE, r, &ncolors);
+
RSL_get_color_table(RSL_GREEN_TABLE, g, &ncolors);
+
RSL_get_color_table(RSL_BLUE_TABLE, b, &ncolors);
+
r[4] = (char)0; /* [4] is the 5-th index */
+
g[4] = (char)255;
+
b[4] = (char)255;
+
RSL_set_color_table(RSL_RED_TABLE, r, ncolors);
+
RSL_set_color_table(RSL_GREEN_TABLE, g, ncolors);
+
RSL_set_color_table(RSL_BLUE_TABLE, b, ncolors);
+
+
+
+
+
+Return value
+None.
+
+
+See also
+RSL_rebin_velocity_ray, RSL_rebin_velocity_sweep,
+RSL_rebin_velocity_volume,
+
RSL_sweep_to_gif, RSL_sweep_to_pict,
+Vsweep_to_pgm,
+Vsweep_to_ppm,
+
RSL_load_color_table, RSL_load_green_table,
+RSL_load_red_table,
+RSL_load_blue_table,
+
RSL_load_refl_color_table,
+RSL_load_sw_color_table,
+RSL_load_vel_color_table,
+
RSL_volume_to_gif, RSL_volume_to_pict,
+RSL_volume_to_pgm,
+RSL_volume_to_ppm.
+
+Author: John H. Merritt
+
+
diff --git a/doc/RSL_copy.html b/doc/RSL_copy.html
new file mode 100644
index 0000000..7a182a8
--- /dev/null
+++ b/doc/RSL_copy.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+RSL_copy_...
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_copy_ray(Ray *r);
+Sweep *RSL_copy_sweep(Sweep *s);
+Volume *RSL_copy_volume(Volume *v);
+
+
+
Description
+RSL_copy_volume calls RSL_copy_sweep for the number of sweeps. RSL_copy_sweep calls RSL_copy_ray for the number of rays. And RSL_copy_ray copies the array of Range of size nbins. All header information is preserved. This may or may not be a desired capability.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned.
+
+
+See also
+Example
+RSL_free_volume, RSL_free_sweep, RSL_free_ray
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_copyright.html b/doc/RSL_copyright.html
new file mode 100644
index 0000000..6d0d85a
--- /dev/null
+++ b/doc/RSL_copyright.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NASA/TRMM, Code 910.1.
+ This is the TRMM Office Radar Software Library.
+ Copyright (C) 1996-1999
+ John H. Merritt
+ Space Applications Corporation
+ Vienna, Virginia
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+
diff --git a/doc/RSL_cube_struct.html b/doc/RSL_cube_struct.html
new file mode 100644
index 0000000..13668bd
--- /dev/null
+++ b/doc/RSL_cube_struct.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+typedef struct
+ {
+ float lat, lon;
+ float dx, dy, dz;
+ int nx, ny, nz;
+ char *data_type;
+ Carpi **carpi;
+ }
+Cube;
+
+
diff --git a/doc/RSL_edge_to_radar.html b/doc/RSL_edge_to_radar.html
new file mode 100644
index 0000000..9441cbe
--- /dev/null
+++ b/doc/RSL_edge_to_radar.html
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+RSL_edge_to_radar
+
+
+
+Synopsis
+#include "rsl.h"
+
Radar *RSL_edge_to_radar(char
+*infile);
+
+
+Description
+Reads the EDGE format and returns a pointer to the structure
+Radar.
+The input file is specified by the string infile. If infile
+is NULL, then stdin is read. The input file may be compressed. If the data
+is compressed, it is passed through the GNU gunzip filter. Thus,
+compressed data can be any format that gzip understands. However,
+the EDGE format uses the lzw compression and requires a supporting
+library to decode the file. The supporting library is called ETOR
+and is distributed separately, since it is not free software. Contact
+Enterprise Electronics Corporation to obtain the ETOR library that decodes
+the EDGE format.
+ Enterprise Electronics Corporation, Enterprise,
+Alabama, USA 36330 (334) 347-3478.
+
+
+
+Return value
+Upon successful completion, RSL_edge_to_radar returns a pointer to the
+structure Radar. Otherwise, NULL is returned and errno is set.
+
+
+See also
+RSL_anyformat_to_radar
+
+Author: Don Burrows @ Enterprise Electronics Corporation
+
+
diff --git a/doc/RSL_enum_sorted_type.html b/doc/RSL_enum_sorted_type.html
new file mode 100644
index 0000000..21a18e6
--- /dev/null
+++ b/doc/RSL_enum_sorted_type.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+enum Sorted_type { NOT_SORTED, SORTED_BY_ANGLE, SORTED_BY_TIME};
+
diff --git a/doc/RSL_fill_cappi.html b/doc/RSL_fill_cappi.html
new file mode 100644
index 0000000..b27b10c
--- /dev/null
+++ b/doc/RSL_fill_cappi.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_fill_cappi
+
+
+
+Synopsis
+#include "rsl.h"
+int *RSL_fill_cappi(Volume *v, Cappi *cap, int method);
+
+
+
Description
+Using data from v, and information from cap, this routine fill the cappi structure cap with values from the rays in v. The argument cap is modified. The method passed indicates the interpolation used, however, no interpolation is used, yet. Normally, you should not call this routine unless you're writing an RSL routine, instead, call RSL_cappi_at_h.
+
+
+Return value
+Upon successful completion, 1 is returned. -1 is returned upon failure. The argument cap is modified.
+
+
+See also
+RSL_free_cappi, RSL_cappi_to_carpi, RSL_get_value_from_cappi, RSL_new_cappi
+
+
+
Author: John H. Merritt
+
diff --git a/doc/RSL_find_rng_azm.html b/doc/RSL_find_rng_azm.html
new file mode 100644
index 0000000..dc026b2
--- /dev/null
+++ b/doc/RSL_find_rng_azm.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+RSL_find_rng_azm
+
+
+Synopsis
+#include "rsl.h"
+void RSL_find_rng_azm(float *r, float *ang, float x, float y);
+
+
+
Description
+Convert Cartesian coords (x, y) to polar (rng,angle); 0<angle<360.
+
+
+Return value
+None.
+
+
+See also
+
+
Author: Mike Kolander
+
diff --git a/doc/RSL_fix_time.html b/doc/RSL_fix_time.html
new file mode 100644
index 0000000..8defa7c
--- /dev/null
+++ b/doc/RSL_fix_time.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+RSL_fix_time
+
+
+
+Synopsis
+#include "rsl.h"
+
void RSL_fix_time(Ray *ray);
+
+
+Description
+Fixes possible overflow values in month, day, year,
+hh, mm, ss. Normally, ss should be the
+overflow. This code ensures end of month, year
+and century are handled correctly by using the Unix time(2) functions.
+
+
+
+Return value
+None.
+
+
+
+See also
+mktime(3)
+
+
+
+Author: John H. Merritt.
+
+
diff --git a/doc/RSL_fraction_of.html b/doc/RSL_fraction_of.html
new file mode 100644
index 0000000..ce5b4e2
--- /dev/null
+++ b/doc/RSL_fraction_of.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_fraction_of...
+
+
+
+Synopsis
+#include "rsl.h"
+float RSL_fraction_of_ray(Ray *r, float lo, float hi, float range);
+float RSL_fraction_of_sweep(Sweep *s, float lo, float hi, float range);
+float RSL_fraction_of_volume(Volume *v, float lo, float hi, float range);
+
+
+
Description
+Compute the fraction of the Volume, Sweep, or Ray that contain values between lo and hi out to the range range. This is just a percentage.
+
+
+Return value
+Upon successful completion, a valid floating point number is returned.
+
+
+See also
+
+
Author: John H. Merritt
+
diff --git a/doc/RSL_fractional_area_of_sweep.html b/doc/RSL_fractional_area_of_sweep.html
new file mode 100644
index 0000000..7a28d45
--- /dev/null
+++ b/doc/RSL_fractional_area_of_sweep.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_fractional_area_of_sweep
+
+
+
+Synopsis
+#include "rsl.h"
+float RSL_fractional_area_of_sweep(Sweep *s, float lo, float hi, float min_rng, float max_rng);
+
+
+
Description
+Computes the fractional area, of dBz values, between lo and hi, from min_rng to max_rng. This is the fractional area of the 360 degrees. The algorithm used is to compute conic volumes based on beam width and range of the pixels. The routine RSL_area_of_ray computes these volumes. The name of that routine is unfortunate.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, NULL is returned.
+
+
+See also
+RSL_area_of_ray, RSL_fraction_of_sweep.
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_free.html b/doc/RSL_free.html
new file mode 100644
index 0000000..49b732c
--- /dev/null
+++ b/doc/RSL_free.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+RSL_free_...
+
+
+
+Synopsis
+#include "rsl.h"
+void RSL_free_ray(Ray *r);
+void RSL_free_sweep(Sweep *s);
+void RSL_free_volume(Volume *v);
+
+
+
Description
+RSL_free_volume calls RSL_free_sweep for the number of sweeps, then frees the array of Sweep pointers, then frees itself. RSL_free_sweep calls RSL_free_ray for the number of rays, then frees the array of Ray pointers, then frees itself. Finally, RSL_free_ray frees the array of Range, then frees itself. Checks are made that non NULL pointers are freed.
+
+
+Return value
+None.
+
+
+See also
+RSL_clear_volume, RSL_clear_sweep, RSL_clear_ray.
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_free_cappi.html b/doc/RSL_free_cappi.html
new file mode 100644
index 0000000..a2de9b5
--- /dev/null
+++ b/doc/RSL_free_cappi.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
RSL_free_cappi
+
+
+Synopsis
+
+#include "rsl.h"
+void RSL_free_cappi(Cappi *c);
+
+
+
+
Description
+
+Free the data structure Cappi, previously allocated via RSL_new_cappi,
+from memory.
+
+
+Return value
+
+None.
+
+
+See also
+
+RSL_new_cappi, RSL_cappi_to_carpi.
+
+
+
+Author: John H. Merritt
+
+
+
diff --git a/doc/RSL_free_histogram.html b/doc/RSL_free_histogram.html
new file mode 100644
index 0000000..2f87c06
--- /dev/null
+++ b/doc/RSL_free_histogram.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+RSL_free_histogram
+
+
+
+
+Synopsis
+#include "rsl.h"
+void RSL_free_histogram(Histogram *histogram);
+
+
+Description
+Deallocate the structure pointed to by histogram. Space for the structure Histogram was previously obtained via RSL_allocate_histogram.
+
+
+Return value
+None.
+
Author: David B. Wolff
+
diff --git a/doc/RSL_free_radar.html b/doc/RSL_free_radar.html
new file mode 100644
index 0000000..d2526a9
--- /dev/null
+++ b/doc/RSL_free_radar.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+RSL_free_radar
+
+
+Synopsis
+#include "rsl.h"
+void RSL_free_radar(Radar *r);
+
+
+
Description
+Frees the space allocated to the Radar structure radar. It frees all substructures, Volume, Sweep, Ray, Range, by calling RSL_free_volume, RSL_free_sweep, RSL_free_ray respectively.
+
+
+Return value
+None.
+
+
+See also
+
+
RSL_free_volume, RSL_free_sweep, RSL_free_ray
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_closest_ray_from_sweep.html b/doc/RSL_get_closest_ray_from_sweep.html
new file mode 100644
index 0000000..5c2656d
--- /dev/null
+++ b/doc/RSL_get_closest_ray_from_sweep.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+RSL_get_closest_ray_from_sweep
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_get_closest_ray_from_sweep(Sweep *s,float ray_angle,float limit);
+
+
+
Description
+Return the closest ray within a sweep. Closeness is determined by the minimum absolute difference of ray_angle and the azimuth angle of the ray. The difference must be less than limit. If no such ray can be found, return NULL.
+
+
+Return value
+Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_ray, RSL_get_ray_from_sweep, RSL_get_ray_above, RSL_get_ray_below, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume.
+
+
+Author: Dennis Flanigan Jr.
+
+
diff --git a/doc/RSL_get_closest_sweep.html b/doc/RSL_get_closest_sweep.html
new file mode 100644
index 0000000..a6c0170
--- /dev/null
+++ b/doc/RSL_get_closest_sweep.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_get_closest_sweep
+
+
+
+Synopsis
+#include "rsl.h"
+Sweep *RSL_get_closest_sweep(Volume *v,float sweep_angle,float limit);
+
+
+
Description
+Return the closest sweep within a volume. Closeness is determined by the minimum absolute difference of sweep_angle and the elevation angle of the ray. The difference must be less than limit. If no such ray can be found, return NULL.
+
+
+Return value
+Upon successful completion, a pointer to the Sweep structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_sweep
+
+
+Author: Dennis Flanigan Jr.
+
diff --git a/doc/RSL_get_first_ray_of.html b/doc/RSL_get_first_ray_of.html
new file mode 100644
index 0000000..045cc49
--- /dev/null
+++ b/doc/RSL_get_first_ray_of.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+RSL_get_first_ray_of_...
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_get_first_ray_of_sweep(Sweep *s);
+Ray *RSL_get_first_ray_of_volume(Volume *v);
+
+
+
Description
+RSL_get_first_ray_of_sweep returns a pointer to the first ray pointer in the Sweep structure *s, if one exist. Otherwise NULL is returned. Similiarly, for RSL_get_first_ray_of_volume; it finds the first sweep and returns the first ray of that sweep.
+
+
+Return value
+Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_first_sweep_of_volume
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_first_sweep_of_volume.html b/doc/RSL_get_first_sweep_of_volume.html
new file mode 100644
index 0000000..a4db680
--- /dev/null
+++ b/doc/RSL_get_first_sweep_of_volume.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+RSL_get_first_sweep_of_volume
+
+
+
+Synopsis
+#include "rsl.h"
+Sweep *RSL_get_first_sweep_of_volume(Volume *v);
+
+
+
Description
+RSL_get_first_sweep_of_volume returns a pointer to the first sweep pointer in the Volume structure *v, if one exist. Otherwise NULL is returned.
+
+
+Return value
+Upon successful completion, a pointer to the Sweep structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_first_ray_of_sweep
+RSL_get_first_ray_of_volume
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_gr_slantr_h.html b/doc/RSL_get_gr_slantr_h.html
new file mode 100644
index 0000000..a65b3b6
--- /dev/null
+++ b/doc/RSL_get_gr_slantr_h.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_get_gr_slantr_h
+
+
+
+Synopsis
+#include "rsl.h"
+void RSL_get_gr_slantr_h(Ray *ray, int i, float *gr, float *slantr, float *h)
+
+
+
Description
+Given a Ray ray and the range index i, calculate the ground range, slant range, and height; gr, slantr and h respectively.
+
+
+Return value
+None.
+
+
+See also
+RSL_get_groundr_and_h
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_groundr_and_h.html b/doc/RSL_get_groundr_and_h.html
new file mode 100644
index 0000000..e557253
--- /dev/null
+++ b/doc/RSL_get_groundr_and_h.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+RSL_get_groundr_and_h
+
+
+Synopsis
+#include "rsl.h"
+void RSL_get_groundr_and_h(float slant_r, float elev, float *gr, float *h);
+
+
+
Description
+Given slant range, slant_r, and the elevation angle, elev, compute the ground range, gr, and height, h. Range and height units are in km. Angles are in degrees. This is the inverse fuction of RSL_get_slantr_and_elev.
+
+
+Return value
+None.
+
+
+See also
+RSL_get_slantr_and_elev, RSL_get_slantr_and_h
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_histogram_from.html b/doc/RSL_get_histogram_from.html
new file mode 100644
index 0000000..0dc9f1f
--- /dev/null
+++ b/doc/RSL_get_histogram_from.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+RSL_get_histogram_from_...
+
+
+
+Synopsis
+#include "rsl.h"
+Histogram *RSL_get_histogram_from_ray(Ray *ray, Histogram *histogram, int low, int hi, int min_range, int max_range);
+Histogram *RSL_get_histogram_from_sweep(Sweep *sweep, Histogram *histogram, int low, int hi, int min_range, int max_range);
+Histogram *RSL_get_histogram_from_volume(Volume *volume, Histogram *histogram, int low, int hi, int min_range, int max_range);
+
+
+Description
+Load histogram with the histogram from a Ray, Sweep, or Volume. If histogram is NULL, then space is automatically allocated by RSL_allocate_histogram. Notice that a histogram pointer is passed into the routines. The argument histogram is used as an accumulator. For instance, getting the histogram for an entire sweep involves getting the histogram for ray #1, then adding the histograms for ray #2 through #n. Although, the argument histogram is modified, a pointer to that histogram is returned so that the function interface, that is commonly used throughout the RSL, is maintained.
+
+
+Return value
+Upon successful completion, a pointer to Histogram is returned. NULL is returned if an error occurs and errno is set.
+
+
+See also
+RSL_read_histogram, RSL_write_histogram, RSL_print_histogram, RSL_free_histogram
+
+
+Author: David B. Wolff
+
diff --git a/doc/RSL_get_linear_value.html b/doc/RSL_get_linear_value.html
new file mode 100644
index 0000000..3f2d24b
--- /dev/null
+++ b/doc/RSL_get_linear_value.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_get_linear_value
+
+
+
+Synopsis
+#include "rsl.h"
+float RSL_get_linear_value(Volume *v, float srange, float azimuth, float elev, float limit);
+
+
+
+
+Description
+Find a linearly interpolated value in the Volume, v, at the polar coordinate specification (srange, azimuth, elev). The four surrounding data values that are azimuthally within +/- limit degrees are used for the interpolation. Limit is measured in degrees. Srange is the slant range in KM. Azimuth and elev are measured in degrees.
+
+
+Return value
+Upon successful completion, a valid floating point number is returned. Note, the value could be BADVAL.
+
+
+See also
+RSL_get_value
+
Author: Dennis Flanigan, Jr.
+
diff --git a/doc/RSL_get_next_cwise_ray.html b/doc/RSL_get_next_cwise_ray.html
new file mode 100644
index 0000000..2604bdd
--- /dev/null
+++ b/doc/RSL_get_next_cwise_ray.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+RSL_get_next_cwise_ray
+
+
+RSL_get_next_ccwise_ray
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_get_next_cwise_ray(Sweep *s, Ray *r);
+Ray *RSL_get_next_ccwise_ray(Sweep *s, Ray *r);
+
+
+
Description
+cwise, means clockwise and it is defined to mean "in the direction of increasing azimuth angle (don't ask)." ccwise means counter-clockwise and it is defined to mean "in the direction of decreasing azimuth angle." Dennis Flanigan defined cwise and ccwise.
+
+
+Return value
+Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_ray_from_sweep, RSL_get_ray_above, RSL_get_ray_below, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume.
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_nyquist_from_radar.html b/doc/RSL_get_nyquist_from_radar.html
new file mode 100644
index 0000000..5188433
--- /dev/null
+++ b/doc/RSL_get_nyquist_from_radar.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+RSL_get_nyquist_from_radar
+
+
+
+Synopsis
+#include "rsl.h"
+float RSL_get_nyquist_from_radar(Radar *radar)
+
+
+
+
Description
+Find a velocity volume. Find first sweep in that volume. Find first ray in that sweep. Return the nyquist velocity, a member of Ray.
+
+
+Return value
+Upon successful completion, a valid floating point number is returned.
+
+
+See also
+
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_range_of_range_index.html b/doc/RSL_get_range_of_range_index.html
new file mode 100644
index 0000000..7589bcf
--- /dev/null
+++ b/doc/RSL_get_range_of_range_index.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+RSL_get_range_of_range_index
+
+
+
+Synopsis
+#include "rsl.h"
+float RSL_get_range_of_range_index (Ray *ray, int index);
+
+
+
Description
+index represents the bin number of the Ray's range. The geographic range is calculated from the range of the first bin and the bin size.
+
+
+Return value
+Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.
+
+
+Author: Dennis Flanigan.
+
diff --git a/doc/RSL_get_ray.html b/doc/RSL_get_ray.html
new file mode 100644
index 0000000..7a97321
--- /dev/null
+++ b/doc/RSL_get_ray.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_get_ray
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_get_ray(Volume volume, float elev, float azimuth);
+
+
+
Description
+Extract a Ray from a Volume. Returns a pointer to a Ray. You must copy the Ray returned with RSL_copy_ray, if you want to modify the contents of the Ray without destroying the original Ray. elev is the elevation angle in degrees and is used to find the appropriate Sweep using the routine RSL_get_sweep. The azimuth angle within the appropriate Sweep must be within +/- 1/2 horizontal beam width of the target angle, azimuth.
+
+
+Return value
+Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_ray_from_sweep, RSL_get_ray_above, RSL_get_ray_below, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume.
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_ray_above-below.html b/doc/RSL_get_ray_above-below.html
new file mode 100644
index 0000000..6b1ead8
--- /dev/null
+++ b/doc/RSL_get_ray_above-below.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+RSL_get_ray_above
+RSL_get_ray_below
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_get_ray_above(Volume *v, Ray *current_ray);
+Ray *RSL_get_ray_below(Volume *v, Ray *current_ray);
+
+
+
+
+
Description
+Returns a Ray that is either above or below the current_ray. The elevation angle is extracted from the current_ray and 1.0 is added or subtracted to/from it and the function RSL_get_sweep is called. This algorithm is simple and may not be robust enough; it has already been inadequate for the GT quality control.
+
+
+Return value
+Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_ray_from_sweep, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume, RSL_get_ray, RSL_get_sweep.
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_ray_from_sweep.html b/doc/RSL_get_ray_from_sweep.html
new file mode 100644
index 0000000..7457a5a
--- /dev/null
+++ b/doc/RSL_get_ray_from_sweep.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_get_ray_from_sweep
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_get_ray_from_sweep(Sweep *s, float azim);
+
+
+
Description
+Return a pointer to a Ray that is in the Sweep *s, for the azimuth angle azim. The search is to find a ray that is within one beam width of the desired angle. The search is +/- 1/2 horizontal beam width.
+
+
+Return value
+Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_ray, RSL_get_ray_above, RSL_get_ray_below, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume.
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_slantr_and_elev.html b/doc/RSL_get_slantr_and_elev.html
new file mode 100644
index 0000000..834e0b5
--- /dev/null
+++ b/doc/RSL_get_slantr_and_elev.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+RSL_get_slantr_and_elev
+
+
+Synopsis
+#include "rsl.h"
+void RSL_get_slantr_and_elev(float gr, float h, float *slant_r, float *elev);
+
+
+
Description
+Given ground range, gr, and height, h, compute the slant range, slant_r and elevation angle, elev. Range and height units are in km. Angles are in degrees. This is the inverse function of RSL_get_groundr_and_h.
+
+
+Return value
+None.
+
+
+See also
+RSL_get_slantr_and_h, RSL_get_groundr_and_h
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_slantr_and_h.html b/doc/RSL_get_slantr_and_h.html
new file mode 100644
index 0000000..020a6f2
--- /dev/null
+++ b/doc/RSL_get_slantr_and_h.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+RSL_get_slantr_and_h
+
+
+Synopsis
+#include "rsl.h"
+void RSL_get_slantr_and_h(float gr, float elev, float *slant_r, float *h);
+
+
+
Description
+Given ground range, gr, and elevation angle, elev, compute the slant range, slant_r and height, h. Range and height units are in km. Angles are in degrees.
+
+
+Return value
+None.
+
+
+See also
+RSL_get_slantr_and_elev, RSL_get_groundr_and_h
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_slice_from_cube.html b/doc/RSL_get_slice_from_cube.html
new file mode 100644
index 0000000..f287e62
--- /dev/null
+++ b/doc/RSL_get_slice_from_cube.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+RSL_get_slice_from_cube
+
+
+
+Synopsis
+#include "rsl.h"
+Slice *RSL_get_slice_from_cube(Cube *cube, int x, int y, int z);
+
+
+
Description
+Given a Cube structure, extract one slice from it. x, y and z define the plane of the required slice. Two of the three parameters must equal -1 and the third must be nonnegative; eg, the vertical plane y=100 is specified by the parameters x=-1, y=100, z=-1. Assumes valid ranges for x, y, z are:
+0 <= x <= nx-1, 0 <= y <= ny-1, 1 <= z <= nz
+nx, ny and nz specify the dimensions of the cube structure and are members of it. The range of z starts at 1 , since a cappi (or carpi) at height z=0 makes no sense.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.
+
+
+See also
+RSL_volume_to_cube
+
+
+
Author: Mike Kolander
+
diff --git a/doc/RSL_get_sweep.html b/doc/RSL_get_sweep.html
new file mode 100644
index 0000000..a3cea6b
--- /dev/null
+++ b/doc/RSL_get_sweep.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+RSL_get_sweep
+
+
+
+Synopsis
+#include "rsl.h"
+Sweep *RSL_get_sweep(Volume *v, float elev);
+
+
+
Description
+Looks in Volume *v for a sweep that has an elevation angle +/- beam width vertically. If found, then that sweep pointer is returned, else NULL is returned.
+
+
+Return value
+Upon successful completion, a pointer to the Sweep structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_get_volume, RSL_get_ray, RSL_get_first_sweep_of_volume, RSL_get_ray_from_sweep,
+RSL_get_closest_sweep,
+RSL_get_next_closest_sweep
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_sweep_index_from_volume.html b/doc/RSL_get_sweep_index_from_volume.html
new file mode 100644
index 0000000..43f73b5
--- /dev/null
+++ b/doc/RSL_get_sweep_index_from_volume.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+RSL_get_sweep_index_from_volume
+
+
+
+Synopsis
+#include "rsl.h"
+int RSL_get_sweep_index_from_volume(Volume *v, float elev,int *next_closest);
+
+
+
Description
+Return the index of the closest sweep. Also, returns the next closest sweep index. Use the index returned, if called i, in v->sweep[i].
+
+
+Return value
+Upon successful completion, a valid index into the v->sweep[i] structure is returned. Otherwise, -1 is returned and *next_closest is undefined.
+
+
+See also
+RSL_get_sweep, RSL_get_ray
+
Author: Dennis Flanigan Jr.
+
diff --git a/doc/RSL_get_value.html b/doc/RSL_get_value.html
new file mode 100644
index 0000000..0dcc4d1
--- /dev/null
+++ b/doc/RSL_get_value.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+RSL_get_value...
+
+
+
+Synopsis
+#include "rsl.h"
+float RSL_get_value(Volume *v, float elev, float azimuth, float range);
+float RSL_get_value_at_h(Volume *v, float azim, float grnd_r, float h);
+float RSL_get_value_from_ray(Ray *ray, float r);
+float RSL_get_value_from_sweep(Sweep *s, float azim, float r);
+
+
+
+
+
+
Description
+RSL_get_value: Find a value in the Volume v using polar coordinate specification. The search returns the closest point. Although there is no restriction concerning azimuth values, other functions rely on the range being 0 to +360. This may change. Nexrad happened to use this range so I use it for now.
+
+RSL_get_value_at_h: Returns a value when the coordinate is specified by ground range and height. Both ground range and height are specified in km.
+
+
RSL_get_value_from_ray: Return a value for the slant range r. Basically, r is converted to an index based on the gate size.
+
+
Vget_value_from_sweep: Get a value from a Sweep, s, given the azimuth azim and range r.
+
+
+
+
+Return value
+Upon successful completion, a valid floating point number is returned. Note, the value could be BADVAL.
+
+
+See also
+
+
Author: John H. Merritt
+
diff --git a/doc/RSL_get_value_from_cappi.html b/doc/RSL_get_value_from_cappi.html
new file mode 100644
index 0000000..fea024b
--- /dev/null
+++ b/doc/RSL_get_value_from_cappi.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_get_value_from_cappi
+
+
+
+Synopsis
+#include "rsl.h"
+float *RSL_get_value_from_cappi(Cappi *cap, float rng, float azm);
+
+
+
Description
+This routine uses RSL_get_value_from_sweep to get the value.
+
+
+Return value
+Upon successful completion, a valid floating point number is returned. If no value can be found, BADVAL is returned.
+
+
+See also
+RSL_get_value_from_sweep
+
+
+
Author: John H. Merritt
+
diff --git a/doc/RSL_get_volume.html b/doc/RSL_get_volume.html
new file mode 100644
index 0000000..2095214
--- /dev/null
+++ b/doc/RSL_get_volume.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+RSL_get_volume
+
+
+
+Synopsis
+#include "rsl.h"
+Volume *RSL_get_volume(Radar *r, int type_wanted);
+
+
+
Description
+RSL_get_volume extracts the desired volume from the Radar *r. type_wanted can be one of: DZ_INDEX, VR_INDEX, SW_INDEX, CZ_INDEX, ZT_INDEX, DR_INDEX or LR_INDEX. Only the pointer is copied for the returned value. If you want to optain a seperate copy of the volume, from the Radar *r, for modification purposes, then use RSL_copy_volume. The different indexes are described as follows:
+
+ DZ Reflectivity (dBZ), may contain some DZ_INDEX
+ signal-processor level QC and/or
+ filters. This field would contain
+ Darwin's CZ, or WSR88D's standard
+ reflectivity. In other words, unless
+ the field is described otherwise, it
+ should always go here. In essence, this
+ is the "cleanest" reflectivity field
+ for a radar.
+
+ VR Radial Velocity (m/s) VR_INDEX
+
+ SW Spectral Width (m2/s2) SW_INDEX
+
+ CZ QC Reflectivity (dBZ), contains
+ post-processed QC'd data CZ_INDEX
+
+ ZT Total Reflectivity (dBZ) ZT_INDEX
+ May be uncommon, but important
+
+ DR Differential reflectivity DR_INDEX
+ DR and LR are for dual-polarization
+ radars only. Unitless or in dB.
+
+ LR Another form of differential ref LR_INDEX
+ called LDR, not sure of units
+
+
This function is a one line C function. Observe the following:
+
+Radar *radar;
+Volume *v;
+/* The following two lines are identical. */
+v = Vget_volume(radar, DZ_INDEX);
+v = radar->v[DZ_INDEX];
+
+
+
+Return value
+Upon successful completion, a pointer to the Volume structure is returned; only the pointer is copyied.
+
+
+See also
+RSL_get_sweep, RSL_get_ray
+RSL_copy_volume, RSL_copy_sweep, RSL_copy_ray
+RSL_free_volume, RSL_free_sweep, RSL_free_ray
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_get_win.html b/doc/RSL_get_win.html
new file mode 100644
index 0000000..e5019df
--- /dev/null
+++ b/doc/RSL_get_win.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+RSL_get_window_from_...
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_get_window_from_ray(Ray *r, float min_range, float max_range, float low_azim, float hi_azim);
+Sweep *RSL_get_window_from_sweep(Sweep *s, float min_range, float max_range, float low_azim, float hi_azim);
+Volume *RSL_get_window_from_volume(Volume *v, float min_range, float max_range, float low_azim, float hi_azim);
+Radar *RSL_get_window_from_radar(Radar *r, float min_range, float max_range, float low_azim, float hi_azim);
+
+
+
Description
+RSL_get_window_from_radar calls RSL_get_window_from_volume for the number of volumes. RSL_get_window_from_volume calls RSL_get_window_from_sweep for the number of sweeps. RSL_get_window_from_sweep calls RSL_get_window_from_ray for the number of rays. And RSL_get_window_from_ray gets window, between low_azim and hi_azim, from min_range to max_range.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned.
+
+
+See also
+Example
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_hash_table_struct.html b/doc/RSL_hash_table_struct.html
new file mode 100644
index 0000000..8d1fbde
--- /dev/null
+++ b/doc/RSL_hash_table_struct.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+typedef struct {
+ Azimuth_hash **indexes;
+ int nindexes;
+} Hash_table;
+
+
+
diff --git a/doc/RSL_hdf_to_radar.html b/doc/RSL_hdf_to_radar.html
new file mode 100644
index 0000000..ec6304f
--- /dev/null
+++ b/doc/RSL_hdf_to_radar.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+RSL_hdf_to_radar
+RSL_hdf_to_radar_unQC
+
+
+
+
+Synopsis
+
+#include "rsl.h"
+Radar *RSL_hdf_to_radar(char *infile);
+
+Radar *RSL_hdf_to_radar_unQC(char
+*infile);
+
+
+Description
+
+Reads an HDF file and returns a pointer to the structure Radar.
+The input file is specified by the string infile. If infile
+is NULL, then no action is taken. This is different from other ingest routines
+where stdin is read. HDF files cannot be stdin, because they require seeking..
+The input file may not be compressed.
+
+RSL_hdf_to_radar_unQC differs from RSL_hdf_to_radar in
+that both DZ (original uncorrected reflectivity) and CZ (corrected) volumes
+are extracted from the HDF file. Normally, RSL_hdf_to_radar
+returns CZ only. Call one or the other, for ingest efficiency.
+
+The radar structure is, essentially, an array of Volumes. The number
+and type of volumes allocated is automatically determined from the input
+HDF file.
+
+
+Return value
+
+Upon successful completion, RSL_hdf_to_radar returns a pointer
+to the structure Radar. Otherwise, NULL is returned and errno is
+set.
+
+
+See also
+
+RSL_anyformat_to_radar
+
+
+Author: Mike Kolander.
+
+
+
diff --git a/doc/RSL_histogram_struct.html b/doc/RSL_histogram_struct.html
new file mode 100644
index 0000000..00576d5
--- /dev/null
+++ b/doc/RSL_histogram_struct.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+typedef struct {
+ int nbins;
+ int low;
+ int hi;
+ int ucount;
+ int ccount;
+ int *data;
+} Histogram;
+
diff --git a/doc/RSL_lassen_to_radar.html b/doc/RSL_lassen_to_radar.html
new file mode 100644
index 0000000..96d4d25
--- /dev/null
+++ b/doc/RSL_lassen_to_radar.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+RSL_lassen_to_radar
+
+
+
+Synopsis
+#include "rsl.h"
+Radar *RSL_lassen_to_radar(char *infile);
+
+
+Description
+Reads a LASSEN (data from Darwin Austrailia) file and returns a pointer to the structure Radar. The input file is specified by the string infile. If infile is NULL, then stdin is read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands.
+
+The radar structure is, essentially, an array of Volumes. These volumes represent the reflectivity, velocity and spectrum width fields.
+
+
+Return value
+Upon successful completion, lassen_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set.
+
+
+See also
+RSL_anyformat_to_radar
+
+
+Author: John H. Merritt.
+
diff --git a/doc/RSL_load_color_table.html b/doc/RSL_load_color_table.html
new file mode 100644
index 0000000..f1ba8c9
--- /dev/null
+++ b/doc/RSL_load_color_table.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+RSL color table routines
+
+
+
+Synopsis
+#include "rsl.h"
+
void RSL_load_color_table(char *infile, char buffer[256], int *ncolors);
+
void RSL_load_green_table(char *infile);
+
void RSL_load_blue_table(char *infile);
+
void RSL_load_red_table(char *infile);
+
void RSL_load_refl_color_table();
+
void RSL_load_sw_color_table();
+
void RSL_load_vel_color_table();
+
void RSL_load_zdr_color_table();
+
void RSL_load_rainfall_color_table();
+
void RSL_load_height_color_table();
+
+
+
Description
+These are the color table routines. The color table is use when making
+images and is merely 256 bytes in size representing red, green and blue
+color indexes. The routines RSL_load_refl_color_table, RSL_load_sw_color_table,
+RSL_load_vel_color_table,and RSL_load_zdr_color_table each call
+the three routines RSL_load_red_table, RSL_load_green_table,
+and RSL_load_blue_table with a hard coded (defined during software
+installation) color input file. Under normal usage, you only have to call
+these routines once prior to any image generation function calls.
+The routines RSL_load_rainfall_color_table and RSL_load_height_color_table
+use the default files defined during installation. These routines exist
+to simplify the interface when generating height or rainfall images.
+
The default input file names are defined in volume.h. When you don't
+want to use the default color tables for reflectivity, spectrum width,
+or velocity, and have your own color tables, you can use RSL_load_red_table,
+RSL_load_green_table,
+and RSL_load_blue_table directly. Be sure to call all three routines.
+The most general of the routines, and one you should not normally use,
+is RSL_load_color_table. It manages a static global color table
+array and it is how the color table is remembered throughout your application.
+
The organization of the input color table files is binary. They contain,
+at most, 256 bytes with no delimeters and represent the color ramp from
+index 0 to 255.
+
+
+Return value
+None.
+
+
+See also
+RSL_sweep_to_gif, RSL_sweep_to_pict,
+RSL_sweep_to_pgm,
+RSL_sweep_to_ppm,
+
RSL_bscan_ray, RSL_bscan_sweep,
+RSL_bscan_volume,
+
RSL_volume_to_gif, RSL_volume_to_pict,
+RSL_volume_to_pgm,
+RSL_volume_to_ppm,
+
RSL_get_color_table, RSL_set_color_table.
+
+
+Author: John H. Merritt
+
+
diff --git a/doc/RSL_mcgill_to_radar.html b/doc/RSL_mcgill_to_radar.html
new file mode 100644
index 0000000..d3c0d35
--- /dev/null
+++ b/doc/RSL_mcgill_to_radar.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+RSL_mcgill_to_radar
+
+
+
+Synopsis
+#include "rsl.h"
+Radar *RSL_mcgill_to_radar(char *infile);
+
+
+Description
+Reads a McGill file and returns a pointer to the Radar structure. The input file is specified by the string infile. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands.
+
+The radar structure is, essentially, an array of Volumes. These volumes represent the reflectivity, velocity and spectrum width fields.
+
+
+Return value
+Upon successful completion, RSL_mcgill_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned.
+
+
+See also
+RSL_anyformat_to_radar
+
+
+Author: Mike Kolander
+
+
diff --git a/doc/RSL_new.html b/doc/RSL_new.html
new file mode 100644
index 0000000..cb15e9b
--- /dev/null
+++ b/doc/RSL_new.html
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+RSL_new_...
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_new_ray(int max_bins);
+Sweep *RSL_new_sweep(int max_rays);
+Volume *RSL_new_volume(int max_sweeps);
+Radar *RSL_new_radar(int nvolumes);
+
+
+
Description
+RSL_new_radar allocates memory for a Radar. It allocates space for it's header and space for nvolumes pointers to Volume, it does not assign anything to the new header. It does not allocate any volumes, just the pointers. You have to perform the allocation of volumes yourself. Do this by looping on nvolumes and calling RSL_new_volume.
+
+nvolumes does not represent the number of volumes in the radar structure. It represents the number of volume index slots or the maximum volume index. Reserved values DZ_INDEX, VR_INDEX, SW_INDEX, CZ_INDEX, ZT_INDEX, DR_INDEX, and LR_INDEX are the numbers 0 through 6. They are volume indexes. If you have 2 volumes (non NULL pointers) that are SW_INDEX and ZT_INDEX, you must be sure that nvolumes is, at least, ZT_INDEX+1. All the other volume pointers are NULL. It is perfectly valid to have NULL volume pointers.
+
+
RSL_new_volume allocates memory for a Volume. It allocates space for it's header and space for nsweep pointers to Sweep, it does not assign anything to the new header. It does not allocate any sweeps, just the pointers. You have to perform the allocation of sweeps yourself. Do this by looping on nsweeps and calling RSL_new_sweep.
+
+
nsweeps does not represent the number of non NULL sweep pointers. It is the number of index slots or the maximum sweep index. It is valid to have NULL sweep pointers.
+
+
RSL_new_sweep allocates memory for a Sweep. It allocates space for it's header and space for nrays pointers to Ray. It does not allocate any rays, just the pointers, nor does it assign any values to the new header. You have to perform the allocation of rays yourself. Do this by looping on nrays and calling RSL_new_ray.
+
+
nrays does not represent the number of non NULL ray pointers. It is the number of index slots or the maximum ray index. It is valid to have NULL ray pointers.
+
+
RSL_new_ray allocates memory for a Ray. It allocates space for it's header and space for a Range array of size nbins. It does not assign any values to the header. Since, the Range type is not a pointer, this function allocates an array of Range of size nbins. Currently, Range is just an alias for unsigned char.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.
+
+
+See also
+Example
+RSL_free_volume, RSL_free_sweep, RSL_free_ray
+RSL_copy_volume, RSL_copy_sweep, RSL_copy_ray
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_new_cappi.html b/doc/RSL_new_cappi.html
new file mode 100644
index 0000000..f74c1b6
--- /dev/null
+++ b/doc/RSL_new_cappi.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+RSL_new_cappi
+
+
+
+Synopsis
+#include "rsl.h"
+Cappi *RSL_new_cappi(Sweep *sweep, float height);
+
+
+
Description
+RSL_new_cappi allocates memory for a Cappi. It allocates space for it's header and space for for a Sweep structure. The Sweep allocated is a copy of sweep with all the data cleared. The height argument is copied to the height member of Cappi. No values are assigned to the rays in the sweep. That is done in the routine RSL_fill_cappi. This routine is not, normally, called unless you are developing a new cappi routine for RSL. Call RSL_cappi_at_h instead.
+
+
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.
+
+
+See also
+RSL_free_cappi, RSL_cappi_at_h, RSL_fill_cappi, RSL_get_value_from_cappi
+
+
+
Author: John H. Merritt
+
diff --git a/doc/RSL_new_carpi.html b/doc/RSL_new_carpi.html
new file mode 100644
index 0000000..82fdb8d
--- /dev/null
+++ b/doc/RSL_new_carpi.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_new_carpi
+
+
+
+Synopsis
+#include "rsl.h"
+Carpi *RSL_new_carpi(int xdim, int ydim);
+
+
+
Description
+Allocates xdim by ydim of Carpi_value. The entire structure is initialized to 0.
+
+
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.
+
+
+See also
+
+
Author: Mike Kolander
+
diff --git a/doc/RSL_nsig_to_radar.html b/doc/RSL_nsig_to_radar.html
new file mode 100644
index 0000000..8232ce9
--- /dev/null
+++ b/doc/RSL_nsig_to_radar.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+RSL_nsig_to_radar
+
+
+
+
+Synopsis
+
+#include "rsl.h"
+Radar *RSL_nsig_to_radar(char *infile);
+
+Radar *RSL_nsig2_to_radar(char *infile);
+
+
+
+Description
+
+Reads a new SIGMET (aka nsig) file and returns a pointer to the structure
+Radar. The input file is specified by the string infile.
+If infile is NULL, then stdin is read. The input file may be compressed.
+If the data is compressed, it is passed through the GNU gunzip filter.
+Thus, compressed data can be any format that gzip understands. Two
+versions of SIGMET files exist: Version 1 files, and Version 2 files.
+RSL_nsig_to_radar is used to read version 1 files, and, RSL_nsig2_to_radar
+is used to read version 2 files.
+
+The radar structure is, essentially, an array of Volumes. The number
+and type of volumes allocated is automatically determined from the input
+nsig file.
+
+
+Return value
+
+Upon successful completion, RSL_nsig_to_radar returns a pointer to the
+structure Radar. Otherwise, NULL is returned and errno is set.
+
+
+See also
+
+RSL_anyformat_to_radar
+
+
+Author: Paul Kucera.
+
+
+
diff --git a/doc/RSL_print_histogram.html b/doc/RSL_print_histogram.html
new file mode 100644
index 0000000..49d22e4
--- /dev/null
+++ b/doc/RSL_print_histogram.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_print_histogram
+
+
+
+
+Synopsis
+#include "rsl.h"
+void RSL_print_histogram(Histogram *histogram, int min_range, int max_range, char *filename);
+
+
+Description
+Print the structure pointed to by histogram to stdout. min_range and max_range specify the minimum and maximum range of the radar that was used to generate the histogram.
+
+
+Return value
+None.
+
+
+See also
+RSL_allocate_histogram, RSL_read_histogram, RSL_write_histogram, RSL_get_histogram_from_ray, RSL_get_histogram_from_sweep, RSL_get_histogram_from_volume
+
+Author: David B. Wolff
+
diff --git a/doc/RSL_print_version.html b/doc/RSL_print_version.html
new file mode 100644
index 0000000..10be6a4
--- /dev/null
+++ b/doc/RSL_print_version.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+RSL_print_version
+
+
+
+
+Synopsis
+
+#include "rsl.h"
+
void RSL_print_version();
+
+
+
+
Description
+
+Print the current version of the RSL library. Output to stdout.
+
+
+
+
+Return value
+
+None.
+
+
+See also
+
+
+
Author: John H. Merritt
+
+
+
diff --git a/doc/RSL_prune.html b/doc/RSL_prune.html
new file mode 100644
index 0000000..cd7a90d
--- /dev/null
+++ b/doc/RSL_prune.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+RSL_prune_...
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_prune_ray(Ray *ray);
+Sweep *RSL_prune_sweep(Sweep *s);
+Volume *RSL_prune_volume(Volume *v);
+Radar *RSL_prune_radar(Radar *radar);
+
+
+
Description
+These routines eliminates dataless substructures. A search is conducted for any substructures that contain only header information and, when found, are set to NULL. During the initial allocation step for ingest of a data format, substructure header information is minimially filled. It is not generally known if, for instance, a volume is NULL until it can be determined if there have been no rays assigned to it. In such a case, all sweep pointers have been allocated but no ray pointers assigned. Pruning this volume will result in setting the volume to NULL. A ray is pruned if h.nbins is 0. A sweep is pruned if h.nrays is 0. A volume is pruned if h.nsweeps is 0. A radar is pruned if h.nvolumes is 0.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned.
+
+
+See also
+RSL_new_radar, RSL_new_volume, RSL_new_sweep, RSL_new_ray,
+RSL_copy_volume, RSL_copy_sweep, RSL_copy_ray
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_radar_file_format.html b/doc/RSL_radar_file_format.html
new file mode 100644
index 0000000..92e435f
--- /dev/null
+++ b/doc/RSL_radar_file_format.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+The radar file format is not yet documented. Nor is it supported.
+It is unclear if it will be supported because we will output UF or HDF.
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_radar_header_struct.html b/doc/RSL_radar_header_struct.html
new file mode 100644
index 0000000..b752bed
--- /dev/null
+++ b/doc/RSL_radar_header_struct.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+typedef struct {
+ int month, day, year;
+ int hour, minute;
+ float sec; /* Second plus fractional part. */
+ char radar_type[50]; /* Type of radar. Use for QC-ing the data.
+ * Supported types are:
+ * "wsr88d", "lassen", "uf",
+ * "nsig", "nsig2", "mcgill",
+ * "kwajalein", "rsl", "toga".
+ * Set by appropriate ingest routine.
+ */
+ int nvolumes;
+ int number; /* arbitrary number of this radar site */
+ char name[8]; /* Nexrad site name */
+ char radar_name[8]; /* Radar name. */
+ char project[24]; /* Project assocated with data. */
+ char city[15]; /* nearest city to radaar site */
+ char state[2]; /* state of radar site */
+ int latd; /* degrees of latitude of site */
+ int latm; /* minutes of latitude of site */
+ int lats; /* seconds of latitude of site */
+ int lond; /* degrees of longitude of site */
+ int lonm; /* minutes of longitude of site */
+ int lons; /* seconds of longitude of site */
+ 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 vcp; /* Volume Coverage Pattern (for WSR-88D only) */
+} Radar_header;
+
+
+
diff --git a/doc/RSL_radar_intro.html b/doc/RSL_radar_intro.html
new file mode 100644
index 0000000..7838d5b
--- /dev/null
+++ b/doc/RSL_radar_intro.html
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+The Radar Software Library (RSL)
+
+
+Introduction
+
+
+By John H. Merritt and David
+B. Wolff; NASA/TRMM Office
+Software Verson 1.40 (released 10/10/2008)
+
+
This library is an object oriented programming environment to keep
+application programming simple, for the casual C programmer, as well as
+for analysis software applicable to all RADAR data related to the TRMM
+GV effort. This library reads the wsr88d, lassen, kwajalein, mcgill, toga,
+UF, RAPIC and native RSL file formats. The most important functions provided
+are those which load any one of the radar file formats into memory; see
+RSL_anyformat_to_radar. Additional
+functions are provide to mainpulate the RSL objects. Nearly all of the
+functions return objects. When they don't, they usually perform actions
+like output, making images, etc. The most general object in RSL is Radar.
+The structure Radar is the method used to define the ideal or universal
+radar representation in RAM while keeping the natural resolution of the
+data unchanged. More simply, Radar represents the super set of all
+radar file formats. The Radar structure
+is hierarchically defined such that it is composed of Volumes, each
+containing one field type. Volumes are composed of Sweeps.
+Sweeps are composed of Rays and Rays contains a vector
+of the field type. Some field types are Reflectivity(DZ), Velocity(VR),
+Spectrum Width(SW), etc. There are approximately 20 field types. See the
+Users Guide and the what's
+new for more information.
+An example of a function that returns the Radar object is the
+Lassen ingest function. The function allocates all memory required
+to store the values from the lassen file in RAM.
+
Radar *radar; radar = RSL_lassen_to_radar("lassen.file.22");
+
Syntactically, the object returned is a pointer. However, the functions
+provided in RSL treat this pointer as an object.
+
The names of the functions in the library are very descriptive of the
+function they perform. In the previous example, you may infer that some
+conversion from lassen to radar is taking place. Knowing
+that lassen is a file format for the Darwin RADAR datasets and that
+radar
+refers to the data structure Radar helps you understand that the
+function ingests lassen files and loads it into the Radar
+data structure.
+
The data structure Radar is composed of other objects called
+Volumes.
+You will notice that throughout this discussion, the natural vocabulary
+of the scientists who talk about the different components of the data received
+from a RADAR is used. This vocabulary is used to describe each component
+of the data structure. The Radar data structure holds RADAR measurements
+of a volume of physical space for the smallest unit of time possible. Typically
+a RADAR can produce a volume of data in 5 to 8 minutes; that becomes the
+smallest unit of time for a volume. This volume of space measured is referred
+to as Volume, in the RSL, and represents one particular measurement
+type or field type. The types of measurements are: reflectivity, velocity,
+spectrum width, quality controlled reflectivity, total reflectivity, differential
+reflectivity and LDR (another form of differential reflectivity). Normally,
+the RADAR records as many fields that it is designed to record and that
+really is one volume. However, I have split the fields into seperate volumes
+so that you can concentrate on only one field type. Thus, the Radar
+datatype is composed of an array of Volumes; one to the number of
+fields.
+
The Volume data structure, a single field type, is composed of
+several 360 degree revolutions of the RADAR. These revolutions are refered
+to as sweeps. The first sweep for a volume, commonly known as the base
+scan, is the sweep made by the RADAR pointing nearly horizontally and directing
+a RADAR beam toward the horizon. Then, the RADAR is tilted upwards slightly
+and another revolution is performed. This process continues 10 to 16 times,
+depending on the RADAR. These sweeps are referred to as Sweep in
+the RSL. Thus, a Volume is simply composed of an array of Sweeps;
+one to the number of elevation steps.
+
Similiarly, a Sweep is defined as a collection of rays throughout
+the 360 degree revolution. The RADAR takes measurements continually while
+it is sweeping. The number of rays collected is typically a function of
+the beamwidth. A beam width of .95 degrees will yield 379 rays for each
+sweep. For nexrad data the number of rays collected for each sweep is approximately
+366. These rays are referred to as Ray in the RSL. Thus, a Sweep
+is simply an array of Rays; one to the number of rays.
+
And, a Ray is one ray measurement from the RADAR. A ray is a
+series of measurements from the minimum to the maximum range of the RADAR.
+Think of it as a meaurement from zero to the maximum range while the RADAR
+is at one azimuthal angle. In reality, the radar is revolving continuously.
+The number of data values in a ray is represented in KM and it defines
+the resolution of the RADAR. NEXRAD is typcally 1.0KM and the new SIGMET
+RADAR is .25 KM. Thus, a Ray is simply an array of Range
+values; one to the number of bin. The number of bins is defined by the
+range of measured space divided by the resolution of a measurement less
+any to the minimum range.
+
Finally, a Range value is simply a floating point number that
+represents the data.
+
It should be obvious that the Radar data structure is an array
+of Volumes which is an array of Sweeps which is an array
+of Rays which is and array of Ranges. Whew! This hierarchial
+description is easy to understand, when you only think of each object as
+an array of the next subobject. Thinking of it as a 4 or 5 dimensional
+array is very difficult.
+
+
diff --git a/doc/RSL_radar_struct.html b/doc/RSL_radar_struct.html
new file mode 100644
index 0000000..8e3ee7c
--- /dev/null
+++ b/doc/RSL_radar_struct.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+typedef struct {
+ Radar_header h;
+ Volume **v; /* Array 0..nvolumes-1 of pointers to Volumes.
+ * 0 = DZ_INDEX = reflectivity.
+ * 1 = VR_INDEX = velocity.
+ * 2 = SW_INDEX = spectrum_width.
+ * 3 = CZ_INDEX = corrected reflectivity.
+ * 4 = ZT_INDEX = total reflectivity.
+ * 5 = DR_INDEX = differential refl.
+ * 6 = LR_INDEX = another differential refl.
+ * 7 = ZD_INDEX = another refl form.
+ * 8 = DM_INDEX = recieved power.
+ * 9 = RH_INDEX = Rho coefficient.
+ *10 = PH_INDEX = Phi (MCTEX parameter).
+ *11 = XZ_INDEX = X-band reflectivity.
+ *12 = CR_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.
+ *16 = VE_INDEX = Edited velocity.
+ *17 = KD_INDEX = KDP (unknown) for MCTEX data.
+ *18 = TI_INDEX = TIME (unknown) for MCTEX data.
+ */
+} Radar;
+
+/*
+ * DZ Reflectivity (dBZ), may contain some DZ_INDEX
+ * signal-processor level QC and/or
+ * filters. This field would contain
+ * Darwin's CZ, or WSR88D's standard
+ * reflectivity. In other words, unless
+ * the field is described otherwise, it
+ * should always go here. In essence, this
+ * is the "cleanest" reflectivity field
+ * for a radar.
+ *
+ * VR Radial Velocity (m/s) VR_INDEX
+ *
+ * SW Spectral Width (m2/s2) SW_INDEX
+ *
+ * CZ QC Reflectivity (dBZ), contains
+ * post-processed QC'd data CZ_INDEX
+ *
+ * ZT Total Reflectivity (dBZ) ZT_INDEX
+ * May be uncommon, but important
+ * This is UZ in UF files.
+ *
+ * DR Differential reflectivity DR_INDEX
+ * DR and LR are for dual-polarization
+ * radars only. Unitless or in dB.
+ *
+ * LR Another form of differential ref LR_INDEX
+ * called LDR, not sure of units
+ *
+ * ZD ZDR: Reflectivity Depolarization Ratio ZD_INDEX
+ * ZDR = 10log(ZH/ZV) (dB)
+ *
+ * DM Received power measured by the radar. DM_INDEX
+ * Units are dBm.
+ *
+ * RH Rho : Correlation coefficient (MCTEX) RH_INDEX
+ *
+ * PH Phi (MCTEX parameter) PH_INDEX
+ *
+ * XZ X-band reflectivity XZ_INDEX
+ *
+ * CD Corrected ZD reflectivity (differential) CD_INDEX
+ * contains QC'ed data
+ *
+ * MZ DZ mask volume for HDF 1C-51 product. MZ_INDEX
+ *
+ * MD ZD mask volume for HDF 1C-51 product. MD_INDEX
+ *
+ * ZE Edited Reflectivity. ZE_INDEX
+ *
+ * VE Edited Velocity. VE_INDEX
+ *
+ * KD KDP (unknown) for MCTEX data. KD_INDEX
+ *
+ * TI TIME (unknown) for MCTEX data. TI_INDEX
+ */
+
+
+
diff --git a/doc/RSL_radar_to_hdf.html b/doc/RSL_radar_to_hdf.html
new file mode 100644
index 0000000..0b3de96
--- /dev/null
+++ b/doc/RSL_radar_to_hdf.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+RSL_radar_to_hdf
+
+
+
+
+Synopsis
+
+#include "rsl.h"
+int RSL_radar_to_hdf(Radar *radar,
+char *outfile);
+
+
+Description
+
+Writes HDF files. The output file is specified by outfile.
+The organization of the data within the HDF file is specified in NASA
+document TSDIS-P907. This is also known as TSDIS ICS Volume 3 (Release
+3/Draft). You must preceed the call to RSL_radar_to_hdf with a call to
+RSL_set_hdf_qc_parameters.
+
+
+
+
+Return value
+
+Upon successful completion, RSL_radar_to_hdf returns 0. Upon failure,
+-1 is returned.
+
+
+See also
+
+RSL_anyformat_to_radar
+
+RSL_set_hdf_qc_parameters
+
+
+Author: Mike Kolander.
+
+
+
diff --git a/doc/RSL_radar_to_uf.html b/doc/RSL_radar_to_uf.html
new file mode 100644
index 0000000..483e865
--- /dev/null
+++ b/doc/RSL_radar_to_uf.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+RSL_radar_to_uf
+
+
+RSL_radar_to_uf_fp
+
+
+RSL_radar_to_uf_gzip
+
+
+
+Synopsis
+#include "rsl.h"
+void RSL_radar_to_uf(Radar *r, char *outfile);
+void RSL_radar_to_uf_fp(Radar *r, FILE *fp);
+void RSL_radar_to_uf_gzip(Radar *r, char *outfile);
+
+
+
Description
+Output the Radar structure, pointed to by r, to disk. The output filename is specified in outfile. The output UF file incorporates the NON-UF conforming NCAR record structure. Each UF record is surrounded by a 4 byte integer leading the UF buffer and a 4 byte integer trailing the UF buffer. The integer value represents the number of bytes for the UF buffer. This comes from the unformatted Fortran record descriptors. No UF library needed; the UF code in part of RSL. The routine RSL_radar_to_uf_fp takes a file pointer and is called by RSL_radar_to_uf and RSL_radar_to_uf_gzip. RSL_radar_to_uf_gzip passes the UF output through the GNU gzip compression filter; basically compressing the output on the fly.
+
+
+Return value
+None.
+
+
+See also
+RSL_uf_to_radar, RSL_write_radar
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_radar_verbose.html b/doc/RSL_radar_verbose.html
new file mode 100644
index 0000000..8c3f53d
--- /dev/null
+++ b/doc/RSL_radar_verbose.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+RSL_radar_verbose...
+
+
+Synopsis
+#include "rsl.h"
+void RSL_radar_verbose_on(void);
+void RSL_radar_verbose_off(void);
+
+
+Description
+Control the verbosity of messages while using the RSL. After calling radar_verbose_off, the default, the library is quiet. After calling radar_verbose_on, the library writes to stdout informative messages about the current progress. This is useful when using the RSL interactively, since some of the functions take time; it assure you that nothing is hung.
+
+
+Return value
+None.
+
+
+See also
+
+
Author: John Merritt
+
diff --git a/doc/RSL_radtec_to_radar.html b/doc/RSL_radtec_to_radar.html
new file mode 100644
index 0000000..2355bf8
--- /dev/null
+++ b/doc/RSL_radtec_to_radar.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+RSL_radtec_to_radar
+
+
+
+Synopsis
+#include "rsl.h"
+
Radar *RSL_radtec_to_radar(char
+*infile);
+
+
+Description
+Reads a RADTEC (SPANDAR) file and returns a pointer to the Radar
+structure. The input file is specified by the string infile. If
+infile is NULL, then stdin is read. The data is compressed
+with PKWARE implode. RSL needs to be installed with -DHAVE_PKWARE
+in order to used RSL_radtec_to_radar.
+
+The radar structure is, essentially, an array of Volumes. These volumes
+represent the reflectivity, velocity and spectrum width fields.
+
+
+Return value
+Upon successful completion, RSL_radtec_to_radar returns a pointer to the
+structure Radar. Otherwise, NULL is returned. A valid Radar
+structure will be returned if the infile is valid.
+
+
+See also
+RSL_anyformat_to_radar
+
+
+Author: John H. Merritt.
+
+
diff --git a/doc/RSL_range_struct.html b/doc/RSL_range_struct.html
new file mode 100644
index 0000000..206ace6
--- /dev/null
+++ b/doc/RSL_range_struct.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
If #define USE_TWO_BYTE_PRECISION when building and installing RSL,
+then
+
+typedef unsigned short Range;
+
+else,
+
+typedef unsigned char Range;
+
+
+
diff --git a/doc/RSL_rapic_to_radar.html b/doc/RSL_rapic_to_radar.html
new file mode 100644
index 0000000..245fbea
--- /dev/null
+++ b/doc/RSL_rapic_to_radar.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+RSL_rapic_to_radar
+
+
+
+Synopsis
+#include "rsl.h"
+
Radar *RSL_rapic_to_radar(char
+*infile);
+
+
+Description
+Reads a RAPIC (data from Berrimah Austrailia) file and returns a pointer
+to the structure Radar. The input file is specified by the string
+infile. If infile is NULL, then stdin is read. The input
+file may be compressed. If the data is compressed, it is passed through
+the GNU gunzip filter. Thus, compressed data can be any format that
+gzip understands.
+
+The radar structure is, essentially, an array of Volumes. These volumes
+represent several field types, including but not limited to, reflectivity,
+velocity and spectrum width fields.
+
+
+Return value
+Upon successful completion, RSL_rapic_to_radar returns a pointer to the
+structure Radar. Otherwise, NULL is returned and errno is set.
+
+
+See also
+RSL_anyformat_to_radar
+
+
+Author: John H. Merritt.
+
+
diff --git a/doc/RSL_ray_header_struct.html b/doc/RSL_ray_header_struct.html
new file mode 100644
index 0000000..2065762
--- /dev/null
+++ b/doc/RSL_ray_header_struct.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+typedef struct {
int month; /* Date for this ray; month (1-12). */
int day; /* Date for this ray; day (1-31). */
int year; /* Date for this ray; year (eg. 1993). */
int hour; /* Time for this ray; hour (0-23). */
int minute;/* Time for this ray; minute (0-59).*/
float sec; /* Time 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.
* This angle is the mean azimuth for the whole ray.
* Eg. 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. */
int range_bin1; /* Range to first gate.(meters) */
int gate_size; /* Data gate size (meters)*/
float vel_res; /* Doppler velocity resolution */
float sweep_rate; /* Sweep rate. Full sweeps/min. */
int prf; /* Pulse repitition frequency, in Hz. */
float azim_rate; /* Sweep rate in degrees/second.*/
float fix_angle; /* Elevation angle for the sweep. (degrees). */
float pitch; /* Pitch angle. */
float roll; /* Roll angle. */
float heading; /* Heading. */
float pitch_rate; /* (angle/sec) */
float roll_rate; /* (angle/sec) */
float heading_rate; /* (angle/sec) */
float lat; /* Latitude (degrees) */
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 pulse_count; /* Pulses used in a single dwell time. */
float pulse_width; /* Pulse width (micro-sec). */
float beam_width; /* Beamwidth in degrees. */
float frequency; /* Bandwidth MHz. */
float wavelength; /* Wavelength. Meters. */
float nyq_vel; /* Nyquist velocity. m/s */
float (*f)(Range x); /* Data conversion function. f(x). */
Range (*invf)(float x); /* Data conversion function. invf(x). */
int nbins; /* Number of array elements for 'Range'. */
} Ray_header;
+
+
+
diff --git a/doc/RSL_ray_struct.html b/doc/RSL_ray_struct.html
new file mode 100644
index 0000000..036ecdf
--- /dev/null
+++ b/doc/RSL_ray_struct.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+typedef struct {
+ Ray_header h;
+ Range *range; /* range[0..nbins-1] */
+ /* For wsr88d file:
+ * 0..460 for reflectivity, 0..920 for velocity and
+ * spectrum width. You must allocate this space.
+ */
+} Ray;
+
+
diff --git a/doc/RSL_read.html b/doc/RSL_read.html
new file mode 100644
index 0000000..e016545
--- /dev/null
+++ b/doc/RSL_read.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+RSL_read_...
+
+
+
+Synopsis
+#include "rsl.h"
+Ray *RSL_read_ray(FILE *fp);
+Sweep *RSL_read_sweep(FILE *fp);
+Volume *RSL_read_volume(FILE *fp);
+
+
+
Description
+RSL_read_volume reads an entire volume structure from the input stream fp. fp is usually assigned inside the routine RSL_read_radar, however, you can assign the stream fp via fopen. RSL_read_volume calls RSL_read_sweep for the number of sweeps, vol->h.nsweeps, as determined from reading fp. Memory is allocated via RSL_new_volume.
+
+RSL_read_sweep reads an entire sweep structure from the input stream fp. RSL_read_sweep calls RSL_read_ray for the number of rays, sweep->h.nrays, as determined by reading fp. Memory is allocated via RSL_new_sweep.
+
+
RSL_read_ray reads an entire ray structure from the input stream fp. RSL_read_ray ingests an entire ray of data and sets ray->h.nbins. Memory is allocated via RSL_new_ray.
+
+
+Return value
+Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.
+
+
+See also
+Example
+RSL_new_volume, RSL_new_sweep, RSL_new_ray,
+RSL_write_volume, RSL_write_sweep, RSL_write_ray,
+RSL_read_radar, RSL_write_radar,
+File format.
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_read_histogram.html b/doc/RSL_read_histogram.html
new file mode 100644
index 0000000..194874a
--- /dev/null
+++ b/doc/RSL_read_histogram.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+RSL_read_histogram
+
+
+
+Synopsis
+#include "rsl.h"
+Histogram *RSL_read_histogram(char *infile);
+
+
+Description
+Read the structure Histogram from the disk file infile.
+
+
+Return value
+
+Upon successful completion, a pointer to Histogram is returned. NULL is returned if an error occurs and errno is set.
+
+See also
+RSL_write_histogram
+
+
+Author: David B. Wolff
+
diff --git a/doc/RSL_read_radar.html b/doc/RSL_read_radar.html
new file mode 100644
index 0000000..3e5ab3d
--- /dev/null
+++ b/doc/RSL_read_radar.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+RSL_read_radar
+
+
+
+Synopsis
+#include "rsl.h"
+Radar *RSL_read_radar(char *filename);
+
+
+
Description
+Read the Radar structure from disk. This is the inverse function of RSL_write_radar. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands. Space for the Radar structure is obtained via calls to the volume routines: RSL_new_volume, RSL_new_sweep, and RSL_new_ray, which obtain their space via the routine malloc.
+
+
+Return value
+Upon successful completion, a Radar structure is returned. Otherwise, NULL.
+
+
+See also
+RSL_read_volume, RSL_read_sweep, RSL_read_ray,
+RSL_write_volume, RSL_write_sweep, RSL_write_ray,
+RSL_read_radar, File format, RSL_anyformat_to_radar
+
+
+Author: John H. Merritt
+
diff --git a/doc/RSL_read_these_sweeps.html b/doc/RSL_read_these_sweeps.html
new file mode 100644
index 0000000..0b690ba
--- /dev/null
+++ b/doc/RSL_read_these_sweeps.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+RSL_read_these_sweeps
+
+
+
+Synopsis
+#include "rsl.h"
+
void RSL_read_these_sweeps(char *sweep#, [char *sweep#...], NULL);
+
+
+
+Description
+Call this routine prior to any ingest routine and only the sweeps specified
+will be stored in memory. This drastically reduces memory requirements
+and speeds up the ingest, especially, if you're only interesed in a few
+sweeps. This function is useful, for instance, when you're making
+images of the base sweeps. Why bother reading the entire file when
+you only need the first sweep? By default, all sweeps are ingested.
+The sweep# is a character string representing the sweep number, "4" for
+instance. Order does not matter. Specify NULL as the last argument.
+This signals this routine when to stop parsing for sweep numbers.
+The first sweep is "0".
+
+The list of possible sweep numbers is: "all", "none", "0", "1", ...
+
+
Action or side-effects: A second call to this function over-rides any
+previous settings. In other words, multiple calls are not additive.
+Therefore, you must list all the sweeps you want in a single call.
+
+
RSL_read_these_sweeps("1", "2", NULL);
+
+
which reads the second and third sweep is not the same as:
+
+
RSL_read_these_sweeps("1", NULL);
+
RSL_read_these_sweeps("2", NULL);
+
+
wherein, only the third (index 2) sweep is ingested.
+
+
+
+
+
+Return value
+Upon successful completion, RSL_read_these_sweeps silently sets a hidden
+array that each of the specific radar format ingest routines access.
+
+
+
+See also
+RSL_anyformat_to_radar.
+
+
Author: John H. Merritt.
+
+
diff --git a/doc/RSL_rebin.html b/doc/RSL_rebin.html
new file mode 100644
index 0000000..356483c
--- /dev/null
+++ b/doc/RSL_rebin.html
@@ -0,0 +1,52 @@
+
+
+
+
+ RSL_rebin...
+
+
+
+
+
+RSL_rebin_...
+
+
+
+Synopsis
+#include "rsl.h"
+
void RSL_rebin_ray(Ray *r, int
+width);
+
void RSL_rebin_sweep(Sweep *s,
+int width);
+
void RSL_rebin_volume(Volume
+*v, int width);
+
+
+
Description
+Rebin the data from -width to +width, centered at 0, to a positive value,
+such that -width corresponds to 1, and +width corresponds to the value
+2*width+1.
+
+NOTE: This function modifies its argument: Ray, Sweep, or Volume. Use
+this function prior RSL_sweep_to_cart.
+The actual binning is done in RSL_rebin_ray.
+
+
+Return value
+None.
+
+
+See also
+RSL_sweep_to_gif, RSL_sweep_to_pict,
+RSL_sweep_to_pgm, RSL_sweep_to_ppm,
+
RSL_load_color_table, RSL_load_green_table,
+RSL_load_red_table, RSL_load_blue_table,
+
RSL_load_refl_color_table,
+RSL_load_sw_color_table, RSL_load_vel_color_table,
+
RSL_volume_to_gif, RSL_volume_to_pict,
+RSL_volume_to_pgm, RSL_volume_to_ppm.
+
+
+Author: David B. Wolff
+
+
diff --git a/doc/RSL_rebin_velocity.html b/doc/RSL_rebin_velocity.html
new file mode 100644
index 0000000..1083086
--- /dev/null
+++ b/doc/RSL_rebin_velocity.html
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+RSL_rebin_velocity...
+
+
+
+Synopsis
+#include "rsl.h"
+
void RSL_rebin_velocity_ray(Ray
+*r);
+
void RSL_rebin_velocity_sweep(Sweep
+*s);
+
void RSL_rebin_velocity_volume(Volume
+*v);
+
+
+
Description
+Rebin the velocity data to the range -nyquist, +nyquist. 14 bins are created
+centered at 0. It sets the proper color look up indexes. This function
+modifies Volume v. Use this function prior RSL_sweep_to_cart.
+The binning is done in RSL_rebin_velocity_ray.
+
+
+Return value
+None.
+
+
+See also
+RSL_sweep_to_gif, RSL_sweep_to_pict,
+RSL_sweep_to_pgm, RSL_sweep_to_ppm,
+
RSL_load_color_table, RSL_load_green_table,
+RSL_load_red_table, RSL_load_blue_table,
+
RSL_load_refl_color_table,
+RSL_load_sw_color_table, RSL_load_vel_color_table,
+
RSL_volume_to_gif, RSL_volume_to_pict,
+RSL_volume_to_pgm, RSL_volume_to_ppm,
+
RSL_get_color_table, RSL_set_color_table.
+
+Author: John H. Merritt
+
+
diff --git a/doc/RSL_return_eth_sweep.html b/doc/RSL_return_eth_sweep.html
new file mode 100644
index 0000000..6ab7b02
--- /dev/null
+++ b/doc/RSL_return_eth_sweep.html
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+RSL_return_eth_sweep
+
+
+
+Synopsis
+#include "rsl.h"
+Sweep *RSL_return_eth_sweep.html(
+Vertical_structure *vs,int index);
+
+
+
+Description
+Given a Vertical_structure data structure created by
+RSL_get_vertical_structure and a threshold index, return a Sweep data structure that contains echo top values. The threshold index corresponds
+to the original set of threshold values used to create the
+Vertical_structure. Index 0 is the first index.
+
+
+Return Value
+Upon seccesful completion, a pointer to a Sweep data structure is
+returned. Otherwise a NULL pointer is returned.
+
+
+
+See also
+RSL_return_zmax_sweep,
+RSL_return_hzmax_sweep,
+RSL_get_vertical_structure,
+RSL_free_vertical_structure,
+RSL_get_column,
+
+
+
+
+Author: Dennis Flanigan Jr.
+
+
+
+
+
+
+
+RSL_return_hzmax_sweep
+
+
+
+Synopsis
+#include "rsl.h"
+Sweep *RSL_return_hzmax_sweep.html( Vertical_structure *vs);
+
+
+Description
+Given a Vertical_structure created by RSL_get_vertical_structure, return a Sweep data structure that contains the height of the maximum dBz value found above the bins in the base sweep of a Volume of dBz data.
+
+
+Return Value
+Upon successful completion, a pointer to a Sweep data structure is returned. Otherwise a NULL pointer is returned.
+
+
+See also
+RSL_return_zmax_sweep,
+RSL_return_eth_sweep,
+RSL_get_vertical_structure,
+RSL_free_vertical_structure,
+RSL_get_column,
+
+
+
+Author: Dennis Flanigan Jr.
+
+
+
+
+RSL_return_zmax_sweep
+
+
+
+Synopsis
+#include "rsl.h"
+Sweep *RSL_return_zmax_sweep.html(
+Vertical_structure *vs);
+
+
+
+Description
+Given a Vertical_structure created by
+RSL_get_vertical_structure, return a Sweep data structure
+that contains the maximum dBz value found above the bins in the base
+sweep of a Volume of dBz data.
+
+
+
+Return Value
+Upon seccesful completion, a pointer to a Sweep data structure is
+returned. Otherwise a NULL pointer is returned.
+
+
+
+See also
+RSL_return_hzmax_sweep,
+RSL_return_eth_sweep,
+RSL_get_vertical_structure,
+RSL_free_vertical_structure,
+RSL_get_column,
+
+
+
+Author: Dennis Flanigan Jr.
+
+
+
+
+RSL_reverse_sweep_order
+
Synopsis
+#include "rsl.h"
+Volume *RSL_reverse_sweep_order(Volume *v)
+
Description
+Reverses the order of the sweeps in a Volume. This function is most useful if the original ingested file provided the sweep elevation angles from high to low. This routine alters the input Volume v.
+
Return value
+Upon successful completion, RSL_reverse_sweep_order returns a pointer to the structure Volume. Otherwise, NULL is returned.
+
See also
+RSL_sort_volume
+
Author: John H. Merritt.
+
+
+
+
+
+
+
+
+
+RSL_select_fields
+
+
+
+
+Synopsis
+
+#include "rsl.h"
+void RSL_select_fields(char *field_type, [char *field_type...], NULL);
+
+
+
+Description
+
+Call this routine prior to any ingest routine and only the field types
+specified will be ingested. The drastically reduces memory requirements,
+especially if you're only interesed in one field type. Lassen, for instance,
+can have more than 5 field types which collectively can occupy an enormous
+amount of memory. By default, all field types are ingested. field_type
+is not case sensitive. Specify NULL as the last argument. This signals
+this routine when to stop parsing the field types.
+
+The list of possible field types is: "all", "none",
+"dz", "vr" "cz", "zt", "dr",
+"lr", "zd", "dm", "rh", "ph",
+"xz", "cd", "mz", "md", "ze",
+"ve", "kd", "ti".
+
+Action or side-effects: A second call to this function over-rides any
+previous settings. In other words, multiple calls are not additive. So,
+to get both DZ and VR volumes, use:
+RSL_select_fields("dz", "vr", NULL); -- Read both DZ
+and VR.
+and not:
+RSL_select_fields("dz", NULL); -- Read only DZ.
+RSL_select_fields("vr", NULL); -- Read only VR, no DZ.
+
+
+
+
+
+Return value
+
+Upon successful completion, RSL_select_fields silently sets a hidden
+array that RSL_anyformat_to_radar accesses for memory allocation.
+
+
+
+See also
+
+RSL_anyformat_to_radar.
+
+
Author: John H. Merritt.
+
+
+
+
diff --git a/doc/RSL_return_hzmax_sweep.html b/doc/RSL_return_hzmax_sweep.html
new file mode 100644
index 0000000..8fcfd18
--- /dev/null
+++ b/doc/RSL_return_hzmax_sweep.html
@@ -0,0 +1,38 @@
+
+
+
diff --git a/doc/RSL_return_zmax_sweep.html b/doc/RSL_return_zmax_sweep.html
new file mode 100644
index 0000000..04925f4
--- /dev/null
+++ b/doc/RSL_return_zmax_sweep.html
@@ -0,0 +1,47 @@
+
+
+
+
+
diff --git a/doc/RSL_reverse.html b/doc/RSL_reverse.html
new file mode 100644
index 0000000..f86b4f6
--- /dev/null
+++ b/doc/RSL_reverse.html
@@ -0,0 +1,17 @@
+
+
diff --git a/doc/RSL_select_fields.html b/doc/RSL_select_fields.html
new file mode 100644
index 0000000..456b476
--- /dev/null
+++ b/doc/RSL_select_fields.html
@@ -0,0 +1,71 @@
+
+
+