pro run_drops,year,month,day ; ; *** IDL program to run V. Chandrasekar's DROPS program which ; *** provides for QC'd dBZ, Zdr, Kdp and rain rate. ; TRUE=1 & FALSE=0 !QUIET = TRUE ; ; *** Make sure dates are strings ; year = string(year,format='(I4.4)') syear = strmid(year,2,2) month = string(month,format='(i2.2)') day = string(day,format='(i2.2)') ; ztime = string(ztime,format='(I2.2)') ; ; *** Specify output directory ; uf_dir = '/data/Radar/NPOL/Wallops/DROPS/UF/' + year + '/' + month + day + '/' spawn,'mkdir -p ' + uf_dir ; ; *** Chandra wants a sounding. We will use get_ruc_sounding.pro to ; *** get the latest sounding. ; ; get_uwy_sounding,year,month,day,SOUNDING_FILE=sounding_file in_dir = '/data/Radar/NPOL/iris_data/ppi/' wc = in_dir + 'np1' + syear + month + day + '*' files = file_search(wc,COUNT=nf) if(nf eq 0) then begin print,'No files found in ' + wc stop endif config_file = 'npol.conf' for i=0L,nf-1 do begin file = files[i] print,'<-- ' + file ; ; *** Set up UF file ; fileb = file_basename(file) stop ; ; *** Based on time, get the sounding associated with the ; hour = strmid(fileb,9,2) snd_hour = '00' if(hour ge 12) then snd_hour = '12' get_uwy_sounding,year,month,day,ZTIME=snd_hour,SOUNDING_FILE=sounding_file uf_file = uf_dir + fileb + '.uf' c = './DROPS ' + file + ' -o ' + uf_file + ' -c ' + config_file + $ ' -s ' + sounding_file + ' -m VHS' print,c stop ; spawn,c print,' --> ' + uf_file print endfor stop end