function iris_to_uf,raw_file,uf_file,scan_type,FIELDS=fields ; ; *** Program to open an RS-supported radar file and create a ; *** UF file with specified fields. ; COMMON misc,TRUE,FALSE !QUIET=1 TRUE=1 & FALSE=0 if(n_elements(FIELDS) eq 0) then fields = ['DZ','DR','PH','RH','VR','SW','LDH'] ; ; *** Load file into rsl_in_idl ; radar = rsl_anyformat_to_radar(raw_file,error=error,/keep,/quiet,/catch) if(error) then begin flag = 'Error reading file: ' + raw_file return,flag endif ; ; *** Check to see if a structure was returned. ; a = size(radar,/type) if(a ne 8) then begin flag = 'No structure returned: ' + file return,flag endif ; ; *** Get the scan type. ; scan_type = radar.h.scan_mode ; ; *** Convert to UF ; rsl_radar_to_uf,radar,uf_file,fields=fields,/force print,' --> ' + uf_file print return,'OK' stop end