UHDAS has four components at sea: acquisition, processing, monitoring, and access (to data and figures). A longer introduction to these components is here
Some of the tasks UHDAS performs are system services, such as
- apache (web serving)
- samba (export directories as Windows shares)
- NFS (export directories using Network File System protocol)
- cron (allows us to schedule a once-per-day email
All the rest are driven by programs ultimately spawned by the UHDAS program, DAS.py. These come in three categories:
- programs that run for a long time (eg. the duration of serial logging)
- programs that run sporadically, expected to take a few seconds (2-20) each, and should die at the end. These programs run on timers
A typical life cycle of DAS.py would be as follows... (click on images for a larger view)
- reads /home/adcp/config/sensor_cfg.py and /home/adcp/config/procsetup_onship.py and pops up a graphical tool (tutorial)
uses the cruise name typed by the ADCP Operator
creates the directory structure for a new cruise in /home/data
- creates two symbolic links to this new cruise directory
- /home/data/current_cruise
- /home/adcp/cruise (signals the cruise is active)
- starts 2-hour timer for backups:
- rsync /home/data to any specified disks
communicates with ADCP(s) to start pinging
- passively acquires strings from other serial ports
- starts ser_asc and ser_bin processes for acquisition and rbin generation
- makes intermediate versions of serially-logged ascii data:
- rbin (parse ascii files, save as binary)
starts 5-minute timers for averaging (preliminary processing)
one 5-minute timer per ADCP+pingpype
- makes gbin files (align serial data and pings to same UTC time)
- using the same 5-minute timer
- compute and store one 5-minute average ocean velocity
- make 5-minute profile plots; update web page
starts 30-min timers for CODAS processing and figures
one 30-min timer per ADCP+pingtype
- updates CODAS files
- runs postprocessing (editing, etc) steps
- makes contour and vector plots from CODAS database (1hr)
- stores averaged data for science
- wake up ADCPs (quit pinging)
- terminates ser_asc and ser_bin processes (no more logging)
- termintes all timers
- copy archived figures from /home/adcp/www to relevant processing directory
- break symbolic link in /home/adcp (the one in /home/data is persistent)
- run last rsync, kill the rsync timer
additional notes about DAS.py
If the UHDAS graphical tool is killed while logging is active, the serial acquisition processes and the timers continue to run. Restarting the gui will reconnect it to the processes that are already running.
- If a change is made to sensor_cfg.py or procsetup_onship.py,
- you need to start a new cruise segment, since this is a change in metadata and/or logging parameters
- you must kill the gui and restart it, because DAS.py reads the two files when it starts
- if (after a change) the gui refuses to start, you probably typed something wrong. Look in /home/adcp/log for recent *.warn files and try to find the typo.