Processing of ADCP data with quick_adcp.py


Quick_adcp.py is a Python script that runs the usual 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. Although there are various versions of adcptree in existence, the reflect older generations of processing. Quick_adcp.py should be able to deal with any of the following combinations of data acquisition, averaging (or not) and instrument, as long as the processing directory was set up with acptree.py:


Acquisition program instrument
ping type
Averaged??
file type
underway?
DAS2.48 NB150
nb
yes
pingdata
yes






VmDAS Broadband
bb yes LTA or STA
yes


bb
no
ENS or ENX
yes






VmDAS
Ocean Surveyor
bb
yes
LTA or STA
yes


bb
no
ENX
yes


nb
yes
LTA or STA yes


nb
no ENS or ENX
yes


bb+nb
yes, bb only
LTA or STA
yes


bb+nb
no, bb only
ENS or ENX
yes






UHDAS
NB150
nb
no
raw
yes

OS
bb
no
raw
yes


nb
no
raw
yes


bb+nb
no
raw
yes



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. loadping.exe), extracting data (eg. adcpsect.ext) or by
manipulating the databaes (eg. rotate.exe, putnav.exe, dbupdate.exe). Matlab programs are used to maniplate files on the disk so C programs can use them, or in the case of VmDAS or UHDAS data, Matlab is used to read the original data files and created translated versions (on the disk) that C programs can read.


Manually:

All steps can be run from the shell command line (or from the matlab command line). Adcptree.py creates a processing directory tree and copies templates or documented, editable files to the various subdirectories, setting up the tree for processing. To process a dataset manually, one would work their way through the directories, repeating (in the proper order) the following steps:

  1. edit the appropriate file
  2. run the related program

C programs are almost always called with a control file to specify parameters that the user may wish to configure or change. These include predictable values, such as the database name or yearbase, and configurable values, such as a reference layer depth range. C programs are called on a command line from the relevant working directory as (for example)
acpsect adcpsect.cnt

The original ".cnt" files are self-documented, showing the various options that can be chosen. The user is advised to leave these fiels as is and name their copies something else, such as "adcpsect.tmp", and then run it as "adcpsect adcpsect.tmp"


Matlab programs are copied by adcptree.py to the appropriate directory and exist as a script (or a stub that calls a script). The matlab program can be edited and then run in the appropriate directory.

Scripted:

Quick_adcp.py is designed to work through the standard processing steps, writing control files and running the C programs, or writing matlab files to disk, and running them. Control files for C programs are named with the same base name (such as "rotate") with a ".tmp" suffix. Matlab files have the same base name as the original matlab file but have "_tmp" in the name (eg. "ashrot.m" becomes "ashrot_tmp.m" when written by quick_adcp.py).


Once your paths are set up (matlab, executable, and Python), you
  1. pick a working area (not in the PROGRAMS 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. run quick_adcp.py

Data to practice with:

Recommended strategy:
(1) Become familiar with CODAS processing by using the NB150 pingdata (newer data)
(2) If you have questions or problems, refer to the NB150 pingdata demo manual (older data)
(3) If you feel comfortable with pingdata and want to process LTA data, try the example below
(4) Single-ping (ENX, ENX) processing is in its infancy.  Often it is not necessary.  More will be added about single-ping processing as time permits.  In the interim, feel free to email me with any questions.


Available quick_adcp.py examples:

NB150 pingdata
(well-documented, old data)
NB150 pingdata
newer data
Ocean Surveyor
LTA (5-min)

Ocean Surveyor
ENX (single-ping)
ENS (single-ping)
documentation
manual -- highly detailed
quick_adcp.py howto



quick_adcp.py
commands

commands
commands
commands (ENX)
commands (ENS)

data files


These are
binary files.
To download,
you may need to
hold the "shift"
key when you
click on the link.
pingdata.000
pingdata.001
pingdata.000
pingdata.001
KMADCP092_000000.LTA
KMADCP093_000000.LTA
KMADCP094_000000.LTA
KMADCP095_000000.LTA
KMADCP096_000000.LTA
KMADCP097_000000.LTA
KMADCP098_000000.LTA
KMADCP099_000000.LTA

KMADCP092_000000.ENX
KMADCP093_000000.ENX
KMADCP093_000001.ENX
KMADCP093_000002.ENX
KMADCP093_000003.ENX
KMADCP094_000000.ENX
KMADCP095_000000.ENX
KMADCP095_000001.ENX
KMADCP096_000000.ENX
KMADCP097_000000.ENX
KMADCP098_000000.ENX
KMADCP099_000000.ENX
KMADCP099_000001.ENX


example of
processing
directory
text notes
directory
text notes
directory
text notes
directory
text notes (ENX)
directory (ENX)


Documentation:


Windows users, read WIN_setup.txt for more information about setting up paths, and WIN_runningpython.txt for information about running the two python commands under DOS.


adcptree.py shows the usage when typed on the command line.
quick_adcp.py has alot of documentation acessible by commandline switches. Typing
"python quick_adcp.py" will list those options. These are also provided as links below:


adcptree.py:

quick_adcp.py:



Read the documentation, then email me if you have questions)