ADCP Menu Version 2.0 11/13/96 A MATLAB m-file set for converting to netCDF and viewing RDI ADCP time series data. By Marinna Martini, U.S. Geological Survey Gregorian time axes by Rich Signell, U.S. Geological Survey Report bugs to Marinna at mmartini@usgs.gov or (508) 457-2326 Quick start: Put all these files in the same directory. At the MATLAB command prompt, change to the directory into which you have installed the files (unless the directory is already known to MATLAB). At the prompt, type 'adcpmenu' to activate the GUI menu driver. Look at the example netCDF file 4381adcp.cdf. Have fun! Looking at your own data: You will first have to convert your to netCDF data using rdi2cdf.m. An example raw data file 4381adcp.000 is provided. Once your data are converted, follow the steps in quick start. How the m-files are organized: Most of the code is contained in a single script adcpview.m. Operations are selected by the menu function adcpmenu.m. The advantage of using a script is that you can exit the menu at any time and manipulate the data, then return to the script. Rdi2cdf.m is a stand alone function. I started this projects mainly for my own convenience, but kept it generic enough that I hope others will benefit from my work. If you have any comments or find bugs, PLEASE let me know. Notes, caveats: 1) I have been working towards making these m-files smart enough to know when the ADCP is upward looking, convex, etc. I think I am there, but am sure there are bugs around. Consider yourself a beta tester. 2) Since this is for bottom mounted, long term, time-series measurements, bottom ping data is ignored. The code doesn't seem to choke on data with bottom pings, but since my work is always self contained, I can't be sure. Perhaps someone can help out with this? 3) The convertion from beam to earth agrees within 0.25 cm/s with BBLIST output. ADCPMENU version 1.1 testing got to within 8e-4 cm/s of BBLIST's answer if I got the sound speed adjustment just right. However, there are some fine points about how the ADCP computes sound speed based on available sensors that I am not quite clear on, so you may not get 8e-4 accuracy in all cases. 4) MATLAB 4.0 can be funny about closing plot windows when the menu window is displayed. To be safe, use the 'Close Plot Windows' selection in the ADCP menu to clear old plots instead of closing them from the MATLAB command window or using the MATLAB menus. 6) MATLAB version 4.x is required. 7) This code has not been written for speed, but for practical use on a small field hardy notebook computer with limited RAM. Some operations, especially if large amounts of data are being read, can take time. Version 2.0 is much faster than previous versions now that all data reads are done from netCDF. Future wishes, to work on when I have the time: 1) A scrolling capability on the time axis so that I can view larger data sets without overwhelming the plot area. 2) Gregorian x axis tics on the 3D plots Packing list: adcpmenu.m menu driver which calls adcpview.m adcpview.m the main engine for viewing ADCP data bm2earth.m convert from beam to earth coordinates dec2bin.m convert decimal to binary bin2dec.m and vice-versa rdhead.m read the BBADCP header rdflead.m read the BBADCP fixed leader rdvlead.m read the BBADCP variable leader timeplt.m plot data on Gregorian axis The following m-files support timeplt.m: TIMETEST.M a demo file for timeplt GMAX.M, GMIN.M GREGAXD.M m-files which adjust the axis tics and GREGAXH.M labels according to the time frame GREGAXM.M of the data GREGAXY.M GREGORIA.M H2HMS.M, HMS2H.M, S2HMS.M time format conversions julian.m convert from gregorian to julian time gregoria.m convert from julian to gregorian time ISREAL.M GREGAXMI.M Data example file: 4381adcp.000 Taken at the USGS monitoring site tem miles off Boston, MA. 3 days of data, 170 ensembles.