2.8.7. Quick_adcp.py: Overview

quick_adcp.py is a Python program that runs the usual CODAS processing steps in a predictable and configurable manner. For a clean dataset, it provides a relatively quick and painless way of staging the data so it can be edited with dataviewer.py, and subsequent calibrations can be applied. If your dataset has problems, you can always run the appropriate steps manually.

adcp_database_maker provides a graphical interface which leads the user through the choice of data (UHDAS or VmDAS), sets up a processing directory (using adcptree.py), and runs the preliminary processing steps. Click here for more details.

Under the hood, quick_adcp.py can deal with many combinations of data acquisition, averaging (or not) and instrument, as long as the processing directory was set up with adcptree.py. Check this table of supported file types to see if your data can be processed with CODAS.

At its operational level, CODAS processing consists of a series of C programs or matlab programs that interact with the CODAS database or with files on the disk. C programs usually deal with the database directly, by loading data (eg. ldcodas), extracting data (eg. adcpsect) or by manipulating the database (eg. rotate, putnav, dbupdate). Python programs are used to maniplate files on the disk so C programs can use them. In the past, Matlab was used to perform these manipulations.

Quick_adcp.py is designed to work through the standard processing steps with a standard protocol. For each processing step,

  1. Change directories to the appropriate subdirectory (for that task)

  2. Write a file with information for the program that is about to run

  3. Run a program that reads the file, and performs the processing task.

Two kinds of programs might run for processing. Their files are:

  • for C programs (executables), a control file ending in .tmp

  • for Python, a file ending in _script.py

In order to process data, a set of supporting programs must be installed. This includes Python, various supporting packages, and the actual C, Python, and Matlab programs that make up the CODAS suite. The shell (eg. bash, or Command Prompt) must know how to find the appropriate programs, requiring various environment variables to be set. Once the computer is set up, the general procedure is:

  1. pick a working area for your processing (not in the CODAS installation directory–that is reserved for UH code)

  2. run adcptree.py with the appropriate options

  3. locate your data files, determine the appropriate switches for quick_adcp.py.

  4. write a control file for quick_adcp.py with the information to process your dataset. (eg. control file is q_py.cnt)

  5. run quick_adcp.py. Arguments can be typed on the command line or stored in a control file (accessed with --cntfile q_py.cnt). Commandline options override control file options.

  6. more steps follow to complete the processing

Note

Always run quick_adcp.py from the ADCP processing directory (the directory created by “adcptree.py”)

Command-line help for quick_adcp.py is shown here.