.. ...................................... .. UHDAS/CODAS restructured text document .. ...................................... Using **run_agetmat** to get averaged data First, make sure your PATH (for shell commands) and matlab path are correct. Click `here `_ for instructions. For this example, suppose the cruise is 'vg0601'. 1. Identify processing directory path for the instrument of choice. For example, for UHDAS at sea, data acquisition takes place in **adcp_data** under the cruise name. Processing always takes place in the 'proc' subdirectory, in a subdirectory named for the instrument, eg. 'os75nb'. adcp_data/vg0601/proc/os75nb 2. Determine what decimal day range to extract. CODAS processing uses a zero-based decimal day (Jan1 noon UTC is 0.5, not 1.5). 3. Run this from a directory (your working directory) where you have 'write' permission (Matlab will write some temporary files named a\*.mat, and delete them afterwards) 4. The following should extract all 5-minute averages from the database for the processing directory you chose. In matlab: :: [alldata,config]= run_agetmat('ddrange', [-60 390],... 'editdir', 'adcp_data/vg0601/proc/os75nb/edit'); data = apply_flags(alldata, alldata.pflag); %edit bad points 5. The fields in the structure **data** are described `here `_. 6. You can use 'plot' of course, and here is an adcp-oriented panel-plotting tool: :: figure aplotit(data,config,'fn','amp1'); figure aplotit(data,config,'fn','amp1','cur_ax', subplot(211)); subplot(212) plot(data.dday, data.smmps) xlabel('zero-based decimal day') title('ship speed') ylabel('m/s')