;******************************************************** ; This program reads in the mmcrcalC1.a1 netcdf files ;******************************************************** pro get_mmcr_caldata_moments_data_timesync_sb;,fname,start_hr,end_hr ; Common to hold the data common mmcr_cal_data_combined, combo_hrfrac,combo_jday,combo_timeoffset, $ combo_ntimes,combo_num_sec,combo_hts,combo_numhts,combo_dbz, $ combo_specavg,combo_ipp,combo_nci,combo_nfft,combo_numcohints, $ combo_numcodebits common mmcr_mom_data_combined, combo_snr,combo_vel,combo_wid,combo_Nyq ; mmcrcalC1.a1 netcdf files fname_cal="/data/mace3/arm_data/sgp/sgpmmcrcalC1.a1/sgpmmcrcalC1.a1.20021102.000105.cdf" ; Open the mmcrcalC1.a1 netcdf file cdf_cal_id=ncdf_open(fname_cal) ; Create the mmcrmomentsC1.a1 netcdf file name sepname=str_sep(fname_cal,'cal') fname_mom=sepname[0]+'moments'+sepname[1]+'moments'+sepname[2] ; Open the mmcrmomentsC1.a1 netcdf file cdf_mom_id=ncdf_open(fname_mom) ; Get the dimension id's time_cal_did=ncdf_dimid(cdf_cal_id,'time') time_mom_did=ncdf_dimid(cdf_mom_id,'time') height_did=ncdf_dimid(cdf_cal_id,'height') ; Inquire about the dimensions ncdf_diminq,cdf_cal_id,time_cal_did,char_strng,num_times_cal ncdf_diminq,cdf_mom_id,time_mom_did,char_strng,num_times_mom ncdf_diminq,cdf_cal_id,height_did,char_strng,num_ind_heights ; Check to see if the number of profiles in moments and cal is the same if num_times_cal ne num_times_mom then $ print,'unequal # of profiles between moments and cal' ; Get the variable id's num_sec_id=ncdf_varid(cdf_cal_id,'base_time') time_offset_id=ncdf_varid(cdf_cal_id,'time_offset') height_id=ncdf_varid(cdf_cal_id,'Heights') num_sec_id2=ncdf_varid(cdf_mom_id,'base_time') time_offset_id2=ncdf_varid(cdf_mom_id,'time_offset') ip_id=ncdf_varid(cdf_cal_id,'InterPulsePeriod') sa_id=ncdf_varid(cdf_cal_id,'NumSpectraAveraged') nfft_id=ncdf_varid(cdf_cal_id,'NumFft') ncdbt_id=ncdf_varid(cdf_cal_id,'NumCodeBits') nci_id=ncdf_varid(cdf_cal_id,'NumCoherentIntegrations') n_hts_id=ncdf_varid(cdf_cal_id,'NumHeights') dbz_id=ncdf_varid(cdf_cal_id,'Reflectivity') ncb_id=ncdf_varid(cdf_cal_id,'NumCodeBits') vel_id=ncdf_varid(cdf_mom_id,'MeanDopplerValue') wid_id=ncdf_varid(cdf_mom_id,'SpectralWidthValue') snr_id=ncdf_varid(cdf_mom_id,'SignalToNoiseRatio') Nyq_id=ncdf_varid(cdf_mom_id,'NyquistVelocity') ; Get the time variables from both files ncdf_varget,cdf_cal_id,num_sec_id,num_sec ncdf_varget,cdf_cal_id,time_offset_id,time_offset ncdf_varget,cdf_mom_id,num_sec_id2,num_sec2 ncdf_varget,cdf_mom_id,time_offset_id2,time_offset2 ; Add the base_time to the time_offset so each time_offset is a base_time absolute_time=time_offset+double(num_sec) absolute_time2=time_offset2+double(num_sec2) ; ii2 comes back as an integer array with each element corresponding to the ; time element of the cal file. Each postive element represents a ; corresponding time element in the moments file. Ideally these will be ; identical. Negative elements mean that no exactly corresponding moments ; element exists. sync_times_sb,absolute_time,absolute_time2,ii2 ; Calculate the fractional hour, julian day, and standard date from the ; base_time and time_offset ijday_ihrfrac_fm_numsec,num_sec,time_offset,hrfrac,jday,yy,mm,dd,hh,mi,ss ; Determine the start and end time index start_hr=0 i=1 while (hrfrac[i] lt start_hr) do i=i+1 start_time_index=i end_hr=hrfrac[num_times_cal-1] while (hrfrac[i] lt end_hr and hrfrac[i] lt hrfrac[num_times_cal-1]) do i=i+1 end_time_index=i ; Determine the start and end height index start_height_index=0 end_height_index=num_ind_heights ; Get the rest of the variables ncdf_varget,cdf_cal_id,ip_id,ipperiod2 ncdf_varget,cdf_cal_id,nci_id,nci2 ;? ncdf_varget,cdf_cal_id,n_hts_id,num_heights2 ncdf_varget,cdf_cal_id,sa_id,nspecavg2 ncdf_varget,cdf_cal_id,nfft_id,nfft ncdf_varget,cdf_cal_id,nci_id,numcohints ncdf_varget,cdf_cal_id,ncb_id,numcodebits ncdf_varget,cdf_mom_id,Nyq_id,Nyq ;******************* ; assuming 4 modes, make no attempt to sort them now. ;******************* ; Fast forward through the matching moments subscript array through ; the first ones that may have no matching subscripts. ii=0 while ii2[ii] eq -1 do ii=ii+1 ; These variables contain the first nonzero element, where both match ; These are mode 1 characteristics mode1_specavg=nspecavg2[ii] mode1_numhts=num_heights2[ii] mode1_ipp=ipperiod2[ii] mode1_nci=nci2[ii] mode1_nfft=nfft[ii] mode1_numcohints=numcohints[ii] mode1_numcodebits=numcodebits[ii] mode1_Nyq=Nyq[ii] mode_check=nspecavg2[ii]+num_heights2[ii]+ipperiod2[ii]+nci2[ii]+numcodebits[ii] mode_index=0 print,ii,mode_check[ii],1,num_heights2[ii],numcodebits[ii] ; Starting at the next element, begin looping to pull in mode 2,3,4 ii=ii+1 while n_elements(mode_index) ne 4 do begin if ii2[ii] ne -1 then begin mode_check=[mode_check,nspecavg2[ii]+num_heights2[ii]+ipperiod2[ii]+nci2[ii]+numcodebits[ii]] copy_flag=1 for jj=0,ii-1 do begin if mode_check[ii] eq mode_check[jj] then copy_flag=-1 endfor print,ii,mode_check[ii],copy_flag,num_heights2[ii],numcodebits[ii] if copy_flag eq 1 then begin mode_index=[mode_index,ii] endif endif ii=ii+1 endwhile ; Calculate the mode check for all the profiles mode_check_ts=nspecavg2+num_heights2+ipperiod2+nci2+numcodebits ; These are mode 2 characteristics ii=mode_index[1] mode2_specavg=nspecavg2[ii] mode2_numhts=num_heights2[ii] mode2_ipp=ipperiod2[ii] mode2_nci=nci2[ii] mode2_nfft=nfft[ii] mode2_numcohints=numcohints[ii] mode2_numcodebits=numcodebits[ii] mode2_Nyq=Nyq[ii] mode_check[1]=nspecavg2[ii]+num_heights2[ii]+ipperiod2[ii]+nci2[ii]+numcodebits[ii] ; These are mode 3 characteristics ii=mode_index[2] mode3_specavg=nspecavg2[ii] mode3_numhts=num_heights2[ii] mode3_ipp=ipperiod2[ii] mode3_nci=nci2[ii] mode3_nfft=nfft[ii] mode3_numcohints=numcohints[ii] mode3_numcodebits=numcodebits[ii] mode3_Nyq=Nyq[ii] mode_check[2]=nspecavg2[ii]+num_heights2[ii]+ipperiod2[ii]+nci2[ii]+numcodebits[ii] ; These are mode 4 characteristics ii=mode_index[3] mode4_specavg=nspecavg2[ii] mode4_numhts=num_heights2[ii] mode4_ipp=ipperiod2[ii] mode4_nci=nci2[ii] mode4_nfft=nfft[ii] mode4_numcohints=numcohints[ii] mode4_numcodebits=numcodebits[ii] mode4_Nyq=Nyq[ii] mode_check[3]=nspecavg2[ii]+num_heights2[ii]+ipperiod2[ii]+nci2[ii]+numcodebits[ii] ; Define some arrays start=indgen(1,1) count=indgen(1,1) mode1_dbz=findgen(1,mode1_numhts) & mode2_dbz=findgen(1,mode2_numhts) & mode3_dbz=findgen(1,mode3_numhts) & mode4_dbz=findgen(1,mode4_numhts) mode1_vel=intarr(1,mode1_numhts) & mode2_vel=intarr(1,mode2_numhts) & mode3_vel=intarr(1,mode3_numhts) & mode4_vel=intarr(1,mode4_numhts) mode1_wid=intarr(1,mode1_numhts) & mode2_wid=intarr(1,mode2_numhts) & mode3_wid=intarr(1,mode3_numhts) & mode4_wid=intarr(1,mode4_numhts) mode1_snr=intarr(1,mode1_numhts) & mode2_snr=intarr(1,mode2_numhts) & mode3_snr=intarr(1,mode3_numhts) & mode4_snr=intarr(1,mode4_numhts) mode1_htsi=indgen(mode1_numhts) & mode2_htsi=indgen(mode2_numhts) & mode3_htsi=indgen(mode3_numhts) & mode4_htsi=indgen(mode4_numhts) ; Pull out the different mode heights ncdf_varget,cdf_cal_id,height_id,mode1_htsi,offset=[0,0],count=[mode1_numhts,1] ncdf_varget,cdf_cal_id,height_id,mode2_htsi,offset=[0,1],count=[mode2_numhts,1] ncdf_varget,cdf_cal_id,height_id,mode3_htsi,offset=[0,2],count=[mode3_numhts,1] ncdf_varget,cdf_cal_id,height_id,mode4_htsi,offset=[0,3],count=[mode4_numhts,1] mode1_hts=float(mode1_htsi) & mode2_hts=float(mode2_htsi) & mode3_hts=float(mode3_htsi) & mode4_hts=float(mode4_htsi) dbz1_1=findgen(1,mode1_numhts) & dbz1_2=findgen(1,mode2_numhts) & dbz1_3=findgen(1,mode3_numhts) & dbz1_4=findgen(1,mode4_numhts) vel1_1=intarr(1,mode1_numhts) & vel1_2=intarr(1,mode2_numhts) & vel1_3=intarr(1,mode3_numhts) & vel1_4=intarr(1,mode4_numhts) wid1_1=intarr(1,mode1_numhts) & wid1_2=intarr(1,mode2_numhts) & wid1_3=intarr(1,mode3_numhts) & wid1_4=intarr(1,mode4_numhts) snr1_1=intarr(1,mode1_numhts) & snr1_2=intarr(1,mode2_numhts) & snr1_3=intarr(1,mode3_numhts) & snr1_4=intarr(1,mode4_numhts) ; first time, what mode is the first time? mode1_specavg=nspecavg2[0] mode_flag=intarr(4) ii=start_time_index mode1_ntimes=0 & mode2_ntimes=0 & mode3_ntimes=0 & mode4_ntimes=0 ;for i=0,3 do begin while total(mode_flag) lt 4. do begin if ii2[ii] ne -1 then begin ; test for no corresponding moments data start=[0,ii] count=[num_ind_heights,1] if mode_check_ts[ii] eq mode_check[0] then begin ncdf_varget, cdfid, dbz_id, dbz1_1, offset=[0,ii], count=[mode1_numhts,1] mode1_dbz[0,*]=dbz1_1[*] ncdf_varget, cdfid2, vel_id, vel1_1, offset=[0,ii2[ii]], count=[mode1_numhts,1] mode1_vel[0,*]=vel1_1[*] ncdf_varget, cdfid2, wid_id, wid1_1, offset=[0,ii2[ii]], count=[mode1_numhts,1] mode1_wid[0,*]=wid1_1[*] ncdf_varget, cdfid2, snr_id, snr1_1, offset=[0,ii2[ii]], count=[mode1_numhts,1] mode1_snr[0,*]=snr1_1[*] mode1_hrfrac=hrfrac[ii] mode1_jday=jday[ii] mode1_timeoffset=time_offset[ii] ;mode1_Nyq=Nyq[ii] mode1_ntimes=mode1_ntimes+1 mode_flag[0]=1 print, mode_check_ts[ii], mode_check[0], mode_flag[0], mode_flag[1], mode_flag[2], mode_flag[3], total(mode_flag) endif if mode_check_ts[ii] eq mode_check[1] then begin ncdf_varget, cdfid, dbz_id, dbz1_2, offset=[0,ii], count=[mode2_numhts,1] mode2_dbz[0,*]=dbz1_2[*] ncdf_varget, cdfid2, vel_id, vel1_2, offset=[0,ii2[ii]], count=[mode2_numhts,1] mode2_vel[0,*]=vel1_2[*] ncdf_varget, cdfid2, wid_id, wid1_2, offset=[0,ii2[ii]], count=[mode2_numhts,1] mode2_wid[0,*]=wid1_2[*] ncdf_varget, cdfid2, snr_id, snr1_2, offset=[0,ii2[ii]], count=[mode2_numhts,1] mode2_snr[0,*]=snr1_2[*] mode2_hrfrac=hrfrac[ii] mode2_jday=jday[ii] mode2_timeoffset=time_offset[ii] ;mode2_Nyq=Nyq[ii] mode2_ntimes=mode2_ntimes+1 mode_flag[1]=1 print, mode_check_ts[ii], mode_check[1], mode_flag[0], mode_flag[1], mode_flag[2], mode_flag[3],total(mode_flag) endif if mode_check_ts[ii] eq mode_check[2] then begin ncdf_varget, cdfid, dbz_id, dbz1_3, offset=[0,ii], count=[mode3_numhts,1] mode3_dbz[0,*]=dbz1_3[*] ncdf_varget, cdfid2, vel_id, vel1_3, offset=[0,ii2[ii]], count=[mode3_numhts,1] mode3_vel[0,*]=vel1_3[*] ncdf_varget, cdfid2, wid_id, wid1_3, offset=[0,ii2[ii]], count=[mode3_numhts,1] mode3_wid[0,*]=wid1_3[*] ncdf_varget, cdfid2, snr_id, snr1_3, offset=[0,ii2[ii]], count=[mode3_numhts,1] mode3_snr[0,*]=snr1_3[*] mode3_hrfrac=hrfrac[ii] mode3_jday=jday[ii] mode3_timeoffset=time_offset[ii] ;mode3_Nyq=Nyq[ii] mode3_ntimes=mode3_ntimes+1 mode_flag[2]=1 print, mode_check_ts[ii], mode_check[2], mode_flag[0], mode_flag[1], mode_flag[2], mode_flag[3],total(mode_flag) endif if mode_check_ts[ii] eq mode_check[3] then begin ncdf_varget, cdfid, dbz_id, dbz1_4, offset=[0,ii], count=[mode4_numhts,1] mode4_dbz[0,*]=dbz1_4[*] ncdf_varget, cdfid2, vel_id, vel1_4, offset=[0,ii2[ii]], count=[mode4_numhts,1] mode4_vel[0,*]=vel1_4[*] ncdf_varget, cdfid2, wid_id, wid1_4, offset=[0,ii2[ii]], count=[mode4_numhts,1] mode4_wid[0,*]=wid1_4[*] ncdf_varget, cdfid2, snr_id, snr1_4, offset=[0,ii2[ii]], count=[mode4_numhts,1] mode4_snr[0,*]=snr1_4[*] mode4_hrfrac=hrfrac[ii] mode4_jday=jday[ii] mode4_timeoffset=time_offset[ii] ;mode4_Nyq=Nyq[ii] mode4_ntimes=mode4_ntimes+1 mode_flag[3]=1 print, mode_check_ts[ii], mode_check[3], mode_flag[0], mode_flag[1], mode_flag[2], mode_flag[3],total(mode_flag) endif endif ; ii2 check ii=ii+1 endwhile ;endfor temp1=findgen(1,mode1_numhts) & temp2=findgen(1,mode2_numhts) & temp3=findgen(1,mode3_numhts) & temp4=findgen(1,mode4_numhts) temp1i=intarr(1,mode1_numhts) & temp2i=intarr(1,mode2_numhts) & temp3i=intarr(1,mode3_numhts) & temp4i=intarr(1,mode4_numhts) ;ii=start_time_index+1 ;ii=ii-1 print, ii, ' is ii' for i=ii,end_time_index do begin if ii2[i] ne -1 then begin ; test for no corresponding moments data start=[0,i] count=[num_ind_heights,1] ;print, mode_check_ts[i], mode_check[0], mode_check[1], mode_check[2] , mode_check[3] if mode_check_ts[i] eq mode_check[0] then begin ncdf_varget, cdfid, dbz_id, dbz1_1, offset=[0,i], count=[mode1_numhts,1] temp1[0,*]=dbz1_1[*] mode1_dbz=[mode1_dbz,temp1] ncdf_varget, cdfid2, vel_id, vel1_1, offset=[0,ii2[i]], count=[mode1_numhts,1] temp1i[0,*]=vel1_1[*] mode1_vel=[mode1_vel,temp1i] ncdf_varget, cdfid2, wid_id, wid1_1, offset=[0,ii2[i]], count=[mode1_numhts,1] temp1i[0,*]=wid1_1[*] mode1_wid=[mode1_wid,temp1i] ncdf_varget, cdfid2, snr_id, snr1_1, offset=[0,ii2[i]], count=[mode1_numhts,1] temp1i[0,*]=snr1_1[*] mode1_snr=[mode1_snr,temp1i] mode1_hrfrac=[mode1_hrfrac,hrfrac[i]] mode1_jday=[mode1_jday,jday[i]] mode1_timeoffset=[mode1_timeoffset,time_offset[i]] ;mode1_Nyq=[mode1_Nyq,Nyq[i]] mode1_ntimes=mode1_ntimes+1 endif if mode_check_ts[i] eq mode_check[1] then begin ncdf_varget, cdfid, dbz_id, dbz1_2, offset=[0,i], count=[mode2_numhts,1] temp2[0,*]=dbz1_2[*] mode2_dbz=[mode2_dbz,temp2] ncdf_varget, cdfid2, vel_id, vel1_2, offset=[0,ii2[i]], count=[mode2_numhts,1] temp2i[0,*]=vel1_2[*] mode2_vel=[mode2_vel,temp2i] ncdf_varget, cdfid2, wid_id, wid1_2, offset=[0,ii2[i]], count=[mode2_numhts,1] temp2i[0,*]=wid1_2[*] mode2_wid=[mode2_wid,temp2i] ncdf_varget, cdfid2, snr_id, snr1_2, offset=[0,ii2[i]], count=[mode2_numhts,1] temp2i[0,*]=snr1_2[*] mode2_snr=[mode2_snr,temp2i] mode2_hrfrac=[mode2_hrfrac,hrfrac[i]] mode2_jday=[mode2_jday,jday[ii]] mode2_timeoffset=[mode2_timeoffset,time_offset[i]] ;mode2_Nyq=[mode2_Nyq,Nyq[i]] mode2_ntimes=mode2_ntimes+1 endif if mode_check_ts[i] eq mode_check[2] then begin ncdf_varget, cdfid, dbz_id, dbz1_3, offset=[0,i], count=[mode3_numhts,1] temp3[0,*]=dbz1_3[*] mode3_dbz=[mode3_dbz,temp3] ncdf_varget, cdfid2, vel_id, vel1_3, offset=[0,ii2[i]], count=[mode3_numhts,1] temp3i[0,*]=vel1_3[*] mode3_vel=[mode3_vel,temp3i] ncdf_varget, cdfid2, wid_id, wid1_3, offset=[0,ii2[i]], count=[mode3_numhts,1] temp3i[0,*]=wid1_3[*] mode3_wid=[mode3_wid,temp3i] ncdf_varget, cdfid2, snr_id, snr1_3, offset=[0,ii2[i]], count=[mode3_numhts,1] temp3i[0,*]=snr1_3[*] mode3_snr=[mode3_snr,temp3i] mode3_hrfrac=[mode3_hrfrac,hrfrac[i]] mode3_jday=[mode3_jday,jday[i]] mode3_timeoffset=[mode3_timeoffset,time_offset[i]] ;mode3_Nyq=[mode3_Nyq,Nyq[i]] mode3_ntimes=mode3_ntimes+1 endif if mode_check_ts[i] eq mode_check[3] then begin ncdf_varget, cdfid, dbz_id, dbz1_4, offset=[0,i], count=[mode4_numhts,1] temp4[0,*]=dbz1_4[*] mode4_dbz=[mode4_dbz,temp4] ncdf_varget, cdfid2, vel_id, vel1_4, offset=[0,ii2[i]], count=[mode4_numhts,1] temp4i[0,*]=vel1_4[*] mode4_vel=[mode4_vel,temp4i] ncdf_varget, cdfid2, wid_id, wid1_4, offset=[0,ii2[i]], count=[mode4_numhts,1] temp4i[0,*]=wid1_4[*] mode4_wid=[mode4_wid,temp4i] ncdf_varget, cdfid2, snr_id, snr1_4, offset=[0,ii2[i]], count=[mode4_numhts,1] temp4i[0,*]=snr1_4[*] mode4_snr=[mode4_snr,temp4i] mode4_hrfrac=[mode4_hrfrac,hrfrac[i]] mode4_jday=[mode4_jday,jday[i]] mode4_timeoffset=[mode4_timeoffset,time_offset[i]] ;mode4_Nyq=[mode4_Nyq,Nyq[i]] mode4_ntimes=mode4_ntimes+1 endif endif ; ii2 check ;ii=ii+1 endfor print, mode1_ntimes, mode2_ntimes, mode3_ntimes, mode4_ntimes ncdf_close, cdfid hrfrac2=findgen(end_time_index-start_time_index+1) jday2=findgen(end_time_index-start_time_index+1) height2=findgen(end_height_index-start_height_index+1) ii=0 for i=start_time_index,end_time_index do begin hrfrac2[ii]=hrfrac[i] jday2[ii]=jday[i] ii=ii+1 endfor num_times2=ii num_sec1=num_sec & num_sec2=num_sec & num_sec3=num_sec & num_sec4=num_sec max_ntimes=max([mode1_ntimes,mode2_ntimes,mode3_ntimes,mode4_ntimes]) max_numhts=max([mode1_numhts,mode2_numhts,mode3_numhts,mode4_numhts]) combo_hrfrac=dblarr(4,max_ntimes) combo_hrfrac[0,0:mode1_ntimes-1]=mode1_hrfrac combo_hrfrac[1,0:mode2_ntimes-1]=mode2_hrfrac combo_hrfrac[2,0:mode3_ntimes-1]=mode3_hrfrac combo_hrfrac[3,0:mode4_ntimes-1]=mode4_hrfrac combo_jday=dblarr(4,max_ntimes) combo_jday[0,0:mode1_ntimes-1]=mode1_jday combo_jday[1,0:mode2_ntimes-1]=mode2_jday combo_jday[2,0:mode3_ntimes-1]=mode3_jday combo_jday[3,0:mode4_ntimes-1]=mode4_jday combo_timeoffset=dblarr(4,max_ntimes) combo_timeoffset[0,0:mode1_ntimes-1]=mode1_timeoffset combo_timeoffset[1,0:mode2_ntimes-1]=mode2_timeoffset combo_timeoffset[2,0:mode3_ntimes-1]=mode3_timeoffset combo_timeoffset[3,0:mode4_ntimes-1]=mode4_timeoffset combo_hts=fltarr(4,max_numhts) combo_hts[0,0:mode1_numhts-1]=mode1_hts combo_hts[1,0:mode2_numhts-1]=mode2_hts combo_hts[2,0:mode3_numhts-1]=mode3_hts combo_hts[3,0:mode4_numhts-1]=mode4_hts combo_dbz=fltarr(4,max_ntimes,max_numhts) combo_dbz[0,0:mode1_ntimes-1,0:mode1_numhts-1]=mode1_dbz combo_dbz[1,0:mode2_ntimes-1,0:mode2_numhts-1]=mode2_dbz combo_dbz[2,0:mode3_ntimes-1,0:mode3_numhts-1]=mode3_dbz combo_dbz[3,0:mode4_ntimes-1,0:mode4_numhts-1]=mode4_dbz combo_vel=intarr(4,max_ntimes,max_numhts) combo_vel[0,0:mode1_ntimes-1,0:mode1_numhts-1]=mode1_vel combo_vel[1,0:mode2_ntimes-1,0:mode2_numhts-1]=mode2_vel combo_vel[2,0:mode3_ntimes-1,0:mode3_numhts-1]=mode3_vel combo_vel[3,0:mode4_ntimes-1,0:mode4_numhts-1]=mode4_vel combo_wid=intarr(4,max_ntimes,max_numhts) combo_wid[0,0:mode1_ntimes-1,0:mode1_numhts-1]=mode1_wid combo_wid[1,0:mode2_ntimes-1,0:mode2_numhts-1]=mode2_wid combo_wid[2,0:mode3_ntimes-1,0:mode3_numhts-1]=mode3_wid combo_wid[3,0:mode4_ntimes-1,0:mode4_numhts-1]=mode4_wid combo_snr=intarr(4,max_ntimes,max_numhts) combo_snr[0,0:mode1_ntimes-1,0:mode1_numhts-1]=mode1_snr combo_snr[1,0:mode2_ntimes-1,0:mode2_numhts-1]=mode2_snr combo_snr[2,0:mode3_ntimes-1,0:mode3_numhts-1]=mode3_snr combo_snr[3,0:mode4_ntimes-1,0:mode4_numhts-1]=mode4_snr combo_numhts=[mode1_numhts,mode2_numhts,mode3_numhts,mode4_numhts] combo_specavg=[mode1_specavg,mode2_specavg,mode3_specavg,mode4_specavg] combo_ipp=[mode1_ipp,mode2_ipp,mode3_ipp,mode4_ipp] combo_nci=[mode1_nci,mode2_nci,mode3_nci,mode4_nci] combo_nfft=[mode1_nfft,mode2_nfft,mode3_nfft,mode4_nfft] combo_numcohints=[mode1_numcohints,mode2_numcohints,mode3_numcohints,mode4_numcohints] combo_num_sec=[num_sec1,num_sec2,num_sec3,num_sec4] combo_numcodebits=[mode1_numcodebits,mode2_numcodebits,mode3_numcodebits,mode4_numcodebits] combo_Nyq=[mode1_Nyq,mode2_Nyq,mode3_Nyq,mode4_Nyq] combo_ntimes=[mode1_ntimes,mode2_ntimes,mode3_ntimes,mode4_ntimes] ;ncdf_close, cdfid ncdf_close, cdfid2 return end