PISCO_mooring_monster.m This m-file creates a giant (monster) matrix of annual data for PISCO's ADCPs, S4 current meters, and Tidbit temp loggers MONSTER MATRIX (same format for both Matlab and Text output files) COLUMN DATA DESCRIPTION UNITS INSTRUMENT (1) Matlab serial time (GMT) n/a (2) Year (GMT) ADCP (3) Month (GMT) ADCP (4) Day (GMT) ADCP (5) Decimal Day (GMT) ADCP (6:21) East Velocity 2m-17m bins (m/sec) ADCP (22:37) North Velocity 2m-17m bins (m/sec) ADCP (38:53) Beam Intensity 2m-17m bins (counts) ADCP (54) Temperature (C) ADCP (55-57) Temperature (Top-Mid-Bottom) (C) Tidbits (58- 73) Percent Good, Field 3 (%) ADCP (74) East Velocity (~4m depth) (m/sec) S4 (75) North Velocity (~4m depth) (m/sec) S4 (76) Depth (m) S4 Note: East and North velocity vectors have been corrected and are presented here relative to TRUE north. To generate the annual files you must have: in the root directory: PISCO_monster.m Load_ADCP.m Tidbit_filter.m The desired xxxxx_log.m file for a specific site and year. Paths_etc.mat (generated by the _log.m file) By running a xxxxx_log.m file you create ASCII files (one for each instrument) that are lists of filenames applicable for that year. These lists are stored in the directory with the data files. An example of an output file generated by running the xxxx_log.m file might be: (ARG_2001_ADCP_log.txt) (site_year_instrument_log.txt) The data files staged for incorporation into the monster matrix are in the format : ( .ssv files for tidbits) ( .mat files for ADCP data) ( S4 data undecided at this writing) NOTE: The _log.m file MUST be run prior to running the PISCO_mooring_monster.m file as this provides the applicable paths and updates the data file lists for a particular site and year. %------------------------ The ADCP data are pre-processed with WinADCP (Ver.1.13 at this writing) to create a .mat file of the desired variables. In WinADCP determine the beginning and ending ensemble number. Do this by eye to remove out-of-water data In the WinADCP export window choose: Series/Ancillary Ensemble numbers (beginning and end) Export file type = .mat Highlight: Bins 1 through 16 East, North velocities Beam echo amplitudes (avg) Temperature Orientation PG3 (percent good field 3) Depth (when pressure available) As the PISCO_monster.m program runs it uses the function Load_ADCP.m to create a structured array of these desired variables. ADCP data are filtered, corrected for magnetic variation and then interpolated onto a 20 min time interval. The midpoints for the 1m bins range from 2.5 to 17.5m off the sea bottom. Blanking distance and offset for tranducer head height have been incorporated into these altitudes. Users should be aware that above surface data do exist in the higher bins and bad signals will have to be removed. Good current data without surface effects can usually be found up to the 13.5m bin even during extreme low tides %----------------------------- The Tidbit data are pre-processed in two steps to create .ssv files. First, raw .dtf files are exported using the Boxcar Pro. (ver. 4.0.7) software creating 3 columns of space separated variables (ssv) in a file with a .txt suffix. Column 1 = old lotus/old excell date format. Column 2 = decimal day (GMT) Column 3 = Temperature (C). Second, I used the .m file "make_ssv_files.m" to clip off out-of-water data and create .ssv files. You can do this step a number of ways but need to end up with the 3 columns above separated by spaces. PISCO_monster.m imports the desired .ssv Tidbit files using the function Tidbit_filter.m which yields filtered time and temp vectors which are interpolated onto the same 20 min time interval. In addition to the annual Monster matrix two other variables are exported from this m.file and stored in the xxx_monster_yyyy.mat file. These variables (PGtime and PG3 are used in the Monster_Data_Checker.m plotting program to provide a plot of the location (time vs. bin) of all rejected ADCP data. The rejection criteria is set at Percent Good Field 3 == 100 or (and this is confusing), that 100% of the velocity data for that bin was rejected because no good 3 or 4 beam solutions were achieved. This 'filter' eliminated the anomalous spiking that was observed in the velocity data. As of 10/28/03 S4 data (HAZ, WIL, PEL, and SCP sites) has been incorporated. The processing protocol can be read at in F:\pisco-data\physical-files\S4-currents\S4_processing_readme.txt