; pro fraction_within_v01 ; defsysv, '!tkref', 273.16d defsysv, '!tkmelt', 273.15d ; common plotting, xsize_inch, ysize_inch, width_inch, width_normal, height_inch, $ height_normal, height_spacer_inch, height_spacer_normal, width_spacer_inch, width_spacer_normal, $ yoffset_inch, yoffset_normal, xoffset_inch, xoffset_normal common normal_coordinates, x_coord_min_normal,y_coord_min_normal,x_coord_max_normal,y_coord_max_normal ; tvlct, [ 0, 255, 0, 0, 255, 0, 150, 255], $ [ 0, 0, 0, 255, 0, 255, 150, 140], $ [ 0, 0, 255, 0, 255, 255, 150, 35] color_T = 2 color_D10 = 1 color_P14 = 0 gray = 6 ; circle_size = 0.03 ; lu1 = 1 infilename = 'revised.csv' ; ;..find out how big the file is ; openr, lu1, infilename input_string = '' ndata = 0 while not eof(lu1) do begin readf, lu1, input_string ndata = ndata + 1 endwhile close, lu1 print, ndata ; ;..there are two header lines ; openr, lu1, infilename readf, lu1, input_string print, input_string readf, lu1, input_string print, input_string input_data = fltarr(9,ndata-2) readf, lu1, input_data close, lu1 yyyymmdd = reform(input_data(0,*)) hh0 = reform(input_data(1,*)) hhmmss1 = reform(input_data(2,*)) hhmmss2 = reform(input_data(3,*)) hhmmss3 = reform(input_data(4,*)) n05 = reform(input_data(5,*)) N = reform(input_data(6,*)) Tlow = reform(input_data(7,*)) tMP = reform(input_data(8,*)) ; print, min(n05), max(n05), mean(n05) print, min(Tlow), max(Tlow), mean(Tlow) print, min(tMP), max(tMP), mean(tMP) ; ;..temp. - aerosol (Method #1) fit coefficients from Tab. 1 (revision) ; fit_1_a = exp(-14.89d) fit_1_b = 4.79d fit_1_c = 0.0076d fit_1_d = 0.86d N_fit_P14 = fit_1_a * (!tkref-(Tlow+!tkmelt))^fit_1_b * n05^(fit_1_c*(!tkref-(Tlow+!tkmelt))+fit_1_d) index = where(N gt N_fit_P14/2 and N le N_fit_P14*2, index_count) for i = 0, index_count - 1 do begin print, N_fit_P14[index[i]]/2, N[index[i]], N_fit_P14[index[i]]*2 endfor print, float(index_count) / float(n_elements(N)) ; ;..temp. - aerosol (D10) fit coefficients from Tab. 1 ; fit_D10_a = exp(-9.73d) fit_D10_b = 3.33d fit_D10_c = 0.0264d fit_D10_d = 0.0033d N_fit_D10 = fit_D10_a * (!tkref-(Tlow+!tkmelt))^fit_D10_b * n05^(fit_D10_c*(!tkref-(Tlow+!tkmelt))+fit_D10_d) index = where(N gt N_fit_D10/2 and N le N_fit_D10*2, index_count) for i = 0, index_count - 1 do begin print, N_fit_D10[index[i]]/2, N[index[i]], N_fit_D10[index[i]]*2 endfor print, float(index_count) / float(n_elements(N)) ; end