pro maskplot,arg,mask,dbz,time,height,XRANGE=xra,YRANGE=yra,DATESTR=datestr if not(keyword_set(XRANGE)) then xra=[min(time),max(time)] if not(keyword_set(YRNAGE)) then yra=[0,max(height)] if not(keyword_set(datestr)) then datestr=' ' ;--------------MAKE MASK-OPTICAL DEPTH PLOT---------------------------- loadct,41,file='/home/mshupe/IDLcode/colorscopy.tbl' site='nsa' pos_rad=[.1,.10,.85,.96] pos_cbv=[.87,.12,.91,.92] ;make the mask plot contour,mask,time,height,/nodata,position=pos_rad,/xstyle,xrange=xra,font=-1,$ title='!5Cloud Classification Mask, '+strupcase(site)+', '+datestr,$ ytitle='!5Height [km,AGL]',background=0,yrange=yra,/ystyle,color=1 levels=[1,2,3,4,5,6,7,8,9] labels=['Rain','Snow','sLiq','Liq','Driz','sIce','Ice','Mixed','Uncrt'] nlev=9 colors=[255,2,150,190,220,86,40,120,1] contour,mask,time,height,position=pos_rad, levels=levels,c_colors=colors,$ /fill,font=-1,/xstyle,xrange=xra,/ystyle,yrange=yra,/noerase,color=1 contour,dbz,time,height,position=pos_rad,/noerase,/follow,/xstyle,/ystyle,ytickname=blk,$ xrange=xra,yrange=yra,font=-1,levels=[-90,50],c_labels=[0,0],color=1 ;add colorbar iwh=[0,4,3,2,7,5,6,1,8] labels=labels[iwh] & colors=colors[iwh] wid=(pos_cbv[3]-pos_cbv[1])/nlev cb_x=[pos_cbv[0],pos_cbv[0],pos_cbv[2],pos_cbv[2]] cb_y=[pos_cbv[3]-wid,pos_cbv[3],pos_cbv[3],pos_cbv[3]-wid] for i = 0,nlev-1 do begin polyfill,cb_x,cb_y-i*wid,color=colors[i],/norm xyouts,cb_x[2]+0.01,cb_y[3]-i*wid+0.02,labels[i],/norm,font=-1,color=1 endfor xyouts,cb_x[2]+0.01,pos_cbv[3]+0.02,'!5Retrieval Type',alignment=0.5,font=-1,/norm,color=1 fname=site+'web_mask.'+arg+'.png' tvlct,r,g,b,/get write_png,fname,tvrd(true=1),r,g,b end pro test_maskplot,arg farg='*'+arg+'*.cdf' files=findfile(farg,count=numf) args=strmid(files,23,8) for i=0,numf-1 do begin fid=ncdf_open(files[i]) ncdf_varget,fid,ncdf_varid(fid,'reflectivity'),dbz ncdf_varget,fid,ncdf_varid(fid,'retmask'),mask ncdf_varget,fid,ncdf_varid(fid,'time'),time ncdf_varget,fid,ncdf_varid(fid,'height'),height ncdf_close,fid maskplot,args[i],mask,dbz,time,height,datestr=args[i] endfor end