Steps for Processing AON 2013-14 BS3b Mooring Data ================================================== D. Torres, WHOI, 1/3/2017 read_cf1.m ============ read_cf1.m - Each station has a specific read program. Here editting criteria, start times, positions, file names, etc were all set. The following editting criteria were applied to all stations: Input: BS3LR000.000 - Raw binary ADCP data. Output: aon14_bs3b_step1_raw.mat - Mat file of semi-processed ADCP data. p.pglim = 20 % - Minimum percent good threshold. p.elim = 0.04 m/s - Maximum error velocity. Magnetic variation correction was applied for each ensemble. Data exceeding the thresholds above were set to NaN. Velocity data were rotated to True North by adding magnetic variation angle to direction and converted to U and V components. The criteria p.bblim was not set to edit out bins affected by MC tether buoys in the beam path of the ADCP. Affected bins were hand editted using polyedit8.m. The read_.m program sets these parameters and converts raw binary ADCP data and into mat files. The format of the final processed .mat file is described in readme_format_Final1_ice.txt. PROCESS_ADCP.M ============== process_adcp.m - Further process ADCP data. Input: aon14_bs3b_step1_raw.mat Output: aon14_bs3b_pro1.mat The following actions were performed with process_adcp.m. % - Read ADCP mat file from loadrdi_sbi.m. % - Calculate speed of sound at transducer and apply velocity correction. % - Create depth array. % - ADCP and Microcat corrected for clock drift (if needed). % - Interpolate Microcat and/or ULS data onto ADCP time grid. % - Set velocities above surface (or cos of beam angle) to NaN. ADCP clock was checked for clock drift. Transducer depth for each ensemble was corrected using MC/ULS pressure. Speed of sound was determined from ADCP temperature and fixed salinity. A depth array was calculated using the corrected transducer depth. The array was calculated for all bins. Depth refers to + meters below the surface. Each depth corresponds to the center of each bin. Since each ADCP was set up to collect data beyond the surface, negative values are out of the water and used as a criteria to set the velocity data out of the water = NaN. Also, due to side lobe interference, additional data proportional to the cosine of the beam angle was also editted (set to NaN) using the following formula: cos20=(BS/2)+(tr_depth-(tr_depth.*cos(BA)) where BS = binsize BA = beam angle Approximately 8% of the water column velocity data was lost to side lobe interference. t_polyedit8.m ------------- Program for hand editing ADCP velocity data. Uses code adapted from CODAS editing programs (Bahr). Bins near the surface often have higher error velocities. Hand editing of bad bins near the surface using this program. add_flag_fb.asc containing which data pixels have been edited. These data were run through the polyedit twice. So we have afew extra .mat files saved. aon14_bs3b_Final1.mat - Final processed data. aon14_bs3b_pro1_edt.mat - first pass polyedit aon14_bs3b_pro1.mat - same as _edt2 aon14_bs3b_pro1_noedt.mat - original (no polyedit editing) aon14_bs3b_step1_raw.mat - raw data with initial screening app_manfbedits2 --------------- Apply edits done using t_polyedit8 (file add_flag_fb.asc) to ...pro1.mat file. Repeat if necessary. Original file is preserved (...noedt.mat). convert_adcp_pro.m ------------------ Change the first line to the appropriate mat file and run it. A set of mat files for each data type will be saved which are used by the plotting routines. savepro_adcp.m -------------- Saves processed data into convenient structure for archiving. scmenu.m -------- GUI for plotting profiles and contours of velocity, etc. Outliers (mostly near the surface) were corrected by hand using t_polyedit.m routines. Set parameters near the top of the file. The offset settings are for the velocity profile plots. You can set to 0 to have all the profiles over a time range plotted over each other. Or you can set a positve number to space out each profile by X cm/sec. Good for seeing the time evolution of the data. Contouring is good for that too. Make sure you set the offsets back to 0 for the contour plots. If you don't, you will see why. run_scplot.m ------------ Matlab script for automating some of the plotting. Allows you to plot entire year time series in 20 day chunks. Save data and plots for archiving --------------------------------- > webmagick # Creates webpages for viewing data in directories. > la -1 > listdir > la -1 > listfiles - Add to listfiles index.html .index1.html .indexdir.html .index.pl - Edit each of these to have the files and directories you want to save. - Edit the format file and copy over to data directory. - Create tgz file with data and plots. > tar cvfz aon14_bs3b_adcp.tgz `cat listdir` `cat listfiles` That's it for now! Daniel