set_plot,'x' window,0,xsize=800,ysize=500 ;read radiosonde data from cart colour_hp !P.font=-1 !p.background=1 !P.multi=[0,3,1] files=strarr(10) name=' ' ascfile='aerigoes_sonde.lst' openw, 1, ascfile read, prompt = 'Please Input Day on Interest (yymmdd): ', Date date=long(date) spawn,'ls -1 /home3/waynef/public_html/camexiii/archive/sondes/uwvai/x'+$ strcompress(string(date),/remove_all)+'*.cdf > sonde.lst' openr, lun, 'sonde.lst', /get_lun n=0 l=0 while not eof (lun) do begin readf, lun, name, format='(a)' files(n)=strcompress( name, /remove_all) n=n+1 endwhile free_lun, lun for m=0,n-1 do begin sondfile=files(m) fid = ncdf_open(sondfile) ncdf_varget, fid, 'base_time', basetime ncdf_varget, fid, 'time_offset', time_offset ncdf_varget, fid, 'pres', sonde_pr ncdf_varget, fid, 'tdry', sonde_t ncdf_varget, fid, 'dp', sonde_td ncdf_varget, fid, 'alt', sonde_alt time_convert,basetime+time_offset,sonde_date,time=sonde_time ; SONDE QC presdiff=sonde_pr-shift(sonde_pr,1) result=where((presdiff le -0.5) and (presdiff gt -10.0),sonde_nl) sonde_pr=sonde_pr(result) sonde_t=sonde_t(result) sonde_td=sonde_td(result) sonde_alt=sonde_alt(result) sonde_time=sonde_time(result) sonde_t=sonde_t+273.19 sonde_td=sonde_td+273.19 sonde_mr=fltarr(sonde_nl) ; Convert t and dt to mixing ratio sonde_mr(*)=wvmr(sonde_pr(*),sonde_t(*),sonde_td(*)) sonde_stime=strcompress(string(sonde_time(0)),/remove_all) sonde_sdate=strcompress(string(sonde_date(0)),/remove_all) totpre,reverse(sonde_pr), reverse(sonde_mr), sonde_nl,sonde_int_tpw,$ sonde_total_tpw stsonde_pw=string(sonde_total_tpw) ncdf_close,fid ;#################################################### goesfile='/home3/waynef/camexiii/andros/cdffile/'+sonde_sdate+'AG.cdf' fid2 = ncdf_open(goesfile) ncdf_varget, fid2, 2, goesaeri_alt ncdf_varget, fid2, 3, goesaeri_pr ncdf_varget, fid2, 4, goesaeri_t ncdf_varget, fid2, 5, goesaeri_td ncdf_varget, fid2, 6, goesaeri_mr ncdf_varget, fid2, 7, goesaeri_time ncdf_close,fid2 goesaeri_stime=strcompress(string(goesaeri_time),/remove_all) goesaeri_nl=n_elements(goesaeri_alt) ;#################################################### goesfile='/home3/waynef/camexiii/andros/'+sonde_sdate+'/'+sonde_sdate+'FG.cdf' fid3 = ncdf_open(goesfile) ncdf_varget, fid3, 2, goesaeri_g_alt ncdf_varget, fid3, 3, goesaeri_g_pr ncdf_varget, fid3, 4, goesaeri_g_t ncdf_varget, fid3, 5, goesaeri_g_td ncdf_varget, fid3, 6, goesaeri_g_mr ncdf_varget, fid3, 7, goesaeri_g_time ncdf_close,fid3 goesaeri_g_stime=strcompress(string(goesaeri_g_time),/remove_all) goesaeri_g_nl=n_elements(goesaeri_g_alt) ;############################################################ goesorg='/home3/waynef/sgpcart/goesret/ADS/netcdf/'+sonde_sdate+'gp.cdf' fid3 = ncdf_open(goesorg) ncdf_varget, fid3, 1, basetime ncdf_varget, fid3, 2, goes_pr ncdf_varget, fid3, 3, time_offset ncdf_varget, fid3, 10, goes_surfpr ncdf_varget, fid3, 11, goes_surft ncdf_varget, fid3, 12, goes_surftd ncdf_varget, fid3, 14, goes_t ncdf_varget, fid3, 15, goes_td goes_nrec=n_elements(time_offset) goes_nl=n_elements(goes_pr) goes_mr=fltarr(goes_nl) time_convert,basetime+time_offset,goes_date,time=goes_time goes_surfmr=fltarr(goes_nrec) goes_mr=fltarr(goes_nl,goes_nrec) goes_alt=fltarr(goes_nl) sdate=strcompress(string(goes_date(0)),/remove_all) goes_stime=strcompress(string(goes_time),/remove_all) for i=0,goes_nrec-1 do begin if goes_surfpr(i) lt 1000.0 then goes_pr(0) = goes_surfpr(i) goes_surfmr(i)=wvmr(goes_surfpr(i),goes_surft(i),goes_surftd(i)) goes_mr(*,i)=wvmr(goes_pr(*),goes_t(*,i),goes_td(*,i)) goes_alt = prtoalt(goes_pr(*),goes_t(*,i),goes_mr(*,i)) endfor ncdf_close,fid3 ;############################################################ goesaeri_difftime=abs(goesaeri_time-sonde_time(0)) goesaeri_mintime=min(goesaeri_difftime) goesaeri_match_time=where(goesaeri_mintime eq goesaeri_difftime) goes_difftime=abs(goes_time-sonde_time(0)) goes_mintime=min(goes_difftime) goes_match_time=where(goes_mintime eq goes_difftime) totpre,reverse(goesaeri_pr(0:45)), reverse(goesaeri_mr(0:45,goesaeri_match_time)), $ goesaeri_nl-2,goesaeri_int_tpw,goesaeri_total_tpw totpre,reverse(goesaeri_g_pr(0:45)), reverse(goesaeri_g_mr(0:45,goesaeri_match_time)), $ goesaeri_g_nl-2,goesaeri_g_int_tpw,goesaeri_g_total_tpw totpre,reverse(goes_pr), reverse(goes_mr(*,goes_match_time)), goes_nl,goes_int_tpw,$ goes_total_tpw if goesaeri_mintime lt 1.5 then begin plot,sonde_t(*),sonde_pr(*), min_value=-1,ystyle=1,$ xstyle=1, xrange=[200,310], yrange=[1020,300],color=0,charsiz=1.0,$ title='GOES+AERI/Radiosonde Comparison '+sonde_sdate,thick=2 oplot,sonde_td(*),sonde_pr(*),color=0,thick=2 oplot,goesaeri_t(0:45,goesaeri_match_time),goesaeri_pr(0:45,goesaeri_match_time),color=2,thick=3 oplot,goesaeri_td(0:45,goesaeri_match_time),goesaeri_pr(0:45,goesaeri_match_time),color=2,thick=3 ;oplot,goesaeri_g_t(0:45,goesaeri_match_time),goesaeri_g_pr(0:45,goesaeri_match_time),color=4,thick=2 ;oplot,goesaeri_g_td(0:45,goesaeri_match_time),goesaeri_g_pr(0:45,goesaeri_match_time),color=4,thick=2 ;oplot,goes_t(*,goes_match_time),goes_pr(*),color=3,thick=3,line=2 ;oplot,goes_td(*,goes_match_time),goes_pr(*),color=3,thick=3,line=2 bxleg=205 exleg=210 xlegt=212 yleg1=800 yleg2=850 yleg3=900 yleg4=900 oplot,[bxleg,exleg],[yleg1,yleg1],color=0 xyouts,xlegt,yleg1,'RADIOSONDE ' + sonde_stime,charsize=.6,color=0 xyouts,xlegt,yleg1+25,string(sonde_total_tpw),color=0 ,charsize=.6 ;oplot,[bxleg,exleg],[yleg2,yleg2],color=3,thick=3,line=2 ;xyouts,xlegt,yleg2,'GOES Phy. Ret. '+ goes_stime(goes_match_time),charsize=.6,color=3 ;xyouts,xlegt,yleg2+25,string(goes_total_tpw),color=3 ,charsize=.6 ;oplot,[bxleg,exleg],[yleg3,yleg3],color=4 ;xyouts,xlegt,yleg3,'AERI+GOES FG ' + goesaeri_stime(goesaeri_match_time),charsize=.6,color=4 ;xyouts,xlegt,yleg3+25,string(goesaeri_g_total_tpw),color=4 ,charsize=.6 oplot,[bxleg,exleg],[yleg4,yleg4],color=2,thick=3 xyouts,xlegt,yleg4,'AERI+GOES PR ' + goesaeri_stime(goesaeri_match_time),charsize=.6,color=2 xyouts,xlegt,yleg4+25,string(goesaeri_total_tpw),color=2 ,charsize=.6 printf, 1, files(m) if l eq 3 then begin tvlct,r,g,b,/Get giffile=tvrd() ; write_gif, '~/idl/goesaeri/idl.gif', giffile, r, g, b ; command=strcompress('mv ~/idl/goesaeri/idl.gif ~/idl/goesaeri/goesaeri1_'$ ; +sonde_sdate+'.gif') ; spawn,command endif l=l+1 endif endfor i=1 if l gt 3 then i=2 tvlct,r,g,b,/Get giffile=tvrd() write_gif, '~/public_html/camexiii/archive/quicklooks/'+sdate+'/'+sdate+'_goesaeri.gif', giffile, r, g, b close, 1 end