;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Function read_skywatch ; ; by Samuel LeBlanc ; ; ; ;Used to read in the data found at skywatch.colorado.edu ; ;takes raw data files, and puts them into a useable IDL structure ; ;Current instruments include: Pyranometer ; ; Pyrgeometer ; ; Ceilometer ; ; Disdrometer ; ; Micro Rain Radar ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ;Note: In order to function properly, the file being read must be in ; ; the same directory than read_skywatch.pro or put the ; ; read_skywatch.pro into the IDL path. ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ;Usage: In your code in order to call read_skywatch you must put this ; ; syntax. You must include the instrument and name statements ; ; ; ; data = read_skywatch(instrument='inst',name='\somepath\file.dat') ; ; ; ; - data is the variable name you are assigning to this file ; ; - inst is the 4 letter name of the instrument ; ; where : 'pyra' is for the Pyranometer ; ; 'pyrg' is for the Pyrgeometer ; ; 'ceil' is for the Ceilometer ; ; 'disd' is for the Disdrometer ; ; 'mrr_avg' is for the micro rain radar averaged ; ; - \somepath\file.dat is the full path to the file ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ;Data structure and information: ; ; The returning object of this function will be a structure. ; ; The different instruments will yield a different structure ; ; depending on what the instrument is measuring. ; ; ; ; In order to call a specific variable in the structure you must ; ; use this syntax: name_of_strucuture.variable[index] ; ; ; ; for example: a = data.irradiance[1890] ; ; ; ; Below is a list of the different structures for each instrument ; ; and information about the variables ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; General time values ; ; **ALL TIMES IN UTC** ; ; ; ;Values of time is always calculated from local midnight ; ; - hour: UTC hour of the measurement ; ; - minutes: minutes past the hour of the measurement ; ; - seconds: seconds past the minute of the measurement ; ; - sec_of_day: seconds past local midnight of the measurement ; ; - day: day of the month ; ; - month: month of the year ; ; - year: year ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Pyrgeometer ; ; ; ; - irradiance: measure of the incoming irradiance in the IR range ; ; units (W/m^2) ; ; - voltage: raw voltage for the irradiance measurement ; ; calibration value is located in the data file ; ; units (V) ; ; - temperature: temperature measurement of the instrument ; ; units (Kelvin) ; ; - temp_voltage: raw voltage measurement for the temperature ; ; units (V) ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Pyranometer ; ; ; ; - irradiance: measure of the incoming irradiance in the visible ; ; range ; ; units (W/m^2) ; ; - voltage: raw voltage measurement for the irradiance ; ; calibration value in the data file ; ; units (V) ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Disdrometer ; ; ; ; - count: amount of particles that has passed in that interval ; ; when it is 0.0, all the other values are set to 0.0 ; ; unit (#) ; ; - error: communication error indicator (1.0 for an error) ; ; (0.0 for normal operation), unitless ; ; - intensity: rain intensity measurement calculated by the parsivel; ; unit (mm/h) ; ; - reflectivity: radar reflectivity calculated by the parsivel ; ; unit (dBz) ; ; - total_rain: measure of the accumulated rain from start ; ; unit (mm) ; ; - vis: horizontal visibility calculated by the parsivel ; ; unit (m) ; ; - weather_code: the SYNOP weather code indicating current weather ; ; unitless ; ; - sensor_temperature: the temperature at the sensor ; ; used for qualitiy control of the instrument ; ; unit (°Celsius) ; ; - error_code: parsivel internal error code, see parsivel info ; ; unitless ; ; - distribution: this is a 32 X 32 matrix that represents ; ; the binned distribution of the particles ; ; (velocity vs. diameter) ; ; the following lines describe the mean diameter in ; ; mm and mean velocity in m/s equivalent of each bin; ; between 1 and 32 ; ; ; ;diameter = [0.062,0.187,0.312,0.437,0.562,0.687,0.812,0.937,1.062$ ; ; ,1.187,1.375,1.625,1.875,2.125,2.375,2.75,3.25,3.75,4.25,4.75,5.5$ ; ; ,6.5,7.5,8.5,9.5,11.0,13.0,15.0,17.0,19.0,21.5,24.5] ; ; ; ;velocity = [0.05,0.15,0.25,0.35,0.45,0.55,0.65,0.75,0.85,0.95,1.1,1.3$ ; ; ,1.5,1.7,1.9,2.2,2.6,3.0,3.4,3.8,4.4,5.2,6.0,6.8,7.6,8.8,10.4,12.0$ ; ; ,13.6,15.2,17.6,20.8] ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Ceilometer ; ; ; ; - cloud_base1: This is the lowest measured cloud base ; ; if none are measured it will indicate 0.0 ; ; unit(m) ; ; - cloud_base2: This is the second lowest measured cloud base ; ; if none are measured it will indicate 0.0 ; ; unit(m) ; ; - cloud_base3: This is the highest measured cloud base ; ; if none are measured it will indicate 0.0 ; ; unit(m) ; ; - reflectivity: This is an array of 770 numbers representing the ; ; reflectivity from the specific height bin. ; ; each height bin is 10m. ; ; unit (100*srad*km)^-1 ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; function read_skywatch, instrument=instrument, name=name case instrument of 'pyrg': begin ; get the date for the file openr, lun, name, /get_lun line= " " readf, lun, line readf, lun, line year=0 month=0 day=0 reads, line, year, month, day, format='(6x,I4,1x,I2,1x,I2)' close, lun Free_lun, lun ;read the whole data data=read_ascii(name,comment_symbol=';') irr=data.field1[1,*] ;irradiance irrvolt=data.field1[2,*] ;voltage temp=data.field1[3,*] ;temp tempvolt=data.field1[4,*] ;temp voltage ;read in timestamp time=read_ascii(name,comment_symbol=';',delimiter=':') ;time in UTC hour = time.field1[0,*] minutes = time.field1[1,*] seconds = time.field1[2,*] ;get seconds of the day value u = size(hour, /dimensions) minsec = minutes * 60.0 hoursec = reform(hour) for i=1,u[1]-1 do begin if (hoursec[i-1] gt hoursec[i]) then hoursec[i] = hour[i] + 24.0 endfor hoursec = hoursec *3600.0 allseconds = seconds + minsec + hoursec results={pyrgeometer,irradiance:irr,voltage:irrvolt,temperature:temp,temp_voltage:tempvolt,hour:hour,minutes:minutes,seconds:seconds,sec_of_day:allseconds,day:day,month:month,year:year} end 'pyra': begin ; get the date for the file openr, lun, name, /get_lun line= " " readf, lun, line readf, lun, line year=0 month=0 day=0 reads, line, year, month, day, format='(6x,I4,1x,I2,1x,I2)' close, lun Free_lun, lun ;read the whole data data=read_ascii(name,comment_symbol=';') irr=data.field1[1,*] ;irradiance irrvolt=data.field1[2,*] ;voltage ;read in timestamp time=read_ascii(name,comment_symbol=';',delimiter=':') ;time in UTC hour = time.field1[0,*] minutes = time.field1[1,*] seconds = time.field1[2,*] ;get seconds of the day value u = size(hour, /dimensions) minsec = minutes * 60.0 hoursec = reform(hour) for i=1,u[1]-1 do begin if (hoursec[i-1] gt hoursec[i]) then hoursec[i] = hour[i] + 24.0 endfor hoursec = hoursec *3600.0 allseconds = seconds + minsec + hoursec results={pyranometer,irradiance:irr,voltage:irrvolt,hour:hour,minutes:minutes,seconds:seconds,sec_of_day:allseconds,day:day,month:month,year:year} end 'ceil': begin ; get the date for the file openr, lun, name, /get_lun line= " " readf, lun, line readf, lun, line year=0 month=0 day=0 reads, line, year, month, day, format='(6x,I4,1x,I2,1x,I2)' close, lun Free_lun, lun ;read the whole data data=read_ascii(name,comment_symbol=';') base1=data.field001[1,*] ;cloud base one base2=data.field001[2,*] ;cloud base two base3=data.field001[3,*] ;cloud base three reflectivity=data.field001[4:773,*] ;reflectivity at all the different heights ;read in timestamp time=read_ascii(name,comment_symbol=';',delimiter=':') ;time in UTC hour = time.field1[0,*] minutes = time.field1[1,*] seconds = time.field1[2,*] ; get teh seconds of the day value u = size(hour, /dimensions) minsec = minutes * 60.0 hoursec = reform(hour) for i=1,u[1]-1 do begin if (hoursec[i-1] gt hoursec[i]) then hoursec[i] = hour[i] + 24.0 endfor hoursec = hoursec *3600.0 allseconds = seconds + minsec + hoursec results={ceilometer,cloud_base1:base1,cloud_base2:base2,cloud_base3:base3,reflectivity:reflectivity,hour:hour,minutes:minutes,seconds:seconds,sec_of_day:allseconds,day:day,month:month,year:year} end 'disd': begin ; get the date for the file openr, lun, name, /get_lun line= " " readf, lun, line readf, lun, line year=0 month=0 day=0 reads, line, year, month, day, format='(6x,I4,1x,I2,1x,I2)' close, lun Free_lun, lun ;setup for reading in all the values stemplate={COMMENTSYMBOL:';',DATASTART:0L,DELIMITER:9b,FIELDCOUNT:[1034L],FIELDGROUPS:replicate(0,1034),FIELDLOCATIONS:replicate(0L,1034),FIELDNAMES:replicate('FIELD1',1034),FIELDTYPES:replicate(4L,1034),MISSINGVALUE:!VALUES.F_NAN,VERSION:1.0} data=read_ascii(name,comment_symbol=';',template=stemplate) amount=data.field1[1,*] ;particle number a = size(amount, /dimensions) err = replicate(!values.f_nan, a[1]) intensity = replicate(!values.f_nan, a[1]) reflectivity = replicate(!values.f_nan, a[1]) accumulated_rain = replicate(!values.f_nan, a[1]) visibility = replicate(!values.f_nan, a[1]) SYNOP_WW = replicate(0, a[1]) sensor_temp = replicate(!values.f_nan, a[1]) Error_code = replicate(0, a[1]) Diam_vel = replicate(!values.f_nan, [1024,a[1]]) temp = replicate(!values.f_nan, [32,32]) diameter = replicate(!values.f_nan,[a[1],32,32]) ;get the time stamp for this line time=read_ascii(name,comment_symbol=';',delimiter=':') ;time in UTC hour = time.field1[0,*] minutes = time.field1[1,*] seconds = time.field1[2,*] for i=0,a[1]-1 do begin if (amount[i] eq -1.0) then begin err[i]=1.0 endif else begin if(amount[i] gt 0.0) then begin intensity[i]=data.field1[2,i] reflectivity[i]=data.field1[3,i] accumulated_rain[i]=data.field1[4,i] visibility[i]=data.field1[5,i] SYNOP_WW[i]=data.field1[6,i] if (julday(month,day,year,hour[i],minutes[i],seconds[i]) gt julday(10,26,2009,17,38,03)) then begin sensor_temp[i]=data.field1[7,i] Error_code[i]=data.field1[8,i] Diam_vel[*,i]=data.field1[9:1032,i] endif else begin sensor_temp[i]=!values.f_nan Error_code[i]=data.field1[7,i] Diam_vel[*,i]=data.field1[8:1031,i] endelse endif endelse t=0 for u=0,31 do begin temp[t,u]=Diam_vel[t*u,i] t=t+1 endfor diameter[i,*,*]=temp endfor ; get the correct seconds of the day values u = size(hour, /dimensions) minsec = minutes * 60.0 hoursec = reform(hour) for i=1,u[1]-1 do begin if (hoursec[i-1] gt hoursec[i]) then hoursec[i] = hour[i] + 24.0 endfor hoursec = hoursec *3600.0 allseconds = seconds + minsec + hoursec results={disdrometer,count:amount,error:err,intensity:intensity,reflectivity:reflectivity,total_rain:accumulated_rain,vis:visibility,weather_code:SYNOP_ww,sensor_temperature:Sensor_temp,error_code:error_code,distribution:diameter,day:day,month:month,year:year,hour:hour,minutes:minutes,seconds:seconds,sec_of_day:allseconds} end 'mrr_avg': begin openr, lun, name, /get_lun year=00 date=00 month=00 hour=00 minute=00 seconds=00 UTC=00 avg=00 resolution=00 asl=00 sample_rate=00e1 Noise_0=0.0 Noise_1=0.0 Version_service=0.0 Version_firmware=0.0 serial=0 calibration=0 valid_spectra=0 ;percentage of valid spectra height=replicate(0,31) ;meters above radar Transfer_function=replicate(!values.f_nan,31) Path_attenuation=replicate(!values.f_nan,31) Reflectivity_attenuated=replicate(!values.f_nan,31) Reflectivity=replicate(!values.f_nan,31) Rain_rate=replicate(!values.f_nan, 31) Liquid_water_content=replicate(!values.f_nan,31) Fall_velocity=replicate(!values.f_nan,31) Frequency=replicate(!values.f_nan,[64,31]) Diameter=replicate(!values.f_nan,[64,31]) Number=replicate(!values.f_nan,[64,31]) nans=replicate(!values.f_nan,31) counter=0 first=0 dummy=replicate(!values.F_NAN,[64,31]) dummyd=replicate(!values.F_NAN,[64,31]) dummyn=replicate(!values.F_NAN,[64,31]) while not EOF(lun) do begin line= " " readf, lun, line indicator = "" reads, line, indicator, format='(A1)' ;;start a case sequence to get the proper formatting of the line case indicator of 'M': begin reads, line, y,m,d,h,mm,s,U,ave,stp,seal,smp,nf0,nf1,svs,dvs,dsn,cc,mdq, format='(4x,I2,I2,I2,I2,I2,I2,4x,I3,4x,I6,4x,I6,4x,I6,4x,E6,4x,F6,4x,F6,4x,F5,4x,F5,4x,I11,3x,I7,4x,I3)' if (first eq 0) then begin year=y & month=m & date=d & hour=h & minute=mm & seconds=s & UTC=U avg=ave & resolution=stp & asl=seal & sample_rate=smp Noise_0=nf0 & Noise_1=nf1 Version_service=svs & Version_firmware=dvs & serial=dsn calibration = cc & valid_spectra=mdq endif else begin year=[year,y] & month=[month,m] & date=[date,d] & hour=[hour,h] & minute=[minute,mm] & seconds=[seconds,s] & UTC=[UTC,U] avg=[avg,ave] & resolution=[resolution,stp] & asl=[asl,seal] & sample_rate=[sample_rate,smp] Noise_0=[Noise_0,nf0] & Noise_1=[Noise_1,nf1] Version_service=[Version_service,svs] & Version_firmware=[Version_firmware,dvs] & serial=[serial,dsn] calibration=[calibration,cc] & valid_spectra=[valid_spectra,mdq] endelse end 'H': begin he=fltarr(31) reads, line, he, format='(3x,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7,I7)' if (first eq 0) then begin height = he endif else begin height = [[height],[he]] endelse end 'T': begin trans=fltarr(31) reads, line, trans, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' if (first eq 0) then begin Transfer_function = trans endif else begin Transfer_function = [[Transfer_function],[trans]] endelse end 'F': begin u=0 reads, line, u, format='(1x,I2)' num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then freq=replicate(!values.f_nan,num) else freq=!values.f_nan if (num gt 0) then reads, line, freq, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' nan_replace=where(freq eq 0.0,count) if (count gt 0) then freq[nan_replace]=!values.F_NAN if (num le 30) then freq=[freq,nans[num:30]] if (num eq 0) then freq=nans if (first eq 0) then begin Frequency[u,*] = transpose(freq) endif else begin dummy[u,*]=freq endelse end 'D': begin reads, line, u, format='(1x,I2)' num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then diam=replicate(!values.f_nan,num) else diam=!values.f_nan if (num gt 0) then reads, line, diam, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' nan_replace=where(diam eq 0.0,count) if (count gt 0) then diam[nan_replace]=!values.F_NAN if (num le 30) then diam=[diam,nans[num:30]] if (num eq 0) then diam=nans if (first eq 0) then begin Diameter[u,*] = diam endif else begin dummyd[u,*] = diam endelse end 'N': begin reads, line, u, format='(1x,I2)' num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then nums=replicate(!values.f_nan,num) else nums=!values.f_nan if (num gt 0) then reads, line, nums, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' nan_replace=where(nums eq 0.0,count) if (count gt 0) then nums[nan_replace]=!values.F_NAN if (num le 30) then nums=[nums,nans[num:30]] if (num eq 0) then nums=nans if (first eq 0) then begin Number[u,*] = nums endif else begin dummyn[u,*] = nums endelse end 'P': begin num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then path=replicate(!values.f_nan,num) else path=!values.f_nan if (num gt 0) then reads, line, path, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' if (num le 30) then path=[path,nans[num:30]] if (num eq 0) then path=nans if (first eq 0) then begin Path_attenuation = path endif else begin Path_attenuation = [[Path_attenuation],[path]] endelse end 'z': begin num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then a_reflect=replicate(!values.f_nan,num) else a_reflect=!values.f_nan if (num gt 0) then reads, line, a_reflect, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' if (num le 30) then a_reflect=[a_reflect,nans[num:30]] if (num eq 0) then a_reflect=nans if (first eq 0) then begin Reflectivity_attenuated = a_reflect endif else begin Reflectivity_attenuated = [[Reflectivity_attenuated],[a_reflect]] endelse end 'Z': begin num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then reflect=replicate(!values.f_nan,num) else reflect=!values.f_nan if (num gt 0) then reads, line, reflect, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' if (num le 30) then reflect=[reflect,nans[num:30]] if (num eq 0) then reflect=nans if (first eq 0) then begin Reflectivity = reflect endif else begin Reflectivity = [[Reflectivity],[reflect]] endelse end 'R': begin num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then rate=replicate(!values.f_nan,num) else rate=!values.f_nan if (num gt 0) then reads, line, rate, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' if (num le 30) then rate=[rate,nans[num:30]] if (num eq 0) then rate=nans if (first eq 0) then begin Rain_rate = rate endif else begin Rain_rate = [[Rain_rate],[rate]] endelse end 'L': begin num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then lwc=replicate(!values.f_nan,num) else lwc=!values.f_nan if (num gt 0) then reads, line, lwc, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' if (num le 30) then lwc=[lwc,nans[num:30]] if (num eq 0) then lwc=nans if (first eq 0) then begin Liquid_water_content = lwc endif else begin Liquid_water_content = [[Liquid_water_content],[lwc]] endelse end 'W': begin num=strlen(line) num=fix((num-3.)/7.) if (num gt 0) then velo=replicate(!values.f_nan,num) else velo=!values.f_nan if (num gt 0) then reads, line, velo, format='(3x,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7,F7)' if (num le 30) then velo=[velo,nans[num:30]] if (num eq 0) then velo=nans if (first eq 0) then begin Fall_velocity = velo endif else begin Fall_velocity = [[Fall_velocity],[velo]] endelse ;readf, lun,scrap if (first ne 0) then Frequency = [[[Frequency]],[[dummy]]] if (first ne 0) then Diameter=[[[Diameter]],[[dummyd]]] if (first ne 0) then Number=[[[Number]],[[dummyn]]] first=first+1 dummy=replicate(!values.F_NAN,[64,31]) dummyd=replicate(!values.F_NAN,[64,31]) dummyn=replicate(!values.F_NAN,[64,31]) end else: begin ;print,'error in reading next line' ;readf, lun,scrap end endcase counter=counter+1 endwhile close, lun Free_lun, lun u = size(hour, /dimensions) minsec = minute * 60.0 hoursec = reform(hour) for i=1,(u[0]-1) do begin if (hoursec[i-1] gt hoursec[i]) then hoursec[i] = hour[i] + 24.0 endfor hoursec = hoursec *3600.0 allseconds = seconds + minsec + hoursec results={year:year,month:month,day:date,hour:hour,minutes:minute,seconds:seconds,sec_of_day:allseconds,$ UTC:UTC,avg:avg,resolution:resolution,asl:asl,sample_rate:sample_rate,noise_0:Noise_0,noise_1:Noise_1,$ version_service:Version_service,version_firmware:Version_firmware,serial:serial,calibration:calibration,$ valid_spectra:valid_spectra,height:height,Transfer_function:Transfer_function,Frequency:Frequency,Diameter:Diameter,$ Number:Number,Path_attenuation:Path_attenuation,Reflectivity_attenuated:Reflectivity_attenuated,Reflectivity:Reflectivity,$ Rain_rate:Rain_rate,Liquid_water_content:Liquid_water_content,Fall_velocity:Fall_velocity} end else: begin print,'Instrument not available' results = !values.f_nan end endcase ;stop return, results end