;************************************************************************************* ; Description: ; ; For reading and imaging the 2 channels Upward WCL netcdf fles ; Version: 1.0.0 ; ;Author: Min Deng ;************************************************************************************* ; pro read_image_wcl_nc, path,fname common wcl_data_p, p1r2,p2r2, pch,sch,dep common wcl_data_data1, galt,trf,pmb, lon, lat, zenith,Time,h common wcl_data_data2, pchbg,schbg,pchbgstd,schbgstd, pchsat, schsat common wcl_data_data3, pch_org, sch_org common wcl_data_data4, goodfl common wcl_data_data5, pchbg_near,schbg_near common wcl_data_data6, pitch, roll common wcl_data_data7, pchbg_true,schbg_true common wcl_data_data8, hmax gif_dir='' ;path='/home/mdeng2/wcl_process/quicklooks/' ;fname='150522WCL.UP.pecan15.20150522.035000-035960.nc' ;fname='150522WCL.UP.pecan15.20150522.030000-030960.nc' cdfid=ncdf_open(path+fname) ; open the netcdf file id_profile = ncdf_dimid(cdfid,'profile' ) id_Datarange = ncdf_dimid(cdfid,'range' ) id_vector3 = ncdf_dimid(cdfid,'vector3' ) ncdf_diminq, cdfid, id_profile, char_strng, nray ncdf_diminq, cdfid, id_Datarange, char_strng, nbin ncdf_diminq, cdfid, id_vector3, char_strng, nvector ; get the id's of the variables to be read Time_id=ncdf_varid(cdfid,'Time') timeSec_id=ncdf_varid(cdfid,'time') range_id=ncdf_varid(cdfid,'Range') Pch_id=ncdf_varid(cdfid,'CopolPowerR2') Sch_id=ncdf_varid(cdfid,'CrossPowerR2') Pch_org_id=ncdf_varid(cdfid,'CopolPower_org') Sch_org_id=ncdf_varid(cdfid,'CrossPower_org') dep_id =ncdf_varid(cdfid,'Depolarization') Pch_overlap_id=ncdf_varid(cdfid,'CopolOverlap') Sch_overlap_id=ncdf_varid(cdfid,'CrossOverlap') PchBG_id=ncdf_varid(cdfid,'CopolBG_far') SchBG_id=ncdf_varid(cdfid,'CrossBG_far') PchBG_near_id=ncdf_varid(cdfid,'CopolBG_near') SchBG_near_id=ncdf_varid(cdfid,'CrossBG_near') PchBG_true_id=ncdf_varid(cdfid,'CopolBG_true') SchBG_true_id=ncdf_varid(cdfid,'CrossBG_true') PchBGstd_id=ncdf_varid(cdfid,'CopolBGSTD') SchBGstd_id=ncdf_varid(cdfid,'CrossBGSTD') Pch_st_id=ncdf_varid(cdfid,'CopolSatur') Sch_st_id=ncdf_varid(cdfid,'CrossSatur') Badfl_id=ncdf_varid(cdfid,'Prof_qc_flag') Galt_id=ncdf_varid(cdfid,'ALT') Ralt_id=ncdf_varid(cdfid,'Ralt') Pitch_id=ncdf_varid(cdfid,'Pitch') Roll_id=ncdf_varid(cdfid,'Roll') lon_id=ncdf_varid(cdfid,'LON') lat_id=ncdf_varid(cdfid,'LAT') trf_id=ncdf_varid(cdfid,'trf') pmb_id=ncdf_varid(cdfid,'pmb') zenith_id=ncdf_varid(cdfid,'Zenith') hmax_id=ncdf_varid(cdfid,'hmax') attitude_id=ncdf_varid(cdfid,'BeamVector') ncdf_varget, cdfid, Time_id,Time ncdf_varget, cdfid, timeSec_id,time_sec ncdf_varget, cdfid, range_id,h ncdf_varget, cdfid, pch_id, pchR2 ncdf_varget, cdfid, sch_id, schR2 ncdf_varget, cdfid, dep_id, dep ncdf_varget, cdfid, pch_org_id, pch_org ncdf_varget, cdfid, sch_org_id, sch_org ncdf_varget, cdfid, pchbg_id, pchbg ncdf_varget, cdfid, schbg_id, schbg ncdf_varget, cdfid, pchbg_near_id, pchbg_near ncdf_varget, cdfid, schbg_near_id, schbg_near ncdf_varget, cdfid, pchbg_true_id, pchbg_true ncdf_varget, cdfid, schbg_true_id, schbg_true ncdf_varget, cdfid, pchbgstd_id, pchbgstd ncdf_varget, cdfid, schbgstd_id, schbgstd ncdf_varget, cdfid, pch_st_id, pchsat ncdf_varget, cdfid, sch_st_id, schsat ncdf_varget, cdfid, badfl_id, goodfl ncdf_varget, cdfid, galt_id, galt ncdf_varget, cdfid, ralt_id, ralt ncdf_varget, cdfid, pitch_id, pitch ncdf_varget, cdfid, roll_id, roll ncdf_varget, cdfid, lon_id, lon ncdf_varget, cdfid, lat_id, lat ncdf_varget, cdfid, trf_id, trf ncdf_varget, cdfid, pmb_id, pmb ncdf_varget, cdfid, zenith_id, zenith ncdf_varget, cdfid, hmax_id, hmax ncdf_varget, cdfid, attitude_id,Beamvector ncdf_close, cdfid p1r2= pchR2 p2r2= schR2 ; sm=[11,33] ; p1r2_sm = smooth(p1r2,sm) ; p2r2_sm = smooth(p2r2,sm) ; dep_sm = p2r2_sm/p1r2_sm/3.67589/4.5 ; calibration constant, needs to calibrated after each alignment ;help, p1r2,p2r2, pch,sch,dep ; ; Pch_temp= p1r2 ; Sch_temp= dep ; h_size = 1.5 ; ;plot_wcl_power_dep_ps, Pch_temp, Sch_temp,pchbg,schbg,rgalt,rTime,h,h_size,gif_dir,projectname,newdatest,name, '','clear' ; ; plot_wcl_power_dep_ps, Pch_temp, Sch_temp,pchbg,schbg,galt, Time, h,h_size,'','pecan15','',name,'','clear' ; ; ; end