pro plot_1panel_curtain;,pnum,dbz,sub_pt,idx_ovp,top_color,dmin_radar,dmax_radar,$ ;height_radar,isx,isy,pos,mytable,lon_sub,fs1,p0,p1,dbz_curtain date_time_orbit='20180209.141358.022448' ; Read the curtain fid=ncdf_open('ku_curtain_measured.'+date_time_orbit+'.cdf') vid=ncdf_varid(fid,'dbz_curtain') & ncdf_varget,fid,vid,dbz_curtain vid=ncdf_varid(fid,'ku_sub_pt') & ncdf_varget,fid,vid,ku_sub_pt vid=ncdf_varid(fid,'height_ku') & ncdf_varget,fid,vid,height_radar vid=ncdf_varid(fid,'lon_ku_sub') & ncdf_varget,fid,vid,lon_ku_sub ncdf_close,fid fid=ncdf_open('ku_zFactorMeasured.'+date_time_orbit+'.cdf') vid=ncdf_varid(fid,'grid_lat') & ncdf_varget,fid,vid,lat_ku vid=ncdf_varid(fid,'grid_lon') & ncdf_varget,fid,vid,lon_ku vid=ncdf_varid(fid,'grid_var') & ncdf_varget,fid,vid,mdbz_ku vid=ncdf_varid(fid,'surface_height') & ncdf_varget,fid,vid,sfc_ku ncdf_close,fid fid=ncdf_open('gmi_89H.'+date_time_orbit+'.cdf') vid=ncdf_varid(fid,'ulat_ovp') & ncdf_varget,fid,vid,ulat_ovp vid=ncdf_varid(fid,'llat_ovp') & ncdf_varget,fid,vid,llat_ovp vid=ncdf_varid(fid,'rcolon_ovp') & ncdf_varget,fid,vid,rcolon_ovp vid=ncdf_varid(fid,'lcolon_ovp') & ncdf_varget,fid,vid,lcolon_ovp vid=ncdf_varid(fid,'lat') & ncdf_varget,fid,vid,lat_gmi vid=ncdf_varid(fid,'lon') & ncdf_varget,fid,vid,lon_gmi vid=ncdf_varid(fid,'data') if vid eq -1 then vid=ncdf_varid(fid,'chan89') ncdf_varget,fid,vid,chan89_gmi vid=ncdf_varid(fid,'chan37') if vid ne -1 then ncdf_varget,fid,vid,chan37_gmi vid=ncdf_varid(fid,'chan166') if vid ne -1 then ncdf_varget,fid,vid,chan166_gmi vid=ncdf_varid(fid,'lat_range_rings') & ncdf_varget,fid,vid,lat_cir vid=ncdf_varid(fid,'lon_range_rings') & ncdf_varget,fid,vid,lon_cir vid=ncdf_varid(fid,'lat_sub_satellite') & ncdf_varget,fid,vid,lat_sub_sat vid=ncdf_varid(fid,'lon_sub_satellite') & ncdf_varget,fid,vid,lon_sub_sat ncdf_close,fid rlon_ovp=rcolon_ovp llon_ovp=lcolon_ovp hdir='/Volumes/mace-group5/gpm/hid/Ranked_HID_output_2020/20180209_14/' hfile='RVI_C-band_20180209_141112.lat_lon.nc' parts=strsplit(hfile,'_',/extract) hdate=parts[2] hhour=strmid(parts[3],0,2) hmin=strmid(parts[3],2,2) hsec=strmid(parts[3],4,2) hid_tag='old' fid=ncdf_open(hdir+hfile) xid=ncdf_varid(fid,'time') & ncdf_varget,fid,xid,time_offset xid=ncdf_varid(fid,'x') & ncdf_varget,fid,xid,x_m xid=ncdf_varid(fid,'y') & ncdf_varget,fid,xid,y_m xid=ncdf_varid(fid,'z') & ncdf_varget,fid,xid,z_m xid=ncdf_varid(fid,'origin_latitude') & ncdf_varget,fid,xid,olat xid=ncdf_varid(fid,'origin_longitude') & ncdf_varget,fid,xid,olon xid=ncdf_varid(fid,'linear_reflectivity') & ncdf_varget,fid,xid,ze xid=ncdf_varid(fid,'linear_zdr') & ncdf_varget,fid,xid,zdr ;xid=ncdf_varid(fid,'KDP') & ncdf_varget,fid,xid,kdp ;xid=ncdf_varid(fid,'RHOHV') & ncdf_varget,fid,xid,rhohv xid=ncdf_varid(fid,'log_reflectivity') & ncdf_varget,fid,xid,dbz xid=ncdf_varid(fid,'log_zdr') & ncdf_varget,fid,xid,dbz_zdr xid=ncdf_varid(fid,'HID') if xid eq -1 then xid=ncdf_varid(fid,'HID_class_01') ncdf_varget,fid,xid,hid xid=ncdf_varid(fid,'hid_score_DZ') & ncdf_varget,fid,xid,hid_dz ;drizzle xid=ncdf_varid(fid,'hid_score_RN') & ncdf_varget,fid,xid,hid_rn ;rain xid=ncdf_varid(fid,'hid_score_CR') & ncdf_varget,fid,xid,hid_cr ;ice crystals xid=ncdf_varid(fid,'hid_score_AG') & ncdf_varget,fid,xid,hid_ag ;aggregates xid=ncdf_varid(fid,'hid_score_WS') & ncdf_varget,fid,xid,hid_ws ;wet snow xid=ncdf_varid(fid,'hid_score_VI') & ncdf_varget,fid,xid,hid_vi ;vertical ice xid=ncdf_varid(fid,'hid_score_GL') & ncdf_varget,fid,xid,hid_gl ;graupel xid=ncdf_varid(fid,'hid_score_GH') & ncdf_varget,fid,xid,hid_gh ;graupel HD xid=ncdf_varid(fid,'hid_score_HA') & ncdf_varget,fid,xid,hid_ha ;hail xid=ncdf_varid(fid,'hid_score_HA') & ncdf_varget,fid,xid,hid_ha ;hail xid=ncdf_varid(fid,'hid_score_BD') & ncdf_varget,fid,xid,hid_bd ;big drops/melting hail xid=ncdf_varid(fid,'point_latitude') & ncdf_varget,fid,xid,lat_hid_3d xid=ncdf_varid(fid,'point_longitude') & ncdf_varget,fid,xid,lon_hid_3d xid=ncdf_varid(fid,'temperature') if xid ne -1 then ncdf_varget,fid,xid,temp_hid ;xid=ncdf_varid(fid,'rain') & ncdf_varget,fid,xid,rain_rate ncdf_close,fid ulat_hid=max(lat_hid_3d) llat_hid=min(lat_hid_3d) llon_hid=min(lon_hid_3d) rlon_hid=max(lon_hid_3d) if llon_hid lt 0 then lcolon_hid=360.0+llon_hid else lcolon_hid=llon_hid if rlon_hid lt 0 then rcolon_hid=360.0+rlon_hid else rcolon_hid=rlon_hid lidx=where(lon_ku_sub ge llon_hid and lon_ku_sub le rlon_hid) ;************************* ; Temp image ;************************* ; Set up plot size pxdim=500 & pydim=500 ; Position the plots xl=0.12 & xr=0.90 yb=0.12 & yt=0.85 sx=0.07 sy=0.17 numplots_x=1 numplots_y=1 position_plots,xl,xr,yb,yt,sx,sy,numplots_x,numplots_y,pos ; Colorbar position cbpos=pos ;cbpos[*,0]=pos[*,2]+0.08 ;vertical ;cbpos[*,2]=cbpos[*,0]+0.01 cbpos[*,1]=pos[*,3]+0.07 ;horizontal cbpos[*,3]=cbpos[*,1]+0.02 dx=0.01 & dy=0.01 ;Clear plot space pnum=0 p0=plot([0,1],[0,1],position=pos[pnum,*],/buffer,dimensions=[pxdim,pydim],axis_style=4,/nodata) d=p0.convertcoord([pos[pnum,0],pos[pnum,2]],[pos[pnum,1],pos[pnum,3]],/normal,/to_device) isx=(d[0,1,0]-d[0,0,0]) isy=(d[1,1,0]-d[1,0,0]) ; Top is the last color to scale 256 colors, 0-255 top_color=252 ; Colortable 0-252 253=white mytable=colortable(39,ncolors=254) ;254=hot pink ;gray=255 mytable=[mytable,transpose([238,18,137]),transpose([220,220,220])] mycbtable=mytable[0:top_color,*] fs1=12 sfm=10 ;***************************** ; Plot curtain - Ku or Ka - dbz ;***************************** dmin_radar=0 dmax_radar=35 data_var=dbz_curtain[lidx,*] data_image=bytscl(data_var,top=top_color,min=dmin_radar,max=dmax_radar) result=where(data_var lt -9000,count) if count gt 0 then data_image[result]=255 ;gray hidx=where(height_radar lt 10) p1=image(data_image[*,hidx],/current,image_dimensions=[isx,isy],$ position=pos[pnum,*],rgb_table=mytable) c1=contour(data_var[*,hidx],lon_ku_sub[lidx],height_radar[hidx],xtickinterval=0.5,$ ytitle='Height (km)',xtitle='Longitude',irregular=0,xtickdir=1,ytickdir=1,$ xstyle=1,ystyle=1,/nodata,/current,position=pos[pnum,*],font_size=fs1,$ axis_style=2,xrange=[lon_ku_sub[lidx[0]],lon_ku_sub[lidx[-1]]]) c0=colorbar(rgb_table=mycbtable,range=[dmin_radar,dmax_radar],orientation=0,$ position= reform(cbpos[pnum,*]),font_size=10,tickdir=1,border_on=1) t1=text(pos[pnum,0]+0*dx,pos[pnum,3]+10*dy,$ 'GPM Ku Band DPR (dBZ)',font_size=fs1) p0.save,'test_curtain_focus.png',height=pydim stop end