pro get_bimodal_optical_depth_new, ciret2_fname, iwp_combo, iwp_MM3, jday, tau_combo, tau_MM3, $ tau_bimode, iwp_bimode,iwp_LI ; this reads in and returns print, 'inside ciretmm get' ; puts the iwc and re onto the time-height grid. print, ciret2_fname print, n_elements(ciret2_fname) cdfid=ncdf_open(ciret2_fname) ; open the netcdf file print, 'opened bimodal file: ',ciret2_fname time_did=ncdf_dimid(cdfid,'time') height_did=ncdf_dimid(cdfid,'height') ncdf_diminq, cdfid, time_did, char_strng, num_times ncdf_diminq, cdfid, height_did, char_strng, num_heights ; get the id's of the variables to be read x_id=ncdf_varid(cdfid,'numsec') & ncdf_varget, cdfid, x_id, num_sec x_id=ncdf_varid(cdfid,'time_offset') & ncdf_varget,cdfid, x_id, time_offset x_id=ncdf_varid(cdfid,'iwc_combo_MM3_Bimode') & ncdf_varget,cdfid, x_id, iwc_combo_MM3_Bimode x_id=ncdf_varid(cdfid,'beta_combo_MM3_Bimode') & ncdf_varget, cdfid, x_id, beta_combo_MM3_Bimode x_id=ncdf_varid(cdfid,'iwc_MM3') & ncdf_varget, cdfid, x_id, iwc_MM3 x_id=ncdf_varid(cdfid,'beta_MM3') & ncdf_varget, cdfid, x_id, beta_MM3 x_id=ncdf_varid(cdfid, 'raman_extinction') & ncdf_varget, cdfid, x_id, raman_extinction x_id=ncdf_varid(cdfid, 'extinction_small_mode') & ncdf_varget, cdfid, x_id, extinction_small_mode x_id=ncdf_varid(cdfid, 'extinction_large_mode') & ncdf_varget, cdfid, x_id, extinction_large_mode x_id=ncdf_varid(cdfid, 'iwc_small_mode') & ncdf_varget, cdfid, x_id, iwc_small_mode x_id=ncdf_varid(cdfid, 'iwc_large_mode') & ncdf_varget, cdfid, x_id, iwc_large_mode x_id=ncdf_varid(cdfid, 'dbz') & ncdf_varget, cdfid, x_id, dbz ncdf_close, cdfid ijday_ihrfrac_fm_numsec, num_sec, time_offset, hrfrac, jday, yy, mm, dd, hh, mi, ss ; determine the optical depth and iwp iwp_combo=fltarr(num_times) & tau_combo=fltarr(num_times) iwp_MM3=fltarr(num_times) & tau_MM3=fltarr(num_times) iwp_bimode=fltarr(num_times) & tau_bimode=fltarr(num_times) iwp_LI=fltarr(num_times) for j=0,num_times-1 do begin notatten_count=0 & count=0 for k=0,num_heights-1 do begin ;and raman_extinction[j,k] gt 0.0 if iwc_combo_MM3_Bimode[j,k] gt 0.0 then begin count=count+1 iwp_combo[j]=iwp_combo[j]+(iwc_combo_MM3_Bimode[j,k]*90.) tau_combo[j]=tau_combo[j]+(beta_combo_MM3_Bimode[j,k]*0.09) iwp_MM3[j]=iwp_MM3[j]+(iwc_MM3[j,k]*90.) tau_MM3[j]=tau_MM3[j]+(beta_MM3[j,k]*0.09) if extinction_small_mode[j,k] gt 0. then begin notatten_count=notatten_count+1 tau_bimode[j]=tau_bimode[j]+((extinction_small_mode[j,k]+extinction_large_mode[j,k])*0.090) iwp_bimode[j]=iwp_bimode[j]+((iwc_small_mode[j,k]+iwc_large_mode[j,k])*90.) iwp_LI[j]=iwp_LI[j]+((0.15*((10.^(dbz[j,k]/10.))^0.6))*90.) endif endif endfor if (float(notatten_count))/(float(count)) lt 0.8 then begin tau_bimode[j]=-9999. iwp_bimode[j]=-9999. iwp_LI[j]=-9999. endif endfor return end