; ;jeff snider, univeristy of wyoming, march 2006 ; pro initial_output, icolor, rdry, rsalt, rinsoluble, r, nconc_parcel, sixth_moment_radar, $ lwc_gm_per_cubic_meter, sratio_parcel, tk_parcel, p_parcel, $ tc_parcel, ssmax, w, clock, sr_crit, specific_volume, plot_text1, $ plot_text2, title ; common constants, gascon, rho_h2o, mw_nh42so4, rho_nh42so4, sigma_0, $ sigma_t, dsigmadmolality_nh42so4, dsigmadmolality_nacl, mw_h2o, $ mw_nacl, rho_nacl, tkmelt, c_nh42so4, a_nh42so4, c_nacl, a_nacl, $ cp_air_o, cp_h2o_o, mw_air, gravity, p0, alpha, beta_local, $ gascon_h2o, cw_h2o_o, tk_o, lv_o, ew_o, tk_aerosol, salt_type, $ epsilon, c_twomey, k_twomey, aerosol_type, right_tail, $ gascon_air, tc_base, tk_base, p_base, h_start, hmax, $ r0, dt, rmin, rmax, coef, epsilon_aerosol, specific_volume_meas, $ nchan, mw_salt, rho_salt, a_salt, c_salt, specific_volume_base, $ dsigmadmolality_salt, rho_insoluble, volume_insoluble_to_soluble, $ mixrat_tot_1,r_1,geo_sigma_1,mixrat_tot_2,r_2,geo_sigma_2, $ tk_start,p_start,sratio_start,mixrat_tot_3,r_3,geo_sigma_3 ; printf, 5, format = '(a28,i12)', '# of channels= ',nchan printf, 5, format = '(a28,f12.4)', '100.*sratio_start= ',100.*sratio_start printf, 5, format = '(a28,f12.4)', 'epsilon_aerosol ',epsilon_aerosol printf, 5, format = '(a28,f12.4)', 'rho_insoluble= ',rho_insoluble printf, 5, format = '(a28,f12.6)', 'mw_salt= ',mw_salt printf, 5, format = '(a28,f12.6)', 'mw_h2o= ',mw_h2o printf, 5, format = '(a28,f12.4)', 'rho_salt= ',rho_salt printf, 5, format = '(a28,4e12.4)', 'a_salt= ',a_salt printf, 5, format = '(a28,4e12.4)', 'c_salt= ',c_salt printf, 5, format = '(a28,e12.4)', 'dsigmadmolality_salt= ',dsigmadmolality_salt printf, 5, format = '(a)', 'r,nm rdry,nm rsalt,nm rinsoluble,nm 100.*(sr_crit-1.) n_cumulative,mg-1' ; n_cumulative = 0. for i = 0, nchan - 1 do begin if i eq 0 then begin n_cumulative = nconc_parcel(i) endif else begin n_cumulative = nconc_parcel(i) + n_cumulative endelse printf, 5, format = '(4f12.2,f12.6,f12.4)', 1.e9*r(i),1.e9*rdry(i),1.e9*rsalt(i),1.e9*rinsoluble(i),$ 100.*(sr_crit(i)-1.),n_cumulative*1.e-6*specific_volume endfor ; plot_text1 = +$ 'p(pa)= '+string(p_parcel,format='(e10.3)')+$ ' T(C)= '+string(tc_parcel,format='(f5.1)')+$ ' ss(%)= '+string((sratio_parcel-1.)*100.,format='(f8.4)')+$ ' w(cm/s)= '+string(w*100.,format='(f6.1)')+$ ' time(s)= '+string(clock,format='(f6.1)') plot_text2 = +$ 'epsilon_aerosol= '+string(epsilon_aerosol,format='(f5.3)')+$ ' '+salt_type+$ ' '+aerosol_type+$ ' right_tail = '+string(right_tail,format='(i2)')+$ ' c_twomey(cm-3)= '+string(1.e-6*c_twomey,format='(f5.0)')+$ ' k_twomey= '+string(k_twomey,format='(f5.3)')+$ ' conc_tot_1(cm-3)= '+string(1.e-6*mixrat_tot_1/specific_volume_meas,format='(f6.0)')+$ ' r_1(nm)= '+string(r_1*1.e9,format='(f5.0)')+$ ' geo_sigma_1= '+string(geo_sigma_1,format='(f4.2)')+$ ' conc_tot_2(cm-3)= '+string(1.e-6*mixrat_tot_2/specific_volume_meas,format='(f6.0)')+$ ' r_2(nm)= '+string(r_2*1.e9,format='(f5.0)')+$ ' geo_sigma_2= '+string(geo_sigma_2,format='(f4.2)')+$ ' conc_tot_3(cm-3)= '+string(1.e-6*mixrat_tot_3/specific_volume_meas,format='(f7.2)')+$ ' r_3(nm)= '+string(r_3*1.e9,format='(f5.0)')+$ ' geo_sigma_3= '+string(geo_sigma_3,format='(f4.2)')+$ ' rmin= '+string(rmin,format='(e9.2)')+$ ' rmax= '+string(rmax,format='(e9.2)') title = plot_text1+' '+plot_text2 r1 = r(1:nchan) r2 = r(0:nchan-1) dmixingratiodlogr = nconc_parcel * specific_volume / (alog10 (r2/r1)) plot_text1 = +$ 'p(pa)= '+string(p_parcel,format='(e10.3)')+$ ' T(C)= '+string(tc_parcel,format='(f5.1)')+$ ' ss(%)= '+string((sratio_parcel-1.)*100.,format='(f8.4)')+$ ' ssmax(%)= '+string(ssmax,format='(f7.4)')+$ ' w(cm/s)= '+string(w*100.,format='(f6.1)')+$ ' time(s)= '+string(clock,format='(f6.1)')+$ ' alpha= '+string(alpha,format='(f5.3)')+$ ' beta_local= '+string(beta_local,format='(f5.3)')+$ ' LWC(gm/m^3) = '+string(lwc_gm_per_cubic_meter,format='(f10.5)')+$ ' dBZ= '+string(10.*alog10(sixth_moment_radar),format='(f10.1)') plot_text2 = +$ 'epsilon_aerosol= '+string(epsilon_aerosol,format='(f5.3)')+$ ' '+salt_type+$ ' '+aerosol_type+$ ' right_tail = '+string(right_tail,format='(i2)')+$ ' c_twomey(cm-3)= '+string(1.e-6*c_twomey,format='(f5.0)')+$ ' k_twomey= '+string(k_twomey,format='(f5.3)')+$ ' conc_tot_1(cm-3)= '+string(1.e-6*mixrat_tot_1/specific_volume_meas,format='(f6.0)')+$ ' r_1(nm)= '+string(r_1*1.e9,format='(f5.0)')+$ ' geo_sigma_1= '+string(geo_sigma_1,format='(f4.2)')+$ ' conc_tot_2(cm-3)= '+string(1.e-6*mixrat_tot_2/specific_volume_meas,format='(f6.0)')+$ ' r_2(nm)= '+string(r_2*1.e9,format='(f5.0)')+$ ' geo_sigma_2= '+string(geo_sigma_2,format='(f4.2)')+$ ' conc_tot_3(cm-3)= '+string(1.e-6*mixrat_tot_3/specific_volume_meas,format='(f7.2)')+$ ' r_3(nm)= '+string(r_3*1.e9,format='(f5.0)')+$ ' geo_sigma_3= '+string(geo_sigma_3,format='(f4.2)')+$ ' rmin= '+string(rmin,format='(e9.2)')+$ ' rmax= '+string(rmax,format='(e9.2)') title = plot_text1+' '+plot_text2 r1 = r(1:nchan) r2 = r(0:nchan-1) dmixingratiodlogr = nconc_parcel * specific_volume / (alog10 (r2/r1)) printf, 2, format = '(a)', title printf, 2, format = '(i10)', nchan printf, 2, format = '(10(x,f10.3))', 1.e-6*dmixingratiodlogr(0:nchan-1) printf, 2, format = '(10(x,f10.3))', 1.e6*r(0:nchan-1) printf, 2, format = '(10(x,f10.3))', 1.e6*r(1:nchan) ; ;..select the growth factors and output them - ;..the dry diameters are 35, 50, 73, 109, 166, 264, and 440 nm ; growth_fact = r(0:nchan) / rdry(0:nchan) ; iflag_35 = 0 iflag_50 = 0 iflag_73 = 0 iflag_109 = 0 iflag_166 = 0 iflag_264 = 0 iflag_440 = 0 ; for i = 0, nchan do begin if rdry(i)/0.5e-9 ge 35. and iflag_35 eq 0 then begin iflag_35 = 1 printf, 2, format = '(a10,5f10.3)', salt_type, epsilon_aerosol, sratio_parcel*100., rdry(i)/1.e-9, growth_fact(i), rho_insoluble endif else if rdry(i)/0.5e-9 ge 50. and iflag_50 eq 0 then begin iflag_50 = 1 printf, 2, format = '(a10,5f10.3)', salt_type, epsilon_aerosol, sratio_parcel*100., rdry(i)/1.e-9, growth_fact(i), rho_insoluble endif else if rdry(i)/0.5e-9 ge 73. and iflag_73 eq 0 then begin iflag_73 = 1 printf, 2, format = '(a10,5f10.3)', salt_type, epsilon_aerosol, sratio_parcel*100., rdry(i)/1.e-9, growth_fact(i), rho_insoluble endif else if rdry(i)/0.5e-9 ge 109. and iflag_109 eq 0 then begin iflag_109 = 1 printf, 2, format = '(a10,5f10.3)', salt_type, epsilon_aerosol, sratio_parcel*100., rdry(i)/1.e-9, growth_fact(i), rho_insoluble endif else if rdry(i)/0.5e-9 ge 166. and iflag_166 eq 0 then begin iflag_166 = 1 printf, 2, format = '(a10,5f10.3)', salt_type, epsilon_aerosol, sratio_parcel*100., rdry(i)/1.e-9, growth_fact(i), rho_insoluble endif else if rdry(i)/0.5e-9 ge 264. and iflag_264 eq 0 then begin iflag_264 = 1 printf, 2, format = '(a10,5f10.3)', salt_type, epsilon_aerosol, sratio_parcel*100., rdry(i)/1.e-9, growth_fact(i), rho_insoluble endif else if rdry(i)/0.5e-9 ge 440. and iflag_440 eq 0 then begin iflag_440 = 1 printf, 2, format = '(a10,5f10.3)', salt_type, epsilon_aerosol, sratio_parcel*100., rdry(i)/1.e-9, growth_fact(i), rho_insoluble endif endfor ; ;that't it for the initial output ; ;plot the initial graphics ; plot_droplets, plot_text1, plot_text2, nconc_parcel, rdry, specific_volume, icolor ; return ; end