Input Buffer Formats

Campbell

Campbell Overview.

The Campbell data is delivered via cell phone in a comma-delimited format. Individual instruments (or "buffers") can be detected from the first element on each line, referred to as the breakout id.

Breakout IDBuffer Name
1met
2RDI doppler
3fsi
4sbe37 (a conductivity/temperature recorder
5aanderaa (current meter)
6sbe16 (a conductivity/temperature recorder with transmissivity)
7accelerometer
9diagnostics
12sbe16 (a conductivity/temperature recorder with dissolved oxygen)
19sbe1603do (a conductivity/temperature recorder with dissolved oxygen)
21optics_d: deep water optics
22optics_s: surface optics
23optics_a: above optics
71accelerometer_fft: FFT of Accelerometer (not currently used)
90monitor: another diagnostics buffer

MATLAB discriminates the individual data streams from this file via the m-file read_campbell_buffer.m. For example, an example campbell file for buoy A0103 such as

  1,275,1204,17.64,3.724,6.037,5.367,244.2,7.7,5.367,5.319,244,7.67,1,214.9,26.84,3087,0,4922
  4,1,37.949,12.67,11,34,10,2,1,481
  12,12,3.5387,9.35,2.514,2,99,116,12,0,111
  9,275,1207,13.21,18.69,51.07,1145,37,42,31,.137,70,33,.91,210
  90,-3412,1,1,1,0,0,0,0,0,0,0,0,0,0,0,6.86
  2,194,1,10,2,11,56,0,93,130,159,33536,37632,32000,26368,25088,1792,4864,3328,59903,14592,45311,17408,36863,15104,37375,31488,31743,45824,23807,43008,20991,41728,29695,36096,37887,23296,54271,14080,7680,10240,13312,18688,18432,18688,16128,17920,15104,17664,16128,20480,14336,17664,2048,3328,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
  5,-3412,720,63,181,530
  4,0,4.1012,16.39,12,0,10,2
  71,275,1207,15.5,15,14.64,15.38,15.65,15.58,14.1,15.09,15.17,15.9,16.1,14.02,14.52,15.65,16.43,14.89,14.52,15.62,14.99,14.97,15.21,15.74,15.37,14.62,15.08,15.31,14.73,14.96,16.27,15.88,14.02,14.64,16.1,15.85,13.97,15.56,16.79,14.11,14.62,15.73,14.58,15.85,15.42,14.97,14.97,14.73,15.34,15.21,15.68,14.91,14.71,15.54,15.84,14.24,14.77,16.25,15.41,15.08,14.6,15.46,16.94,14.18,13.89,16.66,16.05,14.38,15.28,15.27,14.31,15.9,15.69,14.91,15.25,15.58,15.32,15.46,14.4,14.64,16.18,16.17,15.46,14.54,14.26,15.34,16.18,15.41,14.44,15.97,15.5,14.18,15.57,15.95,14.88,14.6,15.23,15.52,15.28,14.64,15.76,15.62,14.63,15.54,14.38,14.83,16.64,15.98,14.18,14.39,16.68,16.25,13.91,15.4,16.17,13.62,14.64,17.18,15.68,14.15,14.85,14.67,15.77,16.45,15.34,14.46,15.07,15.42,15.25,15.81
  7,275,1207,.02,.017,.02,.039,.035,.059,.166,.208,.211,.614,1.044,1.845,2.77,1.89,3.63,1.726,2.869,3.182,2.28,2.3,1.902,.823,.842,.346,.25,.223,.095,.102,.065,.028,.034,31.65
        

would be parsed as

  >> options = get_options ( 'A0103' );
  >> [buffers,status] = read_campbell_buffer ( options, 'example.dat' )
  Reading Campbell data...
  Discriminating met data...
  Discriminating doppler data...
  Discriminating sbe37 data...
  Discriminating aanderaa data...
  Discriminating sbe16 data...
  Discriminating accelerometer data...
  Discriminating diagnostics data...
  Discriminating fft data...
  Discriminating monitor data...
  
  buffers = 
  
          met: {[1x1 struct]}
        doppler: {[1x1 struct]}
        sbe37: {[1x1 struct]  [1x1 struct]}
       aanderaa: {[1x1 struct]}
        sbe16: {[1x1 struct]}
    accelerometer: {[1x1 struct]}
      diagnostics: {[1x1 struct]}
          fft: {[1x1 struct]}
        monitor: {[1x1 struct]}
  
  
  status =
  
     1
  
  >> buffers.sbe37{1}
  
  ans = 
  
           time: 2452550.5
       conductivity: 41.012
      temperature: 16.39
    last_sample_num: NaN
    num_bins_in_avg: NaN
  
        

met

Column NumberDescription
1Always "1", as this is the met buffer breakout id.
2 Julian Day of the year. For example, January 1st is 1, February 1st is 32.
3 hour_minute: Hour and minute of the observation in HHMM format. This usually comes in at four minutes past the hour, but is logically interpreted as being on the hour.
4 Air Temperature
5 Min_W/S: Minimum wind speed (diagnostic).
6 Max_W/S: Maximum wind speed. This is the same thing as wind gust.
7 SW/S: scalar averaged wind speed. It is this value that is used as Wind Speed.
8 UW/D: unit vector mean wind direction (in magnetic, not true north). It is this item that is used for the reported Wind Direction.
9 UW/D_StdDev: unit vector mean wind direction standard deviation
10 SW/S: duplicated by column 7. Ignore it.
11 VW/S: vector average wind speed (m/s)
12 UW/D: unit vector mean averaged wind direction (in magnetic, not true north)
13 VW/D: vector averaged wind direction
14 Place Holder (always 1)
15 Compass (diagnostic)
16 Comp_StdDev: compass standard deviation (diagnostic)
17 VIS: visibility
18 VISMin: minimum visibility reading (diagnostic)
19 VISMax: maximum visibility reading (diagnostic)

Doppler

Column NumberDescription
1Always "2", as this is the Doppler buffer breakout id.
2 ensemble #3: (diagnostic)
3 ensemble #2: (diagnostic)
4 month
5 day
6 hour
7 minute. The minute field usually indicates four minutes before the hour, but this is rounded up to the hour.
8 ensemble #1: (diagnostic)
9 amps: (diagnostic)
10 volts: (diagnostic)
11 int_temp: internal temperature (diagnostic)
12, 14, 16, ... 68, 70 east-west component of current velocity in each bin
13, 15, 17 ... 69, 71 north-south component of current velocity in each bin

fsi: Falmouth Scientic Instruments current meter

Column NumberDescription
1Always "3", as this is the fsi buffer breakout id.
2 North-south component of current velocity.
3 East-west component of current velocity.
4 Vertical component of current velocity.
5 Tilt: tilt from vertical in degrees (diagnostic).
6 Hour
7 Minute
8 Month
9 Day
10 Compass (diagnostic)
11 Battery voltage (diagnostic)
12 Water Temperature

sbe37: A Conductivity Temperature Recorder

Column NumberDescription
1Always "4", as this is the sbe37 buffer breakout id.
2 Id number of the sbe37 in question. Usually there are more than one microcats on a buoy. They all come in thru the same buffer, but they have to be differentiated. If there are three microcats, they would be numbered 0, 1, and 2.
3 Conductivity
4 Temperature
5 Hour
6 Minute
7 Month
8 Day
9 Last sample number (not for microcat #0): This is a diagnostic.
10 Number of bins in average (not for microcat #0): Also a diagnostic.

aanderaa: a current meter

Column NumberDescription
1Always "5", as this is the aanderaa buffer breakout id.
2 Hours since the beginning of the year. Yes, you read that correctly.
3 Minutes since the beginning of the day. Yes, you read THAT correctly as well. This information can be conflicting. See the m-file for discriminating campbell aanderaa data for details.
4 Current speed counts in engineering units. Must be calibrated into current speed later on.
5 Current direction counts in engineering units. Must be calibrated into current direction later on.
6 Temperature counts in engineering units. Must be calibrated into temperature later on.

sbe16: a conductivity-temperature recorder

The SBE16 is a conductivity-temperature recorder that can also record either transmissivity or dissolved oxygen. There are, therefore, two breakout IDs associated with the SBE16, 6 for transmissivity, and 12 for dissolved oxygen.

As of the October deployment of A0103 and B0103, the SBE16 buffer format changes. The change will make it somewhat similar to that of the SBE37 in that multiple instruments are possible. This is done via a breakout "sub-id" that now occupies the 2nd column.

Column NumberDescription
1Breakout ID. 6 indicates transmissivity.
2 Instrument ID (or sub-id). This is typically 11 for SBE16s at depth 20 (such as buoy C02) or 12 for SBE16s at depth 50 (such as A01).
3 Conductivity
4 Temperature
5 Transmissivity in engineering units. Must be calibrated to true transmissivity later on.
6 Day
7 ASCII character code for second letter of month. For example, if it is November, the 2nd character is 'o', so the field is '111'.
8 ASCII character code for third letter of month. For example, if it is November, the 2nd character is 'v', so the field is '118'.
9 Hour
10 Minute
11 Bin number (diagnostic)

For the case of dissolved oxygen, we have

Column NumberDescription
1Breakout ID. 12 indicates dissolved oxygen.
2 Instrument ID (or sub-id). In the case of A0103, this is 12.
3 Conductivity
4 Temperature
5 Volts. Will be calibrated to dissolved oxygen
6 Day
7 ASCII character code for second letter of month. For example, if it is November, the 2nd character is 'o', so the field is '111'.
8 ASCII character code for third letter of month. For example, if it is November, the 2nd character is 'v', so the field is '118'.
9 Hour
10 Minute
11 Bin number (diagnostic)

accelerometer

Column NumberDescription
1Always "7", as this is the accelerometer buffer breakout id.
2 Julian day of the year
3 HHMM since the beginning of the day (four characters).
4-34 Voltages of bins 1-31. These voltages are transformed into Significant Wave Height and Dominant Wave Period.

sbe1603: a conductivity-temperature recorder

The SBE 1603 is a conductivity-temperature recorder that can optionally record dissolved oxygen. It has breakout 19.

As with the other SBEs, a breakout sub id is employed, typically 11 or 12.

Column NumberDescription
1Breakout ID. 6 indicates transmissivity.
2 Instrument ID (or sub-id). This is typically 11 for SBE16s at depth 20 (such as buoy C02) or 12 for SBE16s at depth 50 (such as A01).
3 Julian day of year.
4 HHMM
5 Temperature counts
6 Conductivity counts
7 Pseudo Voltage. The hex format for internal storage is aaaabbbbuuuvvv where aaaa is for temperature, bbbb is for conductivity, uuu and vvv are optional voltage counts. But the data logger for some reason cannot send these last two back separately, so they are sent back as uuuv and vv. So this position is uuuv, which is by itself cannot really be interpreted as a single variable. See the SBE 1603 Operating Manual.
8 Pseudo voltage. This position is vv. See above.
9 Last Sample Number

optics: (there's always ONE in the family...)

The optics buffers have a variable format that's completely different from the other campbell buffers. Everything depends on the presence of special tokens in the data stream that serve to specify exactly what lies ahead in the data stream. Much of the following comes directly from a set of Excel documents provided by Andrew Barnard of Bigelow Labs. Different buoys have different configurations of optics instruments in a single package, so there is no one single fixed format.

Each DH4 (the WETLabs-built data logger used to collect, merge, and average the data from the optics sensors) has four serial (RS232) input ports, and one output serial (RS232) port. A special DH4 token (the special tokens are all negative) in the data stream specifies the beginning of a set of inputs from a particular sensor. The last character of the token specifies the port. Port 0 is a special case and everything following it up until the next DH4 token is basically diagnostics data for the DH4 data logger. If the port is not zero, then the next token specifies what sensor follows. The list of acceptable sensors is as follows.

TokenSensor TypeDescription
1AC9A nine wavelength absorption and beem attenuation meter.
4DFLSA digital shuttered chlorophyll fluorometer
5VSF3SData logger to collect data from three 3-angle scattering sensors.
6OCR504A 4 wavelength downwelling irradiance sensor.
7OCR507A 7 wavelength upwelling irradiance sensor (10 degrees field of view)

The data from any OCR sensor is reported in raw digital counts, which have a baseline value of about 231, which is much too large for the Campbell data logger to handle. These values (4 bytes each) are broken into upper and lower two byte portions. Each table below describes what datum follows at what I prescribe as the offset position, relative to the id specifying what the sensor is.

Table 1. AC9

Offset PositionDatum Description
1Average internal temperature of AC9
2Number of samples used.
3Average digital counts of 650nm absorption signal.
4Average digital counts of 676nm absorption signal.
5Average digital counts of 715nm absorption signal.
6Average digital counts of 510nm beam attenuation signal.
7Average digital counts of 532nm beam attenuation signal.
8Average digital counts of 555nm beam attenuation signal.
9Average digital counts of 412nm absorption signal.
10Average digital counts of 440nm absorption signal.
11Average digital counts of 488nm absorption signal.
12Average digital counts of 650nm beam attenuation signal.
13Average digital counts of 676nm beam attenuation signal.
14Average digital counts of 715nm beam attenuation signal.
15Average digital counts of 510nm absorption signal.
16Average digital counts of 532nm absorption signal.
17Average digital counts of 555nm absorption signal.
18Average digital counts of 412nm beam attenuation signal.
19Average digital counts of 440nm beam attenuation signal.
20Average digital counts of 488nm beam attenuation signal.
21Average digital counts of 650nm absorption reference.
22Average digital counts of 676nm absorption reference.
23Average digital counts of 715nm absorption reference.
24Average digital counts of 510nm beam attenuation reference.
25Average digital counts of 532nm beam attenuation reference.
26Average digital counts of 555nm beam attenuation reference.
27Average digital counts of 412nm absorption reference.
28Average digital counts of 440nm absorption reference.
29Average digital counts of 488nm absorption reference.
30Average digital counts of 650nm beam attenuation reference.
31Average digital counts of 676nm beam attenuation reference.
32Average digital counts of 715nm beam attenuation reference.
33Average digital counts of 510nm absorption reference.
34Average digital counts of 532nm absorption reference.
35Average digital counts of 555nm absorption reference.
36Average digital counts of 412nm beam attenuation reference.
37Average digital counts of 440nm beam attenuation reference.
38Average digital counts of 488nm beam attenuation reference.

Table 2. DFLS

Offset PositionDatum Description
1Total number of DFLS samples collected and recorded on the DH4-NC flash disk.
2Number of DFLS samples used in forming the average of chlorophyll fluorescense data.
3Average digital counts of chlorophyll fluorescense data. Should be greater than 0.

Table 3. VSF3S

Offset PositionDatum Description
1Total number of VSF3S samples collected and recorded on the DH4-NC flash disk.
2Number of VSF3S samples used in forming the average of chlorophyll fluorescense data.
3Average digital counts of volume scattering at 440nm, 100 degrees angle. Should be greater than 0.
4Average digital counts of volume scattering at 440nm, 125 degrees angle. Should be greater than 0.
5Average digital counts of volume scattering at 440nm, 150 degrees angle. Should be greater than 0.
6Average digital counts of volume scattering at 440nm at the reference detector. Should be greater than 0.
7Average digital counts of volume scattering at 530nm, 100 degrees angle. Should be greater than 0.
8Average digital counts of volume scattering at 530nm, 125 degrees angle. Should be greater than 0.
9Average digital counts of volume scattering at 530nm, 150 degrees angle. Should be greater than 0.
10Average digital counts of volume scattering at 530nm at the reference detector. Should be greater than 0.
11Average digital counts of volume scattering at 650nm, 100 degrees angle. Should be greater than 0.
12Average digital counts of volume scattering at 650nm, 125 degrees angle. Should be greater than 0.
13Average digital counts of volume scattering at 650nm, 150 degrees angle. Should be greater than 0.
14Average digital counts of volume scattering at 650nm at the reference detector. Should be greater than 0.

Table 4. OCR504

Offset PositionDatum Description
1OCR504 serial number.
2Total number of OCR504 samples collected and recorded on the DH4-NC flash disk.
3Number of OCR504 samples used.
4Average internal temperature of OCR504 in digital counts.
5Average digital counts for 412nm wavelength, lower byte portion.
6Average digital counts for 412nm wavelength, upper byte portion.
7Average digital counts for 443nm wavelength, lower byte portion.
8Average digital counts for 443nm wavelength, upper byte portion.
9Average digital counts for 490nm wavelength, lower byte portion.
10Average digital counts for 490nm wavelength, upper byte portion.
11Average digital counts for 555nm wavelength, lower byte portion.
12Average digital counts for 555nm wavelength, upper byte portion.

Table 5. OCR507

Offset PositionDatum Description
1OCR507 serial number.
2Total number of OCR507 samples collected and recorded on the DH4-NC flash disk.
3Number of OCR507 samples used.
4Average internal temperature of OCR507 in digital counts.
5Average digital counts for 412nm wavelength, lower byte portion.
6Average digital counts for 412nm wavelength, upper byte portion.
7Average digital counts for 443nm wavelength, lower byte portion.
8Average digital counts for 443nm wavelength, upper byte portion.
9Average digital counts for 490nm wavelength, lower byte portion.
10Average digital counts for 490nm wavelength, upper byte portion.
11Average digital counts for 510nm wavelength, lower byte portion.
12Average digital counts for 510nm wavelength, upper byte portion.
13Average digital counts for 555nm wavelength, lower byte portion.
14Average digital counts for 555nm wavelength, upper byte portion.
15Average digital counts for 665nm wavelength, lower byte portion.
16Average digital counts for 665nm wavelength, upper byte portion.
17Average digital counts for 670nm wavelength, lower byte portion.
18Average digital counts for 670nm wavelength, upper byte portion.

accelerometer_fft

Column NumberDescription
1Always "71", as this is the accelerometer fft buffer breakout id.
2 Julian day of the year
3 HHMM since the beginning of the day (four characters).
4-131 FFT voltages, 128 of them for each observation. These are not currently processed into any product.

diagnostics

As the title suggests, all of these quantities are diagnostics and need not be reported to the public. Much of the data is crucial, however, such as the GPS latitude and longitude. This must be monitored hourly to make sure that the buoys have not broken loose, as has happened more than once.

Column NumberDescription
1Always "9", as this is the diagnostics buffer breakout id.
2 Day of year. January 1 would be "1", December 1 would be 335 on a non-leap year.
3 Hour-Minute
4 Battery Voltage
5 Internal Temperature
6 Water Level: needs explanation
7 GPS Hour_Min: Hour and minute of the gps reading.
8 GPS Second: second of the gps reading.
9 latitude degrees: from the GPS reading
10 latitude minute: from the GPS reading
11 latitude decimal minutes: from the GPS reading
12 longitude degrees: from the GPS reading
13 longitude minute: from the GPS reading
14 longitude decimal minutes: from the GPS reading
15 gps day_month : day and month of gps reading

Monitor

None of the quantities reported in this buffer should be made available to the public.

Column NumberDescription
1Always "90", as this is the monitor buffer breakout id.
2 Hours Since the beginning of the year (yes, just like the aanderaa buffer, don't ask).
3 ctd0_number_obs (number of observations received from sbe37sm during past hour; should be 1 unless there are problems)
4 aanderaa_number_obs (aanderaa number of observations, should be 1)
5 doppler_number_obs (doppler number of observations, should be 1)
6 oc_number_obs (ocean color number of observations, should be 1)
7 irad_number_obs (surface irradiance number of obs, should be 1).
8 spare1_number_obs (should be 0)
9 spare2_number_obs (should be 0)
10 spare3_number_obs (should be 0)
11 spare4_number_obs (should be 0)
12 wind_peak (max 1 second wind speed, previously known as wind_gust)