7.4. Profile Flags in CODAS¶
“Profile flags” indicate the editing status of a given bin or profile. They are bits associated with different kinds of flagging:
binary |
decimal |
range |
Percent Good |
bin |
000 |
0 |
|||
001 |
1 |
bad |
||
010 |
2 |
bad |
||
011 |
3 |
bad |
bad |
|
100 |
4 |
bad |
||
101 |
5 |
bad |
bad |
|
110 |
6 |
bad |
bad |
|
111 |
7 |
bad |
bad |
bad |
An explanation of the application of these flags to the codas database is given here.
Snippets of the three types of ascii files generated in editing are shown below. The convention is:
Any file in
edit
ending with*badbin.asc
looks like this:
# --- date ------ x x num bin bin bin bin bin
2001/09/02 22:19:14 0 0 5 5 6 7 8 9
2001/09/02 22:24:14 0 1 5 5 6 7 8 9
2001/09/02 22:29:15 0 2 5 5 6 7 8 9
Where
the first two columns are the ensemble time (end of ensemble)
the first two numbers that follow are unused
the third number is the count of badbins to read
the rest are bin numbers (starting with 1) to flag as bad
It is applied from the edit
directory to the database (eg. aship
)
as follows:
badbin ../adcpdb/aship badbin.asc
badbin ../adcpdb/aship abadbin.asc
badbin ../adcpdb/aship poly_badbin.asc
badbin ../adcpdb/aship rect_badbin.asc
Any file in
edit
ending with*badprf.asc
looks like this:
-1 x x --- date ------
-1 0 4 2001/09/02 22:39:13
-1 0 5 2001/09/02 22:44:14
Where
the first number is -1
the next two numbers that follow are unused
the last two colums are the ensemble time (end of ensemble)
It is applied from the edit
directory to the database (eg. aship
)
as follows:
dbupdate ../adcpdb/aship badprf.asc
dbupdate ../adcpdb/aship abadprf.asc
dbupdate ../adcpdb/aship hspan_badprf.asc
Any file in
edit
ending with*bottom.asc
looks like this:
x x x --- date ------ A 32767 bin x
0 0 0 2001/09/02 22:19:14 A 32767 58 473
0 0 1 2001/09/02 22:24:14 A 32767 21 177
0 0 2 2001/09/02 22:29:15 A 32767 45 369
0 0 3 2001/09/02 22:34:14 A 32767 36 297
0 0 4 2001/09/02 22:39:13 A 32767 23 193
0 1 0 2001/09/02 22:52:57 A 32767 10 89
0 1 1 2001/09/02 22:57:56 A 32767 9 81
0 1 2 2001/09/02 23:02:56 A 32767 8 73
0 1 3 2001/09/02 23:07:56 A 32767 7 65
Where
the three columns are unused
the next two colums are the ensemble time (end of ensemble)
then there is an ‘A’, follwed by 32767
the second-to-last column is the “max amp bin” (the largest amplitude bump, i.e. where the bottom is). Side-lobe interference is dealt with in a later step
the last column is unused
It is applied from the edit
directory to the database (eg. aship
)
as follows – this requires two steps, one to lock in the “max amp bin”
and one to deal with side-lobe interference:
dbupdate ../adcpdb/aship bottom.asc
set_lgb ../adcpdb/aship
(4) The last editing step is setflags
, which applies a
Percent Good criterion to the database and set a variable as “-1”
if the entire profile is bad.
It is applied from the edit
directory to the database (eg. aship
)
as follows
setflags setflags.tmp
See additional documentation about the editing steps in
1993 pingdata demo (refreshed for Python)
how to undo editing
More details about the dpmask and pflags are found in the links below: