pro parse_sounding,tmp_file,sounding_file,VERBOSE=verbose !QUIET=1 TRUE=1 & FALSE=0 ; ; *** Programs reads a sounding file downloaded from the Univ. ; *** of Wyoming and strips out the HTML code. It then copies ; *** the parsed text to sounding_file and removes the tmp_file. ; if(verbose) then begin print,'<-- ' + tmp_file print,' --> ' + sounding_file endif openr,in_unit,tmp_file,/get_lun openw,out_unit,sounding_file,/get_lun rec = '' while(NOT EOF(in_unit)) do begin readf,in_unit,rec a = strsplit(rec,' ',/extract,COUNT=nf) if(nf ne 11 or a[0] eq 'Questions') then goto,next_rec if(verbose) then print,rec printf,out_unit,rec next_rec: endwhile close,in_unit free_lun,in_unit close,out_unit free_lun,out_unit spawn,'rm ' + tmp_file return end