function add_dsd_fields,radar,DPQC=dpqc,network=network,field_campaign=field_campaign,site=site ; ; *** Program to add D0 and Nw volumes to a radar structure. The ; *** radar structure must contain Zh and Zdr for thi function to ; *** execute. ; COMMON misc,TRUE,FALSE COMMON dirs,img_dir,uf_dir,hid_img_dir,hid_dir,dsd_dir if(NOT KEYWORD_SET(dpqc)) Then dpqc=FALSE ; ; *** Store names of available volumes ; field_types = radar.volume.h.field_type ; ; *** Make sure Zh and Zdr volumes are avaiable ; a_dz = where(field_types eq 'DZ',c_dz) if(dpqc) then a_dz = where(field_types eq 'CZ',c_dz) a_dr = where(field_types eq 'DR',c_dr) if(c_dz eq 0 or c_dr eq 0) then begin flag = 'File does not contain Zh: ' + string(c_dz,format='(I1)') + $ ' Zdr: ' + string(c_dr,format='(I1)') return,flag endif ; ; *** Now call function that accepts a radar structure and ; *** returns it with the new D0 and Nw fields within. ; ; add_d0_nw_volumes,radar,DPQC=dpqc add_dsd_retrievals,radar,DPQC=dpqc,network=network,field_campaign=field_campaign,site=site ; ; *** Write radar to a UF file ; ; dsd_uf_file = dsd_dir + org_file_base + '.DSD.uf.gz' ; rsl_radar_to_uf_gzip,radar,dsd_uf_file ; print,'DSD Fields: ',radar.volume.h.field_type return,'OK' end