(All the data creates a database)
There is no such thing as “simply appending” to a CODAS database. Therefore, the next step in automation is to delete the database (or start a new processing directory) and automate the processing of one whole batch of files. Start by
- /bin/rm adcpdb/*blk load/*LTA cal/rotate/rotate.log - or -
- make a new processing directory with adcptree.py (you’ll want to save edit/a*.asc files somewhere as they can be reused in the next iteration)
You did the first run-through and found out what the phase and amplitude should be. (NOTE: since the Ashtech has been replaced, a new value is to be expected. But we found -2.0 from before, so we’ll use that in this example.)
Now, combining (first pass + calibrating) above becomes:
quick_adpc.py –yearbase 2004 –dbname a0407 –use_refsm –rotate_angle -2.0 –datadir /home/data/mv0407/adcp –datafile_glob “*.LTA” –instname os75 –instclass os –datatype lta –auto
(and run editing as above). (If you saved the ascii editing files (edit/a*.asc) to another directory, you can copy them into the current processing edit/ subdirectory and apply them)
(with previously-determined phase and amplitude corrections, using default editing parameters) (All the data creates a database)
- /bin/rm adcpdb/*blk - or -
- make a new processing directory with adcptree.py
Now, combining (first pass + calibrating + editing) becomes:
quick_adcp.py --cntfile q_py.cnt.cnt
### where the control file "q_py.cnt" is
### Anything after a "#" is a comment
--yearbase 2004 ### current year
--dbname a0407 ### prefix to adcpdb/\*dir.blk
--use_refsm ### reference layer calculation
--rotate_angle -2.0 ### rotate by -2.0 (for this example)
# --rotate_amplitude 1.0 ### if you needed an amplitude correction
### (you should ne need one for OS)
--datadir /home/data/mv0407/adcp ### look for data in this directory
--datafile_glob \*.LTA ### look for LTA files
--instname os75 ### so matlab files will have good depths
--instclass os ### necessary
--datatype lta ### necessary
--find_pflags ### find editing flags,
### automatically apply when done
--auto ### don't ask. just do it
######## end of cnt file #####
Basically, there is no incremental LTA processing. The recommended procedure is to delete the processing directory and start again with adcptree.py. All is not lost, however, if you do the following (example for cruise id mv0407)
start with a directory made for the purpose, eg at_sea
- keep a readme, scripts, and other information in this directory, eg
o quick_adcp.py control file o script to run adcptree.py o copy of a*.asc from the editing directory from previous run
Now, for each processing update:
- copy mv0407/edit/a*.asc to the at_sea directory
- delete the mv0407 (adcp processing) directory
- run adcptree.py again
- copy the quick_adcp.py control file in to the new mv0407
- run quick_adcp.py from mv0407
- copy a*.asc into the edit directory
- apply editing; add more editing