;+ ; NAME: ; cdf_betas_sum ; ; PURPOSE: ; Contruct Membership Beta Functions (MBFs) parameters for each ; hydrometeor type and fuzzy set based on scattering simulations (Dolan and ; Rutledge, 2009) ; ; (See cdf_fhc.pro for more details of the beta functions.) ; ; Anticipate having 6 input data fields and 10 fuzzy sets (HID types) ; ; Input data fields: HID types: Fuzzy set: ;------------------- ---------- ---------- ; Z_h Drizzle 1 ; Z_dr Rain 2 ; K_dp Ice Crystals 3 ; LDR Aggregates 4 ; rho_hv[0] Wet Snow 5 ; Temperature Vertical Ice 6 ; Low Density Graupel 7 ; High Density Graupel 8 ; Hail 9 ; Big Drops 10 ; USAGE: ; cdf_betas,mbf_sets[use_temp=use_temp] ; ; INPUT PARAMETERS: ; None. ; ; KEYWORDS (OPTIONAL): ; use_temp --IF set, include temperature as one of the MBFS ; ; OUTPUT PARAMETERS: ; mbf_sets-- Structure of MBF settings for each of the radar fields ; and fuzzy sets. This structure is then passed to the ; classification algorithm, cdf_fhc.pro. ; ; AUTHOR: ; Kyle C. Wiens ; kwiens@atmos.colostate.edu ; ; DATE: ; 26 April 2002. ; ; MODIFICATIONS: ; 28 April 2002: Changed the fuzzy sets to include vertical ice and ; get rid of low/high density snow. ; ; 15 May 2002: Changed KDP MBF for vertical ice to be unity from -0.2 ; to -0.6. Used to be from -0.6 to 0.0. This didn't make much difference. ; ; 19 February 2003: Changed MBFs for wet/dry graupel and Wet Snow to ; conform to Liu and Chandrasekar (2000). Changed MBF for vertical ice to ; conform to Carey and Rutledge (1998). ; ;; 29 January 2009: Changed the MBFS to the theory-based S-band values. NOTE: ; LDR VALUES WERE NOT MODIFIED. ; ;; 08 February 2012: Changed the categories and the MBF values based on scattering simulations. NOTE: LDR values from ;; simulations were added. BD ;; 10 June 2012: Adjusted MBFs for performance. BD ;- PRO cdf_betas_sum,mbf_sets,use_temp=use_temp,plot=plot,eps=eps,png=png me = '-->cdf_betas_sum ' print,me+' 10 Category Summer S-band HID' n_types = 10 ; Define structures to hold the beta ; function parameters for each input ; variable and fuzzy set. Zh_set = {a:FLTARR(n_types),b:FLTARR(n_types),m:FLTARR(n_types)} Zdr_set ={a:FLTARR(n_types),b:FLTARR(n_types),m:FLTARR(n_types)} Kdp_set ={a:FLTARR(n_types),b:FLTARR(n_types),m:FLTARR(n_types)} LDR_set ={a:FLTARR(n_types),b:FLTARR(n_types),m:FLTARR(n_types)} rho_set ={a:FLTARR(n_types),b:FLTARR(n_types),m:FLTARR(n_types)} T_set = {a:FLTARR(n_types),b:FLTARR(n_types),m:FLTARR(n_types)} ; Define the center, width and slope ; for each of the beta functions. ; a,b,m[0] -> drizzle ; a,b,m[1] -> rain ; .... ; a,b,m[6] -> VI ;;;;;;SBAND;;;;;;;;;;;;;;;; ;HID types: Fuzzy set: ;------------------- ---------- ;Drizzle 1 ; Rain 2 ;Ice Crystals 3 ;Aggregates 4 ;Wet Snow 5 ;Vertical Ice 6 ;Low Density Graupel 7 ;High Density Graupel 8 ;Hail 9 ;Big Drops 10 ;------------------------------------ ; Horizontal Reflectivity (Zh) (DONE) ;------------------------------------ m = [2.0,$ ;Drizzle 41.5,$ ;Rain -3.0,$ ;CR 17.0,$ ;AG 21.,$ ;WS -1.1,$ ;VI BD MOD 2/13 37.0,$ ;LDG 49,$ ;HDG 58.0,$ ;Hail 57.0] ;Big Drops a = [29.,$ ;Drizzle 15.5,$ ;Rain 22.0,$ ;CR 17.0,$ ;AG 22.,$ ;WS 25.1,$ ;VI BD MOD 2/13 8.0,$ ;LDG 9.0,$ ;HDG 12.0,$ ;Hail 9.0] ;Big Drops b = [10.0,$ ; drizzle 10.,$ ; rain 20.0,$ ; crystals 15.0,$ ; dry aggregates 10.0,$ ; wet Snow 20.0,$ ;Vertical ice 8.0,$ ; dry graupel 6.0,$ ; wet graupel. 10.0,$ ;Hail 10.0] ;Big Drops Zh_set.a = a Zh_set.b = b Zh_set.m = m ;----------------------------------------- ; Differential Reflectivity (Zdr) (DONE) ; Need to do 2-D with ZH ;----------------------------------------- m = [0.35,$ ;Drizzle 2.6,$ ;Rain 3.2,$ ;CR 0.6,$ ;AG 1.3,$ ; Wet Snow -0.9,$ ;VI BD MOD 2/13 0.3,$ ;LDG 1.0,$ ;HDG 0.14,$ ;Hail 4.0] ;Big Drops a = [0.35,$ ;Drizzle 2.8,$ ;Rain 2.6,$ ;CR 0.6,$ ;AG 1.3,$ ;Wet Snow 1.0,$ ;VI BD MOD 2/13 0.8,$ ;LDG 1.9,$ ;HDG 0.55,$ ;Hail 1.7] ;Big Drops b = [5.0,$ ; drizzle 9.0,$ ; rain 10.0,$ ; crystals 7.0,$ ; dry aggregates 10.0,$ ; wet snow 10.0,$ ; Vertical ice 6.0,$ ; dry graupel. 8.0,$ ; wet graupel. 8.0,$ ;HAil 8.0] ;Big Drops Zdr_set.a = a Zdr_set.b = b Zdr_set.m = m ;------------------------------------------- ; Specific Differential Phase (Kdp) (DONE) ; Need to do 2-D with ZH. ;------------------------------------------- m = [0.01,$ ;Drizzle 3.7,$ ;Rain 0.043,$ ;CR 0.04,$ ;AG 0.13,$ ;WS -0.23,$ ;VI BD MOD 2/13 0.2,$ ;LDG 0.55,$ ;HDG 0.2,$ ;Hail 1.6] ;Big Drops a = [0.01,$ ;Drizzle 4.0,$ ;Rain 0.043,$ ;CR 0.5,$ ;AG 0.5,$ ;WS 0.23,$ ;VI BD MOD 2/13 0.56,$ ;LDG 1.155,$ ;HDG 0.8,$ ;Hail 1.5] ;Big Drops b = [2.0,$ ; drizzle 10.0,$ ; rain 6.0,$ ; crystals 1.0,$ ; dry aggregates 6.0,$ ;Wet snow 3.0,$ ;verticl ice 3.0,$ ; dry graupel. 3.0,$ ; wet graupel. 6.0,$ ;Hail 6.0] ;Big Drops Kdp_set.a = a Kdp_set.b = b Kdp_set.m = m ;------------------------------------------- ; Linear depolarization ratio (LDR) (DONE) ;------------------------------------------- a = [5.5,$ ;Drizzle 5.5,$ ; Rain 7.98000,$ ;CR 19.6750,$ ;AG 6.44500,$ ;Wet Snow 11.9,$ ;VI BD MOD 2/13 12.9200,$ ;LDG 13.2050,$ ;HDG 7.76500,$ ;Hail 3.06000] ;Big Drops m=[-48.38,$ ;DZ -25.00,$ ;Rain -23.3300,$ ;CR -46.4550,$ ;AG -13.6050,$ ;WS -29.68,$ ;VI BD MOD 2/13 -43.1800,$ ;LDG -35.8950,$ ;HDG -22.2450,$ ;Hail -34.0800] ; Big Drops b = [10.0,$ ; drizzle 4.0,$ ; rain 20.0,$ ; CR 20.0,$ ; dry snow 8.0,$ ; Wet snow 20.0,$ ; vertical ice 8.0,$ ; dry graupel 3.0,$ ; wet graupel 8.0,$ ;Hail 10.0] ;Big Drops LDR_set.a = a LDR_set.b = b LDR_set.m = m ;-------------------------------------------------- ; Correlation coefficient at zero lag (rho) (DONE) ;-------------------------------------------------- m = [1.0,$ ; drizzle 1.0,$ ; rain 1.0,$ ; crystals 0.998,$ ; dry aggregates 0.78,$ ; WS 0.97,$ ; vertical ice 1.0,$ ; dry graupel. 1.0,$ ; wet graupel.; 0.96,$ ;Hail 0.98] ; Big DRops a = [0.015,$ ;drizzle 0.02,$ ;rain 0.02,$ ; crystals 0.02,$ ; dry aggregates 0.20,$ ;WS 0.04,$ ; VI 0.01,$ ;dry graupel. 0.04,$ ;wet graupel. 0.1,$ ;Hail 0.04] ;Big Drops b = [3.0,$ ; drizzle 3.0,$ ; rain 3.0,$ ; crystals 3.0,$ ; dry aggregates 10.0,$ ;Wet Snow 3.0,$ ; vertical ice 1.0,$ ; dry graupel 4.0,$ ; wet graupel 3.0,$ ; Hail 3.0] ;Big Drops rho_set.a = a rho_set.b = b rho_set.m = m ;------------------------------------------ ; Temperature (T) (DONE) ;------------------------------------------ IF(Keyword_Set(use_temp)) THEN BEGIN m = [40.0,$ ; drizzle 48.0,$ ; rain -50,$ ; crystals -25.0,$ ; dry aggregates 1.0,$ ;Wet snow -50.0,$ ; vertical ice -50.0,$ ; dry graupel. -2.5,$ ; wet graupel 0.0,$ ;Hail 48.0] ;Big Drops a = [41.0,$ ;drizzle 51.0,$ ;rain 50.,$ ; crystals 26.0,$ ; dry aggregates 3.5,$ ;Wet Snow 50.0,$ ;vertical ice 50.0,$ ;dry graupel. 20.0,$ ;wet graupel 100.0,$ ;Hail 51.0] ;Big DRops b = [50.0,$ ; drizzle 30.0,$ ; rain 25.0,$ ; crystals 15.0,$ ; dry aggregates 5.0,$ ; Wet snow 25.0,$ ;Vertical Ice 25.0,$ ; Dry graupel 2.0,$ ; Wet graupel 5.0,$ ;Hail 30.0] ;Big Drops T_set.a = a T_set.b = b T_set.m = m print,me+'Using Temperature in HID' ENDIF ELSE BEGIN print,me+'No Temperature used in HID' ENDELSE ;-------- ; Done defining the Beta functions ;-------- mbf_sets = {Zh_set:Zh_set,$ Zdr_set:Zdr_set,$ Kdp_set:Kdp_set,$ LDR_set:LDR_set,$ rho_set:rho_set,$ T_set:T_set} IF(Keyword_Set(plot) ) THEN BEGIN ; THE FOLLOWING ARE EXTRA THINGS NOT ALWAYS NEEDED. FOR ; EXAMPLE, THE CODE BELOW WILL CREATE PLOTS OF ALL THE ; MBFS DEFINED ABOVE AND SEND THEM TO POSTSCRIPT OR PNG. ; Make the plots. label = ['Drizzle','Rain','Ice_Crystals','Dry_Aggreg',$ 'Wet_Snow','Vertical_Ice','Dry_Graupel','Wet_Graupel','HAil','Big_Drops'];,$ ; 'Large_Hail','SmHail_Rain','LgHail_Rain'] ; Set up the plotting device. device,true=24 device, get_visual_depth=visual_depth IF (visual_depth EQ 24) THEN DEVICE, TRUE=24, DECOMPOSE = 0,retain=2 IF (visual_depth eq 8) THEN device, pseudo_color=8, retain=2 window,/free,xsize = 640, ysize = 900,retain=2 ; Make color index 19 black tvlct,0,0,0,19 ; Make color index 0 white tvlct,255,255,255,0 IF((Keyword_Set(ps))OR(Keyword_Set(eps)))THEN BEGIN !p.charsize=0.75 xvsize= !d.x_vsize yvsize=!d.y_vsize aspect = Float(xvsize)/yvsize set_plot,'ps' IF(Keyword_Set(eps)) THEN BEGIN suffix ='.eps' encap = 1 ENDIF ELSE BEGIN suffix = '.ps' encap=0 ENDELSE ENDIF ELSE suffix ='.png' ;------------------------------------------------------ ; Make some fake data arrays. DZ = Findgen(701)/10. ; Zh ZDR = -2.0 + Findgen(801)/100. ; Zdr Kdp = -2.0 + Findgen(901)/100. ; Kdp LDR = -37.5 + Findgen(2951)/100. ; LDR rho_hv = 0.75 + Findgen(2501)/10000. ; rho_hv T = -50.0 + Findgen(1001)/10. ; Temperature. sh_rain_idx = 9 ; Indices for small and large hail mixed with rain. lh_rain_idx = 10 x0 = 0.1 x1 = 0.9 y0 = [.86,.70,.54,.38,.22,.06] y1 = [.98,.82,.66,.50,.34,.18] ; Loop over all 10 hydro types. FOR i = 0,N_Elements(Zh_set.m)-1 DO BEGIN IF((Keyword_Set(ps))OR(Keyword_Set(eps)))THEN BEGIN ; Get the device ready. device,filename='SMBF_'+label[i]+suffix,encap=encap device,/palatino,/bold device,Ysize=9.0,Xsize=9.0*aspect,yoffset=1.0,/Inches ENDIF ; Do the Zh MBF. beta = 1.0/(1.0 $ + ( ((DZ - Zh_set.m[i])/Zh_set.a[i])^2 )^Zh_set.b[i]) plot,DZ,beta,xrange=[min(DZ),max(DZ)],yrange=[0.0,1.1],$ xstyle=1,ystyle=1,yminor = 1,xminor=2,xtitle='Z!bh!n',$ color=19,position = [x0,y0[0],x1,y1[0]],$ /normal xyouts,5.0,0.5,label[i],/data,charsize=2.0,color=19 ; Do the Zdr MBF beta = 1.0/(1.0 + $ ( ((Zdr - Zdr_set.m[i])/Zdr_set.a[i])^2 )^Zdr_set.b[i]) plot,Zdr,beta,xrange=[min(Zdr),max(Zdr)],yrange=[0.0,1.1],$ xstyle=1,ystyle=1,yminor = 1,xminor=2,xtitle='Z!bdr!n',$ color=19,position = [x0,y0[1],x1,y1[1]],$ /normal,/noerase ; Do the Kdp MBF beta = 1.0/(1.0 + $ ( ((Kdp - Kdp_set.m[i])/Kdp_set.a[i])^2 )^Kdp_set.b[i]) plot,Kdp,beta,xrange=[min(Kdp),max(Kdp)],yrange=[0.0,1.1],$ xstyle=1,ystyle=1,yminor = 1,xminor=2,xtitle='K!bdp!n',$ color=19,position = [x0,y0[2],x1,y1[2]],$ /normal,/noerase ; Do the LDR MBF beta = 1.0/(1.0 + $ ( ((LDR - LDR_set.m[i])/LDR_set.a[i])^2 )^LDR_set.b[i]) plot,LDR,beta,xrange=[min(LDR),max(LDR)],yrange=[0.0,1.1],$ xstyle=1,ystyle=1,yminor = 1,xminor=2,xtitle='LDR',$ color=19,position = [x0,y0[3],x1,y1[3]],$ /normal,/noerase ; Do the rho_hv MBF beta = 1.0/(1.0 + $ ( ((rho_hv - rho_set.m[i])/rho_set.a[i])^2 )^rho_set.b[i]) plot,rho_hv,beta,xrange=[min(rho_hv),max(rho_hv)],yrange=[0.0,1.1],$ xstyle=1,ystyle=1,yminor = 1,xminor=2,xtitle='!7q!3!bhv!n[0]',$ color=19,position = [x0,y0[4],x1,y1[4]],$ /normal,/noerase ; Do the temperature MBF beta = 1.0/(1.0 + $ ( ((T - T_set.m[i])/T_set.a[i])^2 )^T_set.b[i]) plot,T,beta,xrange=[min(T),max(T)],yrange=[0.0,1.1],$ xstyle=1,ystyle=1,yminor = 1,xminor=2,$ color=19,xtitle='Temp (C)',$ position = [x0,y0[5],x1,y1[5]],$ /normal,/noerase IF((Keyword_Set(ps))OR(Keyword_Set(eps)))THEN device,/close IF(Keyword_Set(png)) THEN BEGIN ; Make a png file. tvg = tvrd() write_png,'SMBF_'+label[i]+suffix,tvg ENDIF ENDFOR set_plot,'x' ENDIF ;save,mbf_sets,filename='s_sim_sum.sav' END