ADCP Tools Version 3.0 for MATLAB 5.2 3/4/99 An m-file set to convert RDI ADCP time series to netCDF and view it. By Marinna Martini, U.S. Geological Survey, Woods Hole Center netCDF access tools by Chuck Denham, U.S. Geological Survey, Woods Hole Center Report bugs to Marinna at mmartini@usgs.gov or (508) 457-2326 ---- Quick start: Make sure you have the prerequisites installed on your computer: REQUIRED: MATLAB 5.x, found at the Mathworks, http://www.mathworks.com REQUIRED: The "mexcdf53" Mex-file gateway for your platform, a MATLAB mex file. The NetCDF Toolbox, a set of m-files. These are both available at http://crusty.er.usgs.gov/mexcdf.html RECOMMENDED: netCDF (network Common Data Form), http://www.unidata.ucar.edu/packages/netcdf/index.html Follow the directions in the above rerequisite packages to install them. Put all the ADCP Tools 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, use adcpmenu.m to activate the GUI menu driver. ---- How the m-files are organized: Most of the code is contained in a single script adcpview.m. Operations are selected by the GUI menu in 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. You can also use the script without the menu driver to process data, however this is only recommended for the experienced user. Rdi2cdf.m is a stand alone function. I started this project 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) These scripts were written with bottom mounted, long term, time-series measurements in mind. 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 1.18 mm/s and with BBLIST output. 4) MATLAB version 5.x is required for adcpmenu but not for rdi2cdf. Rdi2cdf can still be used on MATLAB 4.0 as long as you have installed the Mex file gateway for MATLAB 4.0, which is still available at http://crusty.er.usgs.gov/mexcdf.html. 5) If you feed the program bad dates, it will bomb. My error checking is limited. ---- Packing list: !readme.txt this file !history.txt history of improvements and bug fixes. adcpview.m is a script for viewing and processing RDI ADCP data rdvlead.m reads the variable leader data from a raw ADCP time_check.m adjusts different julian time conventions to MATLAB time rdi2cdf.m converts RDI ADCP files to netCDF format rdhead.m reads the header data from an RDI ADCP binary file rdflead.m reads the fixed leader data from an RDI ADCP binary data file mcnote.m annotates netCDF variables by using text attributes mcgetavg.m loads data from a netCDF datafile object. MCDUMP.m is a more terse form of the NetCDF utility 'ncdump'. JULIAN.m Converts Gregorian calendar dates to corresponding GREGORIAN.m Converts Julian day numbers to corresponding DATETICK.m Date formatted tick labels. bm2earth.m converts RDI data recorded in BEAM to earth coordinates binstat.m computes statistics on the ensembles in a single ADCP bin binavg.m block averages data, omitting non-valid (fill) points adcpmenu.m is the menu driver function for adcpview.m zoomfix.m adds a button to the current figure for updating dateticks after zooming Data example files: 4381adcp.000 Taken at the USGS monitoring site tem miles off Boston, MA. 3 days of data. 4381adcp.cdf The netCDF version of 4381adcp.000.