pro plot_mwr_special ; ; Common to hold data ; common mwr_data, base_time, time_offset, $ vap,liq,tbsky23,tbsky31,irtemp,wetwindow,lat,lon,alt ; ; find date and site depending on input flag ; site=' ' read,site,prompt='Enter ARM site (nsa,sgp,twpc1,twpc2): ' site=strcompress(site,/remove_all) curdate=' ' read,curdate,prompt='Enter date (yyyymmdd): ' curdate=strcompress(curdate,/remove_all) ; ; Format the date to process ; print,'date ',curdate,'site',site curdate=strcompress(string(curdate),/remove_all) date_string_fm_adtg, curdate, date_string ; ; Get the data ; get_mwr, curdate,site,datastream,'one' ; ; Calculate fractional hour and Julian day ; ijday_ihrfrac_fm_numsec,base_time,time_offset,hrfrac,jday,yy,mm,dd,hh,mi,ss ; ; Calculate IDL Julian day for plotting ; julian_day=make_array(n_elements(jday),/double,value=-9999) julian_day=julday(mm,dd,yy,hh,mi,ss) ;*************************** ; Enter start time below ;*************************** stime=3 closetime=hrfrac-stime closest=min(abs(closetime),indst) stime=hrfrac[indst] ;*************************** ; Enter end time below ;************************** etime=6 closetime=hrfrac-etime closest=min(abs(closetime),indet) etime=hrfrac[indet] vap=vap[indst:indet] liq=liq[indst:indet] liq=liq*10^4 julian_day=julian_day[indst:indet] time_offset=time_offset[indst:indet] tbsky23=tbsky23[indst:indet] tbsky31=tbsky31[indst:indet] irtemp=irtemp[indst:indet] wetwindow=wetwindow[indst:indet] ; ; Find the size of the arrays ; numtimes=n_elements(time_offset) ; ; If no irtemp data, create a null array so program will work ; if n_elements(irtemp) eq 0 then irtemp=make_array(numtimes,/float,value=-1.0) ;***************** ; Set up the plot ;***************** !p.background=!d.n_colors-1 loadct,39 window,0,xsize=600,ysize=500,TITLE='mwr',/pixmap !p.charsize=1.5 !p.multi = [0,1,1] !x.range=[julian_day[0],julian_day[numtimes-1]] !x.style=1 !y.style=1 !x.ticklen=0.04 dummy=label_date(date_format=['%H:%I']) pos1=[0.15,0.1,0.9,0.4] pos2=[0.15,0.5,0.9,0.8] ; ; Set up the colors ; 0=black 130=green 25=purple 50=blue 250=red ; color1=0 ;black color2=250 ;red ; ; Set up some values for xyouts ; xmax=julian_day[numtimes-1] xmin=julian_day[0] dx=(julian_day[numtimes-1]-julian_day[0])/100. charkey=1.5 ;window ; ; Plot 1 - liq ; ; ; New method to determine min and max value ; dmax=max(liq) result=where(liq lt 0,count) if count gt 0 then liq[result]=1e6 dmin=min(liq) if (min(irtemp) eq -1.0 and max(irtemp) eq -1.0) then begin plot,julian_day,liq,$ color=color1,psym=4,symsize=0.2,$ ytitle='g/m!E2',$;'cm',$ yrange=[dmin,dmax],$ position=pos2,xtitle='Time (UTC)',$ xtickformat='label_date',xtickunits='time' endif else begin plot,julian_day,liq,$ color=color1,psym=4,symsize=0.2,$ ytitle='g/m!E2',$;'cm',$ yrange=[dmin,dmax],$ position=pos2,$ xtickformat='(A1)',xtickunits='time' endelse ; ; Add the key ; dy=(dmax-dmin)/100. xyouts,xmin+8*dx,dmax+5*dy,alignment=0.0,'LWP',/data,color=color1,charsize=charkey ; ; Plot 4 - IR ; ; ; New method to determine min and max value ; if n_elements(irtemp) ne 0 then begin min_val=min(irtemp)-10. max_val=max(irtemp)+10. dmin=max([200.,min_val]) dmax=min([330.,max_val]) endif if (min(irtemp) eq -1.0 and max(irtemp) eq -1.0) then begin somedata=findgen(numtimes) plot,julian_day,somedata,ystyle=1,/nodata,/noerase,$ yrange=[somedata[0],somedata[n_elements(somedata)-1]],$ position=pos1 xyouts,((julian_day[numtimes-1]-julian_day[0])/2.)+julian_day[0],$ ((somedata[numtimes-1]-somedata[0])/2.)+somedata[0],$ 'Missing IR Brightness Temperature Data',$ color=color1,charsize=charkey,/data,alignment=0.5 endif else begin plot,julian_day,irtemp,/noerase,$ color=color1,psym=4,symsize=0.2,$ ytitle='K',xtitle='Time (UTC)',$ yrange=[dmin,dmax],xtickunits='time', $ position=pos1,$ xtickformat='label_date' dy=(dmax-dmin)/100. xyouts,xmin+8*dx,dmax+5*dy,alignment=0.0,'IR Brightness Temperature',/data,color=color1,charsize=charkey endelse ; ; Add title to plot page ; if site eq 'twpc1' then capsite='TWP C1' if site eq 'twpc2' then capsite='TWP C2' if site eq 'nsa' then capsite='NSA' if site eq 'sgp' then capsite='SGP' a_string=capsite+' Microwave Radiometer, '+date_string charsize_title=2.2 ;window xyouts, 0.5, 0.93, alignment=0.5,a_string, /normal, color=0,$ charsize=charsize_title charsize_title=1.9 ;window xyouts, 0.5, 0.89, alignment=0.5,datastream, /normal, color=0,$ charsize=charsize_title ;*************************************************** ; Create the gif file ;*************************************************** ; load in the colors common colors,r_orig,g_orig,b_orig,r_curr,g_curr,b_curr r=r_curr & g=g_curr & b=b_curr ; Name of the image file minus the .ext image_name='/data/mace4/arm_data/temp_image/'+$ datastream+'.'+curdate+'.'+strcompress(fix(stime),/remove_all)+$ '_'+strcompress(fix(etime),/remove_all) print,image_name ; Create a png file write_png,image_name+'.png',tvrd(),r_curr,g_curr,b_curr ; Convert the png file to gif unix_command='convert '+image_name+'.png'+' '+image_name+'.gif' spawn,unix_command ; Remove the png file unix_command='rm '+image_name+'.png' spawn,unix_command end