| Aus Argo | ArgoRT Doco Page |
See also informal notes prior to
Nov 06 installation
| Style notes | Specific variables | Profile & ID numbers | Random bits of algorithm |
| Argos downloads | Hex, and decoding it | Reporting | netCDF files |
| lower case | Normal variables |
| UPPER CASE | Global and persistent variables |
| Mixed Case | Fixed values (hard-coded parameters) |
surfpres NOT identical to previous variable called psfc It is measured surface pressure. NOTE: Webb floats have a 5db offset in surface value. This IS now corrected when message is first decoded, so that offset should NOT be considered at any later stage in the processing.
position_accuracy Read from Argos location fixes. Presume will only get the standard characters '0' to '3', but left as char because letter codes are possible. The Argos codes are defined in Argos manual table 2.3.5. The Argo definitions are in Ref table 5. Although the limits don't match, it turns out that the Argos codes 0-3 are best just equated to Argo 0-3.
That is, we end up leaving them untouched!
float, fpp, fp The array of structures containing all profiles for a single float was previously called float, and a single profile structure was called fp. I have kept fp for a single profile structure, but moved towards using fpp for the array of structures, because the word float appears in many places (in descriptive text, labels, and in "ncfloat"). fpp is a much better search target!
float still occurs frequently because of legacy code and it is still the name used in the ArgoRT matfiles.
_calibrate We calibrate S and so call the entire product 'A'=Adjusted. This obliges us to fill the '_ADJUSTED' fields for all profile variables in the netCDF files. I have taken the approach of leaving the matfile '_calibrate' fields empty (for T, Oxy, etc) unless we have calibrated that variable If argoprofile_nc.m, we fill adjusted fields for variable X with X_calibrate if it exists, and otherwise with X_raw. The X_qc field applies to both - we QC the raw data!
A profile number is read as part of the profile message (referred to as profile_number or sometimes pnum), and this is used to create some filenames (especially the netCDF profile files.) This is also the number reported in web pages. There have been glitches in this (probably only when a message has been scrambled.)
Each profile is stored in the float array of structures in matfiles, so each profile is a particular element of such an array. This alternative profile number, usually referred to as np is robust and often needed within the system, but is often different to pnum.
Workfiles are identified by both numbers, which avoids filename clashes and possibility of confusion.
Floats have WMO, Argos, and our deployment numbers. We aim to work exclusively with WMO numbers.
If other IDs are required, a global variable ARGO_ID_CROSSREF is created by getdbase.m (called at start of a normal processing run) and can be address directly or the function idcrossref.m can be used to translate.
The Argos ID is useful at early stages because it is the only way to identify floats in the Argos messages. Note that these may be reused. We cope with duplicate numbers by having idcrossref return the last "live" ID for any duplicates. That is, if duplicate Argos IDs, the returned WMO will be for "live" floats in preference to "dead" ones, and more recent entries in the database over earlier ones.
This is a non-standard implementation. Note that this test as previously coded would, if it progressed to testing the present #2 fix, always conclude that the #1 fix was bad - so earlier results and reactions were wrong.
Recommend checking if this test failed (whether or not the
The Argos downloads are, I assume, kept as the primary backup, from
which reprocessing can be performed.
It would be best, but not essential, to have date/time recorded at the
start of these files so that there was never doubt nor difficulty in
determining just which download it is!
The old system named files by day-of-year - but used doy-9,
because want data from 9 days previous! Reprocessing involved changing
file dates (using 'touch'). There is no robust way to determine the year
of the download file! Now changed to naming by LOCAL year and day of
download.
The Argos transmission is received as ASCII, with the Argo component being
displayed as hexadecimal. I have taken the approach of dumping immediately from
ASCII hex to decimal.
By default this becomes datatype double, which is fine because that can
then be scaled and combined without drama.
Each ASCII hex pair is really an unsigned byte, so uint8 is the natural
datatype, which is used where appropriate.
Where values are not stored on byte boundaries (ie not all groups of bits
being multiples of 8 in length), I reduce to 0s and 1s - it looks like binary
but is now really vectors of uint8.
Could get same result by using a bitmask, but is less clear
I wrote bin2num to convert (these representations of binary) to decimal.
(Matlab routine bin2dec converts ascii binary rep to decimal.)
This approach means less slopping between char and numbers, and takes
no more memory (wouldn't be an issue anyway).
See Reports for details of reports.
Diagnositic and warning messages, and normal status/activity reports,
are all passed to logerr.m
All reports could be just dumped to screen (eg using 'disp'), and
captured in a file by redirection of stdout. That approach would fit
well with standalone use of any functions.
Instead, reports are written to the file ID in global ARGO_RPT_FID. If
this is empty (no file has been opened) then it is written to stdout.
A global structure ARGO_REPORT is also maintained which accumulates
reports until it is reset (at start of processing each profile).
Presently this is only used to count reports of each severity level.
These counts are recorded in the PROC_RECORDS.
The metadata and techinfo files can be appended rather than recreated,
as N_CYCLE is the unlimited dimension. We do this primarily for speed.
In a slight departure from official specifications, the trajectory file
is made appendable, by setting the fixed dimension N_CYCLE larger than
initially required. The trajectory positions are stored in N_MEASUREMENT
dimension variables, which is the unlimited dimension. This is as coded
and the files have passed the GDAC format checks.
All files in export/ are sent to GDACs at each run, and then deleted.
export_argo checks through the processing record for all files
required to be sent, complains if any are missing from netcdf/, and
copies the rest to export/. As each required file is copied, its counter
is incremented. If it has been sent enough times the counter is set to
completed (99). If it is a Profile file, it is then deleted from
netcdf/ or saved to a backup area (depends on value of system
parameter ncsave_dir).
Last updated 24 Nov 2006
Some aspects of the system
Argos download
Hex, and decoding it (and ASCII and Decimal)
dd = hex2dec('ff')
bb = uint8(dd)
cc = bitget(bb,1:8)
ff = bitand(bb,uint8(241))
ee = bin2num(cc)
Reporting
netCDF files