CODAS+UHDAS Documentation

Navigation

Previous topic

CODAS processing stages

Next topic

Python compatibility note

This Page

Quick_adcp.py: OverviewΒΆ

Quick_adcp.py is a Python script 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 looking at the data, addressing configuration issues, and editing. If your dataset has problems, you can always run the appropriate steps manually.

Setup of a processing directory should use adcptree.py. 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. See this table for information about which kind of ADCP data are supported.

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 root processing directory (the directory created by “adcptree.py”)

Command-line help for quick_adcp.py is shown here