Steps for Processing AON 2014-16 BS3b Mooring Data ================================================== D. Torres, WHOI, 4/23/2019 The data being processed here are from AON mooring BS3. ADCP depth was calculated from MC pressure sensor deployed along side on tripod. ADCP s/n 14079 did not have BT or WM15 firmware so was not set up tp surface track or ice track. read_bs3b.m ============ read_bs3b.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: AON_001.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.08 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=[1 9] was set to edit out bins affected by some obstruction in the beam path. For this deployment, bins 1 and 9 were set to Nan due to interference. 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_no_ice.txt. PROCESS_ADCP.M ============== process_adcp.m - Further process ADCP data. Input: aon15_bs3b_step1_raw.mat Output: aon15_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 pressure. Speed of sound was determined from MC temperature and MC 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. scpltuvw_c.m ------------ Data flagged by p.bblim=9 were linearly interpolated between bins 8 and 10. Bin 1 was left as Nan since it was on the end and could not be interpolated. New output file was saved with interpolated data. aon15_bs3b_I_pro1.mat 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. aon15_bs3b_step1_raw.mat - raw data with initial screening aon15_bs3b_pro1.mat - Original processed before interpolation or polyedit. aon15_bs3b_I_pro1_noedt.mat - original (after interpolation, before polyedit editing) aon15_bs3b_I_pro1_edt.mat - after interpolation and polyedit aon15_bs3b_I_pro1.mat - same as _edt aon15_bs3b_Final1.mat - Final processed data. 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 - 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 aon15_bs3b_adcp.tgz `cat listdir` `cat listfiles` That's it for now! Daniel