;History ; 2015/03/10 use OMI periodal avearage instead of matchup (due to the lack of data) ; 2015/02/04 add OMI AAOD w.r.t. wavelength (hard-coded) ; 2014/11/24 add 2014 data and 1020 channel ; 2014/04/22 added output var: cvf, cvc, rvf, rvc ; 2014/04/21 output median K ( and quadratic fit coefficients) and n values ;2014/04/18 Logarithmic *(-1.wavelength axis. Add AERONET 440 and 670nm ;2014/04/11 whisker plot for spectral dependence of SSA ;2014/01/25 whisker plot ;2014/01/21 bin plot ;2014/01/17: plot SSA_MFRSR - SSA_AERONET vs AOT440 ;2013/12/09 add MFRSR Error bars ;2013/12/13 add filters and AERONET diagnstics: sphericity, water, sky error, sun_error ;2013/12/09 add filters and AERONET diagnstics: sphericity, water, sky error, sun_error ;2013/07/08 color index (FSC_color, cgcolor) are changed to adjust to linux machine ;2013/07/02 To compare the averaged SSA (+/- 30 min) between MFRSR and AERONET mode='print' ;mode='screen' ;filter ;sza_min=30 & sza_max=75 ;do not use (we miss one more measurement) sza_min=20 & sza_max=75 ;BrC paper aot440_min = 0.40 ; GSFC sphericity_min=95 ; minimal accepted sphericity [%] sky_error_max = 5.0 ; maximal sky error [%] delta_aot_max=0.01 mw_std_max = 0.02 ; max StDev of MFRSR retrievals of SSA allowed (currently it is not used) mw_error_max = 0.02 ; max StDev of MFRSR retrievals of SSA allowed ;mw_error_max = 0.05 ; max StDev of MFRSR retrievals of SSA allowed delta_ssa440_max = 0.01 ; 22 points maximal allowed difference between AERONET SSA440 and MFRSR SSA440 dir='./' & name='bolivia2' & title=' Santa Cruz, Bolivia 2007' & name_output='Bolivia_spec_SSA_whisker'+'AODge'+string(aot440_min,format='(f4.2)') y_min=0.75 & y_max=0.97 & y_lebel=y_min-0.01 read_matchup_allchan_adderr_v3,dir,name, delta_ssa440_max, sza_min, sza_max, aot440_min, sphericity_min, sky_error_max, delta_aot_max, mw_std_max, mw_error_max, aot_mfrsr_spec, w_mfrsr_spec, k_mfrsr_spec, aot_aero_spec, w_aero_spec, k_aero_spec, n_aero_spec, cvf, cvc, rvf, rvc,e_tot_aer,sf,sc,alb440,alb670,alb870,alb1020 ;read_matchup_allchan,dir,name, delta_ssa440_max, sza_min, sza_max, aot440_min, sphericity_min, sky_error_max, delta_aot_max, mw_std_max, mw_error_max, aot_mfrsr_spec, w_mfrsr_spec, k_mfrsr_spec, aot_aero_spec, w_aero_spec, k_aero_spec, n_aero_spec, cvf, cvc, rvf, rvc data = w_mfrsr_spec ;mfrsr data2= w_aero_spec ;aeronet sample_number=size(w_mfrsr_spec) print,'Sample=', sample_number[2] real_chan = [305,311,317,325,332,368,440] real_chan2= [440,670,870,1020] vbin = [305,311,317,325,332,368,430] ; MFRSR this just location of the box vbin2 = [440,670,870,1020]; AERONET ; Set plotting mode if mode eq 'screen' then begin set_plot,'X' ;& device,pseudo_color=8 endif else begin set_plot,'PS' & device,/color,/landscape,filename=name_output+'.ps' endelse !x.thick=3 !y.thick=3 !P.Thick=3 plot_oi, [0,1], /nodata, yrange=[y_min,y_max], xrange=[290, 1050], background=cgcolor('white'), color=cgcolor('black'), $ xtickformat='(A1)', ytitle='Single Scattering Albedo', YStyle=1, XStyle=1, xticks=1, $ ;xtickformat='(A1)' means 'turnnig labels off' charsize=1.5, charthick=2, xtitle='Wavelength, nm' ;cgPlot, [0,1], /nodata, yrange=[y_min,1], xrange=[300, 700], $ ; xtickformat='(A1)', ytitle='k', title=title, xtitle='wavelength', YStyle=1, XStyle=1, xticks=1 ;xtickformat='(A1)' means 'turnnig labels off' index = vbin & index2 =vbin2 ; MFRSR width = 4 ;nm ;cgBoxPlot_noout, data, /overplot, xlocation=index, width=width, $ cgBoxPlot, data[0:5,*], /overplot, xlocation=index[0:5], width=width, $ color='light cyan', /fillboxes, boxcolor='light cyan', outlinecolor='blue', outliercolor='blue', stat=stat_mfrsr1, thick=2 width = 10 ;nm cgBoxPlot, data[6,*], /overplot, xlocation=index[6], width=width, $ color='light cyan', /fillboxes, boxcolor='light cyan', outlinecolor='blue', outliercolor='blue', stat=stat_mfrsr2, thick=2 ; fitting med_data = [stat_mfrsr1.median,stat_mfrsr2.median] print, 'MFRSR median SSA (305, 311, 317, 325, 332, 368, 440 nm' print, med_data num_chan=7 width = 10 ;nm AERONET ;cgboxplot_noout, data2, /overplot, xlocation=index2, width=width, $ cgboxplot, data2, /overplot, xlocation=index2, width=width, $ color=cgcolor('tan6'), boxcolor='tan6', /fillboxes, outlinecolor='red',outliercolor='red', stat=stat_aero, thick=2 med_data2 = stat_aero.median print, 'AERONET median SSA (440, 670, 870, 1020 nm)' print, med_data2 xx2 = alog(real_chan2) yy2 = alog(med_data2) result2 = poly_fit(xx2,yy2,1,v_fit2,/double) result2_limit = poly_fit(xx2[0:2],yy2[0:2],1,v_fit2,/double) ;670, 870, and 1020 ;OMI SSA ;In fact, OMI retrieve only 388 nm ;354 nm is estimated value assuming spectral dependence. ;This is just for visualization. ;388 vbin3 = 388. w388 = [0.9165, 0.9365, 0.9298, 0.9282, 0.9329] ;354 vbin4 = 354. w354 = [0.9053, 0.9261, 0.9216, 0.9173, 0.9222] ;width = 6 ;nm width = 10 ;nm ;cgBoxPlot_mod cgBoxPlot, w388, /overplot, xlocation=vbin3, width=width, $ color='Pale Green', /fillboxes, boxcolor='Pale Green', outlinecolor='Olive', outliercolor='Olive', stat=stat_omi1, thick=2 width = 8 ;nm ;354 nm is estimated value in OMI cgBoxPlot, w354, /overplot, xlocation=vbin4, width=width, $ color='Pale Green', /fillboxes, boxcolor='Pale Green', outlinecolor='Olive', outliercolor='Olive', stat=stat_omi2, thick=2 stat_omi = [stat_omi2.median, stat_omi1.median] omi1_max = stat_omi1.median + 0.03 omi1_min = stat_omi1.median - 0.03 omi2_max = stat_omi2.median + 0.03 omi2_min = stat_omi2.median - 0.03 plots,[388,388],[omi1_min,omi1_max],thick=2,color=cgcolor('Olive') plots,[354,354],[omi2_min,omi2_max],thick=2,color=cgcolor('Olive') ;plot_AAOD_whisker_bolivia_v2.pro (calculate SSA(BC)) ;wave_bc= [305, 311, 317, 325, 332, 368] ;ssa_bc = [0.92195475, 0.92276776, 0.92389516, 0.92523587, 0.92622757, 0.93017529] ;oplot, wave_bc, ssa_bc, psym=cgsymcat(16), color=cgcolor("Red"), symsize=1.5 ; X labels wavelengths index3 = [305,332,368,440,670,870,1020] labels = string(index3,format='(I4)') cgText, index3, y_lebel, labels, Alignment=0.5, color=cgcolor('black'), charsize=1.5, charthick=2 print, 'AOD440'+string(aot440_min,format='(f4.2)')+' SZA>'+string(sza_min,format='(i2)')+'!uo!n'+' Number = '+string(sample_number[2],format='(i3)') print, 'Delta_AOD440 < '+string(delta_aot_max,format='(f4.2)')+' '+'Delta_SSA440 < '+string(delta_ssa440_max,format='(f4.2)') ;cgText,350,y_max-0.12, 'AOD!d440!n>'+string(aot440_min,format='(f4.2)')+' SZA>'+string(sza_min,format='(i2)')+'!uo!n'+' Number = '+string(sample_number[2],format='(i3)'),charsize=1.5,color=0 ;cgText,350,y_max-0.17, cggreek('Delta',/capital)+'AOD!d440!n <'+string(delta_aot_max,format='(f4.2)')+' '+cggreek('Delta',/capital)+'(SSA!d440!n) < '+string(delta_ssa440_max,format='(f4.2)'),charsize=1.5,color=0 ; print number in each spectral bin ;cgText, 6,y_min+0.01, 'Sample='+string(sample_number[2],format='(i3)'),Alignment=0.5;, color=cgcolor('black') Device, Set_Font='Helvetica Bold', /TT_Font cgText, 0.9, 0.85, 'b', ALIGNMENT=0.5, /NORMAL, charsize=4, charthick=3, font=1 if mode eq 'print' then device,/close stop end