;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; 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 ; ; 'mrr_inst' is for the micro rain radar instant ; ; - \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 ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Micro Rain Radar (averaged) ; ; ; ; - UTC: hours between local time and UTC ; ; unit (hours) ; ; - avg: amount of seconds in each average ; ; unit (seconds) ; ; - resolution: constant distance between each height bin ; ; unit (m) ; ; - asl: height above sea level of the instrument ; ; unit (m) ; ; - sample_rate: frequency of the sampling rate ; ; unit (Hz) ; ; - noise_0: noise level 0 settings ; ; unitless ; ; - noise_1: noise level 1 settings ; ; unitless ; ; - version_service: Version number of the MRR service program ; ; retrieval program loaded on the computer ; ; unitless ; ; - version_firmware: Version number of the MRR firmware ; ; loaded on the actual instrument ; ; unitless ; ; - serial: Serial Number of the MRR ; ; unitless ; ; - calibration: Calibration constant for the calculations of ; ; Rain Rate ; ; unitless ; ; - valid_spectra: Percentage of the spectra that is valid ; ; unit (%) ; ; - height: Array of the differing height values for each bin ; ; unit (m) ; ; - Transfer_function: array of values that corresponds to a ; ; transfer value for each height bin ; ; raw data is divided by this value ; ; unitless ; ; - Frequency: Matrix of FFT spectra with 64 spectral bins and 31 ; ; Height bins. it is spectral Reflectivities ; ; unit (dB) ; ; - Diameter: Matrix of the center of the diameter of the drop sizes; ; of an same volume sphere drop. for each height bin ; ; unit (mm) ; ; - Number: Matrix of Spectral Drop Densities, N(D), number of drops; ; corresponding to the size bin (Diameter) used for ; ; calculations of the fall velocity for each height ; ; unit (m^-3 mm^-1) ; ; - Path_attenuation: two way Path integrated attenuation, ; ; unit (dB) ; ; - Reflectivity_attenuated: The radar Reflectivity without ; ; attenuation corrections of each height ; ; unit (dBZ) ; ; - Reflectivity: Radar reflectivity of each height ; ; unit (dBZ) ; ; - Rain_rate: Rain rate for each height bin ; ; unit (mm/h) ; ; - Liquid_water_content: Liquid water content for each height bin ; ; can be negative, for no statistical bias ; ; unit (g/m^3) ; ; - Fall_velocity: Characteristic fall velocity of the height bin ; ; From the first moment of the doppler velocity ; ; each velocity bin is 0.1905 m/s wide ; ; unit (m/s) ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;