;Title: get_c130.pro ; ;Purpose: To extract NCAR C130 data for a given flight, further extracting only data that ; are within 60 km of the ship (using field fxdist) ; ;Input: flight: string variable containing the flight number: i.e. "RF04" ; ;Output: aircraft measurement variables. ; ;Author: Matthew Shupe ;Date: 9/17/01 ;Modified: 9/17/01 ;----------------------------------------------------------------- ;pro get_c130, flights flights=['RF01A','RF02','RF04','RF05','RF08','RF09','RF10','RF11','RF12','RF13','RF14','RF15','RF16'] ;flights=['RF01A'] ;flights=['RF11'] nflt=n_elements(flights) restore,'nc130_bins.dat' for f=0,nflt-1 do begin flight=flights[f] print,flight ;cd,'/array/fire/ace/ncar_c130' arg=flight+'.lrt.cdf' file=findfile(arg) fid=ncdf_open(file[0]) ncdf_varget,fid,ncdf_varid(fid,'XGLWC'),lwc_g ncdf_varget,fid,ncdf_varid(fid,'XGSFC'),sfc_g ncdf_varget,fid,ncdf_varid(fid,'ALT'),alt ncdf_varget,fid,ncdf_varid(fid,'HGM232'),ralt ncdf_varget,fid,ncdf_varid(fid,'DAY'),day ncdf_varget,fid,ncdf_varid(fid,'HOUR'),hour ncdf_varget,fid,ncdf_varid(fid,'MINUTE'),minute ncdf_varget,fid,ncdf_varid(fid,'SECOND'),second ncdf_varget,fid,ncdf_varid(fid,'ATX'),atx ncdf_varget,fid,ncdf_varid(fid,'OAT'),oat ncdf_varget,fid,ncdf_varid(fid,'C260X_OBL'),dist_2x ncdf_varget,fid,ncdf_varid(fid,'CF300_RPO'),dist_f3 if ncdf_varid(fid,'CFSSP_LPI') eq -1 then dist_f1=dist_f3*0.0-999.0 else ncdf_varget,fid,ncdf_varid(fid,'CFSSP_LPI'),dist_f1 ncdf_varget,fid,ncdf_varid(fid,'CONC3_RPO'),conc_f3 ncdf_varget,fid,ncdf_varid(fid,'CONC6_OBL'),conc_2x if ncdf_varid(fid,'CONCF_LPI') eq -1 then conc_f1=conc_f3*0.0-999.0 else ncdf_varget,fid,ncdf_varid(fid,'CONCF_LPI'),conc_f1 if ncdf_varid(fid,'CONCN') eq -1 then conc_cn=conc_f1*0.0-999.0 else ncdf_varget,fid,ncdf_varid(fid,'CONCN'),conc_cn ncdf_varget,fid,ncdf_varid(fid,'DBAR3_RPO'),dmean_f3 ncdf_varget,fid,ncdf_varid(fid,'DBAR6_OBL'),dmean_2x if ncdf_varid(fid,'DBARF_LPI') eq -1 then dmean_f1=dmean_f3*0.0-999.0 else ncdf_varget,fid,ncdf_varid(fid,'DBARF_LPI'),dmean_f1 ncdf_varget,fid,ncdf_varid(fid,'DBZ6_OBL'),dbz_2x if ncdf_varid(fid,'DBZF_LPI') eq -1 then dbz_f1 =dbz_2x*0.0-999.0 else ncdf_varget,fid,ncdf_varid(fid,'DBZF_LPI'),dbz_f1 ncdf_varget,fid,ncdf_varid(fid,'FXAZIM'),fxazim ncdf_varget,fid,ncdf_varid(fid,'FXDIST'),fxdist ;ncdf_varget,fid,ncdf_varid(fid,'IRBC'),irbc ;ncdf_varget,fid,ncdf_varid(fid,'IRTC'),irtc ncdf_varget,fid,ncdf_varid(fid,'PALT'),palt ncdf_varget,fid,ncdf_varid(fid,'PLWC6_OBL'),iwc_2x if ncdf_varid(fid,'PLWCC') eq -1 then lwc_k=palt*0.0-999.0 else ncdf_varget,fid,ncdf_varid(fid,'PLWCC'),lwc_k ncdf_varget,fid,ncdf_varid(fid,'PLWCC1'),lwc_k1 if ncdf_varid(fid,'PLWCF_LPI') eq -1 then lwc_f1=lwc_k1*0.0-999.0 else ncdf_varget,fid,ncdf_varid(fid,'PLWCF_LPI'),lwc_f1 ncdf_varget,fid,ncdf_varid(fid,'RHUM'),rhum ncdf_varget,fid,ncdf_varid(fid,'SOLZE'),solze ncdf_varget,fid,ncdf_varid(fid,'XLATC'),xlatc ncdf_varget,fid,ncdf_varid(fid,'XLONC'),xlonc ;ncdf_varget,fid,ncdf_varid(fid,'XSWTC'),xswtc ncdf_varget,fid,ncdf_varid(fid,'WI'),wi if ncdf_varid(fid,'CONCN') eq -1 then concn=lwc_k1*0.0-999.0 else ncdf_varget,fid,ncdf_varid(fid,'CONCN'),concn ncdf_close,fid ftime=hour+(day-day[0])*24.0+(minute+second/60.0)/60.0 iwh=where(fxdist ge 0 and fxdist lt 60) ftime=ftime[iwh] alt=alt[iwh] & ralt=ralt[iwh] & palt=palt[iwh] xlatc=xlatc[iwh] & xlonc=xlonc[iwh] atx=atx[iwh] & oat=oat[iwh] & rhum=rhum[iwh] & solze=solze[iwh] wi=wi[iwh] & concn=concn[iwh] dist_2x=reform(dist_2x[*,*,iwh]) & dist_f3=reform(dist_f3[*,*,iwh]) & dist_f1=reform(dist_f1[*,*,iwh]) conc_2x=conc_2x[iwh] & conc_f3=conc_f3[iwh] & conc_f1=conc_f1[iwh] & conc_cn=conc_cn[iwh] dmean_2x=dmean_2x[iwh] & dmean_f3=dmean_f3[iwh] & dmean_f1=dmean_f1[iwh] dbz_2x=dbz_2x[iwh] & dbz_f1=dbz_f1[iwh] fxazim=fxazim[iwh] & fxdist=fxdist[iwh] ;irbc=irbc[iwh] & irtc=irtc[iwh] & xswtc=xswtc[iwh] iwc_2x=iwc_2x[iwh] & lwc_k=lwc_k[iwh] & lwc_k1=lwc_k1[iwh] & lwc_f1=lwc_f1[iwh] lwc_g=lwc_g[iwh] & sfc_g=sfc_g[iwh] ;apply corrections lwc_g=lwc_g*(0.233/0.196) sfc_g=sfc_g*2811.0 lwc_k=lwc_k*1.21 lwc_k1=lwc_k1*1.23 ;Calculate Ni200, ice concentration larger than 200 microns ni200=total(dist_2x[14:*,*],1)*13.1 ;(fixed bin width of 13.1) ;Calculate effective radii re_g=(lwc_g/sfc_g)*30000.0 nel=n_elements(lwc_f1) re_f1=fltarr(nel) & re_f3=re_f1 & re_2x=re_f1 for i=0,nel-1 do begin re_f1[i]=total((b_f1/2.0)^3.0 * dist_f1[*,i])/total((b_f1/2.0)^2.0 * dist_f1[*,i]) re_f3[i]=total((b_f3/2.0)^3.0 * dist_f3[*,i])/total((b_f3/2.0)^2.0 * dist_f3[*,i]) re_2x[i]=total((b_2x/2.0)^3.0 * dist_2x[*,i])/total((b_2x/2.0)^2.0 * dist_2x[*,i]) endfor fn=flight+'.idl.dat' save,ftime,alt,ralt,palt,xlatc,xlonc,fxdist,fxazim, $ dist_2x,dist_f1,dist_f3,conc_2x,conc_f1,conc_f3,conc_cn,$ dmean_2x,dmean_f3,dmean_f1,dbz_2x,dbz_f1,ni200,$ iwc_2x, lwc_k, lwc_k1, lwc_f1,lwc_g,sfc_g,$ b_2x,b_f1,b_f3,$ re_f1,re_f3,re_2x,re_g,$ atx,oat,rhum,solze,concn,wi,$ ;irbc,irtc,xswtc,$ filename=fn endfor end