This README_WCv1.txt gives a brief description of the WC v1 data and Matlab codes that correspond to the cuwindcube/WLS7_PTQ github repository. Author: Paul T. Quelet Last Updated: 10 July 2015 For questions and bug fixes, please contact ptquelet@gmail.com -------------------------------- LOCATION OF INSTRUMENTS As of 20 February 2015, both WC61 v1 & WC68 v1 LiDARS were co-located at the "lidar super-site" at the middlesouth guy of the Boulder Atmospheric Observatory (BAO): 40.004881N, 105.0039W, 1582msl per Google Earth. -------------------------------- GENERAL INFORMATION The Windcubes (WC) referred to here are Leosphere/NRG Version 1 (v1) Windcubes. Note that the "u" and "v" and "w" as defined in these files are NOT in meteorological coordinates, but rather in engineering coordinates: U positive from north -> south V positive from east -> west W positive from up -> down Therefore, the calculation performed in the codes is: u_meteorological = -v_native v_meteorological = -u_native w_meteorological = -w_native Note: The coordinate system for the v2 is different than the v1. -------------------------------- DATA FILES INFORMATION STA file : Averaged file, 2-minute average. (ASCII text file, .sta extension) RTD file : Real Time Data file, about 1 Hz. Timestamps include milliseconds, so need to include these for time accuracy. (ASCII text file, .rtd extension) Digit decoding: d - day, m - month, y - year, H - hour, M - minute, S - second, F - fraction of sec File names formats: WLS7-61_YYYY_MM_DD__hh_mm_ss.sta (WC61 v1 STA) WLS7-68_YYYY_MM_DD__hh_mm_ss.sta (WC68 v1 STA) WLS7-61_YYYY_MM_DD__hh_mm_ss.rtd (WC61 v1 RTD) WLS7-68_YYYY_MM_DD__hh_mm_ss.rtd (WC68 v1 RTD) Files are daily unless an interruption in data collection occurred; in that case, the file name is the time stamp of the restarted time of data collection. Note: RTD data is much larger as noted in the code. Also, the raw RTD from the instruments are binary files must be converted using the LabView runtime engine and the ConvertRTD.exe available from Leosphere/NRG. (This conversion has already been performed for the XPIA experiment dataset.) WC_nums : 1 is WC49 (v1), 2 is WC61 (v1), 3 is WC68 (v1), 4 is WC16 (WLS866 v2 offshore LiDAR) in the codes Note for XPIA experiment: Only WC61, WC68, and WC16 were taking data during XPIA. This README only discusses WC61 & WC68 as they are v1 LiDARs. Vertical Levels Chosen: 40m, 60m, 80m, 100m, 120m, 140m, 160m, 180m, 200m, 220m 10 vertical levels (or altitudes) chosen for v1 remote sensing -------------------------------- TIME INFORMATION Digit decoding: d - day, m - month, y - year, H - hour, M - minute, S - second, F - fraction of sec Date/Time, UTC (v1, STA): dd/mm/yyyy HH:MM:SS Date/Time, UTC (v1, RTD): dd/mm/yyyy HH:MM:SS.FFF (where .FFF are the fractions of a second in Matlab format, although only the first two fractional second digits are usually reported) Time stamp is the first column of WC files. Note on time stamp: 9 April 2015 lidars were compared to time.gov. Both lidars lagged time.gov by one second. -------------------------------- VARIABLES, STA FILES, v1 COLUMNS 2-3 Wiper Count : ignore unless suspect precipitation (but often poor metric for precipitation) Tm : internal temperature (deg Celsius) of the laser unit COLUMNS 4-21 (GROUPS of 18) **** begin group of variables that will repeat for each of ten heights ******** Vhm1 : mean scalar averaged horizontal wind speed (m/s) at the first (lowest) measurement altitude for the 2-minute period dVh1 : standard deviation of scalar averaged horizontal wind speed (m/s) VhMax1 : maximum 1-sec wind speed measurement during the 2-minute period (m/s) VhMin1 : minimum " " Azim1 : vector-averaged wind direction of altitude 1 um1 : average U-component at altitude 1 du1 : standard deviation of U-component at altitude 1 vm1 : average V-component at altitude 1 dv1 : standard deviation of V-component at altitude 1 wm1 : average W-component at altitude 1 dw1 : standard deviation of W-component at altitude 1 CNRm : average CNR for the two-minute period (dB) (*** often use -17 dB as LiDAR ages. Leosphere standard limit is -22 dB but more restrictive limits may be necessary based on spectral_broadening as the laser ages.***) dCNR : standard deviation of CNR CNRmax : maximum CNR CNRmin : minimum CNR spectral_broadening : 2 minute averaged spectral broadening (converted to m/s) dspectral_broadening : standard deviation for previous value Avail.1 : percentage of data available at this altitude (assuming CNR threshold of -22 dB) ***** end group of variables that will repeat for each of ten heights ********* Repeats this group of variables for next 9 levels, where the 1 in naming changes to 2, 3, 4, ... , 10 (Each group of columns is separated by a blank column, e.g. 22, 41, ...) -------------------------------- VARIABLES, RTD FILES, v1 COLUMNS 2-4 Position : laser beam head angular position with respect to North (0°). East is +90°, South is +180° and West is +270° Temperature : internal temperature (deg Celsius) of the laser unit Wiper : ignore unless suspect precipitation (but often poor metric for precipitation) COLUMNS 5-12 (GROUPS of 8) ***** begin group of variables that will repeat for each of ten heights ******** CNR-1 : Carrier to Noise Ratio in the corresponding line of sight (dB) (*** often use -17 dB as a threshold***) RWS-1 : Radial Wind Speed along the line of site (m/s) RWSD-1 : Averaged Doppler Spectrum width converted into (m/s) Vh-1 : Horizontal wind speed (m/s), running average from last ~4 seconds Azi (°)-1 : Wind direction [°] u-1 : U wind positive from north -> south (see above) v-1 : V positive from east -> west (see above) w-1 : W positive from up -> down (see above) ***** end group of variables that will repeat for each of ten heights ********* Repeats this group of variables for next 9 levels, where the 1 in naming changes to 2, 3, 4, ... , 10 -------------------------------- CODES INFORMATION Basic Information: Note: Consider "1" to be "on" when using a flag in the codes, while "0" is "off". The useful header starts on line 57 for a WC v1 and the data start on line 58 for a WC v1 LiDAR. The ten altitudes are defined in line 14 for a WC v1. Architecture of Directories (below your main directory): WC61_RTD_XPIA/ : Input Data directory for WC61 v1 RTD data WC61_STA_XPIA/ : Input Data directory for WC61 v1 STA data WC68_RTD_XPIA/ : Input Data directory for WC68 v1 RTD data WC68_STA_XPIA/ : Input Data directory for WC68 v1 STA data WC_calc_output/ : Output directory for the WC_calc code. Data files are split up over WC devices. Also default output for some plots. WC_load_output/ : Output directory for the load_WLS7_WLS866 code. Single data file created named based on WCs selected. Structure variables in the file per each WC device. WC_regTA_output/ : Output from WCs_regular_time_axis code. WC data is put on consistent, regular 2-minute resolution, time axis with NaN filled in for missing times. Note: RTD data is much larger and is put on the local C: drive by default and noted in the code. MAIN DRIVER code: Main_WC_script.m: Single script allowing the user to set multiple parameters to use in multiple functions of the code. (All codes below act as functions to pass parameters into from the Main_WC_script.) READ IN CODES: load_WLS7_WLS866.m : Takes STA (.sta) or converted RTD (.rtd) files from WC software from one of the above directories and converts them into native Matlab .mat file format for use in other codes importFile.m : Imports a single WindCube file importDir.m : Loops through importFile multiple times for many WindCube files in a single directory CALCULATION / PLOTTING CODES: WC_calc.m : Calculates TKE, I, shear, etc. using output from load_WLS7_WLS866.m WC_daily_pcolor.m : Creates daily color raster plots of WC variables for quick analysis like on DataViewer (http://breeze.colorado.edu/DataViewer/XPIA.html) WCs_avail_profile.m : Takes in data from the WCs availability and plots it as a function of height WCs_regular_time_axis.m : Takes output from WC_calc and puts data onto consistent, regular 2-minute resolution, time axis with NaN filled in for missing times. Weibull_Distribution_WCs.m : Creates relative histograms and best fit Weibull distribution traces of the WC data. winds_scatter_wc_compare_regTA.m : Scatterplots comparing the WC devices. winds_scatter_wc16_v2_ground_table_compare_regTA.m : Scatterplots comparing WC16 v2 to the v1 LiDAR on the ground and on the motion table to see the effects. (STA files only so far.) MATLAB FUNCTIONS (dependencies) (Please make sure these functions are "Added to the Path" as the codes use these user contributed functions): circ_colormap.m : Allows user to incorporate circular colormaps. Useful for wind direction plotting. structvars.m : print a set of assignment commands that, if executed, would assign fields of a structure to individual variables of the same name (or vice versa). v2struct.m : Nice code to efficiently pack/unpack variables to/from a scalar structure. variableCreator.m : Creating new variables on the fly is something that should be avoided (using eval()), but this alternative method is better.