Skip to contents

This function is used by read.ctd.sbe() to infer data names and units from the coding used by Teledyne/Seabird (SBE) .cnv files. Lacking access to documentation on the SBE format, the present function is based on inspection of a suite of CNV files available to the oce developers.

Usage

cnvName2oceName(
  h,
  columns = NULL,
  newNameFormat = FALSE,
  debug = getOption("oceDebug")
)

Arguments

h

character value holding the header line.

columns

optional list containing name correspondences, as described for read.ctd.sbe().

newNameFormat

logical value indicating whether the column names in the header are in the traditional format (with an abbreviated name followed by a colon and then more information) or a new format noticed in a file provided with a github issue (https://github.com/dankelley/oce/issues/2328). Until (or unless) SBE provides information on this new format, the present parameter is provisional, as is all code relating to reading new-format files. (The file is produced by the new SBE software called Fathom.)

debug

an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many oce functions. Generally, setting debug=0 turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of debug first, so that a user can often obtain deeper debugging by specifying higher debug values.

Details

A few sample header lines that have been encountered are:

# name 4 = t068: temperature, IPTS-68 [deg C]
# name 3 = t090C: Temperature [ITS-90, deg C]
# name 4 = t190C: Temperature, 2 [ITS-90, deg C]

Examination of several CNV files suggests that it is best to try to infer the name from the characters between the "=" and ":" characters, because the material after the colon seems to vary more between sample files.

The table given below indicates the translation patterns used. These are taken from reference 1. The .cnv convention for multiple sensors is to include optional extra digits in the name, and these are indicated with one # character for each optional digit. (These # characters are converted to the the appropriate regular-expression code, \\d, before pattern-matching with grep().)

It is important to note that this table is by no means complete, since there are a great many SBE names listed in their document (reference 1), plus names not listed there but present in data files supplied by prominent archiving agencies. If an SBE name is not recognized, then the oce name is set to that SBE name. This can cause problems in some other processing steps (e.g. if swRho() or a similar function is called with an oce object as first argument), and so users are well-advised to rename the items as appropriate. The first step in doing this is to pass the object to summary(), to discover the SBE names in question. Then consult the SBE documentation to find an appropriate name for the data, and either manipulate the names in the object data slot directly or use oceRename() to rename the elements. Finally, please publish an 'issue' on the oce Github site https://github.com/dankelley/oce/issues so that the developers can add the data type in question.

The table below has well over 100 entries, but this only scratches the surface; the SBE documents list over 40 variants for oxygen alone. To save development time, there is no plan to add all possible data types without a reasonable and specific expression user interest.

KeyResultUnit;scaleNotes
accMaccelerationm/s^2
altMaltimeterm
altaltimeterm
bat#beamAttenuation1/m
C2-C1mS/cmconductivityDifferencemS/cm
C2-C1S/mconductivityDifferenceS/m
C2-C1uS/cmconductivityDifferenceuS/cm
cond#mS/cmconductivitymS/cm
cond#S/mconductivityS/m
cond#uS/cmconductivityuS/cm
CStarAt#beamAttenuation1/m
CStarTr#beamTransmissionpercent
c#mS/cmconductivitymS/cm
c#S/mconductivityS/m
c#uS/cmconductivityuS/cm
density##densitykg/m^3
depFMdepthm
depFdepthm
depSMdepthm
depSdepthm
dz/dtMdescentRatem/s
flCMfluorescenceug/l; Chelsea Mini Chl Con
flCUVA#fluorescenceug/l; Chelsea UV Aquatracka
flC#fluorescenceug/l; Chelsea Aqua 3
flEC-AFL#fluorescencemg/m^3; WET Labs ECO-AFL/FL
flScufa#fluorescence-; Turner SCUFA (RFU)
flSPRfluorescence-; Seapoint, Rhodamine
flSPuvfluorescence-; Seapoint, UV
flSPfluorescence-; Seapoint
flSfluorescence-; Seatech
flTfluorescence-; Turner 10-005 flT
f#frequencyHz
f##frequencyHz
gpageopotentialAnomaly-; J/kg
latitudelatitudedegN
longitudelongitudedegE
n2satMg/LnitrogenSaturationmg/l
n2satML/LnitrogenSaturationml/l
n2satumol/kgnitrogenSaturationumol/kg
nbinnbin
obsscufa#backscatterNTU; Turner SCUFA
opoxMg/Loxygenmg/l; Optode, Aanderaa
opoxML/Loxygenml/l; Optode, Aanderaa
opoxMm/Loxygenumol/l; Optode, Aanderaa
opoxPSoxygenpercent; Optode, Aanderaa
oxsatMg/Loxygenmg/l; Weiss
oxsatML/Loxygenml/l; Weiss
oxsatMm/Kgoxygenumol/kg; Weiss
oxsolMg/Loxygenmg/l; Garcia-Gordon
oxsolML/Loxygenml/l; Garcia-Gordon
oxsolMm/Kgoxygenumol/kg; Garcia-Gordon
par/logPARlog; Satlantic
par#PAR-; Biospherical/Licor
phpH-
potemp#68CthetaMdegC; IPTS-68
potemp#90CthetaMdegC; ITS-90
pr50Mpressuredbar; SBE50
prDEpressurepsi; digiquartz2
prdEpressurepsi; strain gauge2
prDMpressuredbar; digiquartz
prdMpressuredbar; strain gauge
prMpressuredbar
prSMpressuredbar
prSMpressuredbar; strain gauge
prpressuredbar1
ptempCpressureTemperaturedegC; ITS-903
pumpspumpStatus
rhodflTC#Rhodamineppb; Turner Cyclops
sal##salinity-, PSS-784
sbeox#ML/Loxygenml/l; SBE43
sbeox#Mm/Kgoxygenumol/kg; SBE43
sbeox#Mm/Loxygenumol/l; SBE43
sbeox#PSoxygenpercent; SBE43
sbeox#VoxygenRawV; SBE43
sbox#dV/dToxygendov/dt; SBE43
sbox#ML/Loxygenml/l; SBE43
sbox#Mm/Kgoxygenumol/kg; SBE43
sbox#Mm/Loxygenumol/l; SBE43
sbox#PSoxygenpercent; SBE43
sbox#VoxygenRawV; SBE43
scanscan-
seaTurbMtr#turbidityFTU; Seapoint
secS-priSsalinityDifference-, PSS-78
sigma-ésigmaThetakg/m^35
sigma-tsigmaTkg/m^3
sigma-thetasigmaThetakg/m^35
sparspar-
speccspecificConductanceuS/cm
svaspecificVolumeAnomaly1e-8 m^3/kg;
svCM#soundSpeedm/s; Chen-Millero
t090CmtemperaturedegC; ITS-90
t190CtemperaturedegC; ITS-90
T2#68CtemperatureDifferencedegC; IPTS-68
T2#90CtemperatureDifferencedegC; ITS-90
t3868C#temperaturedegC; IPTS-68
t3890C#temperaturedegC; ITS-90
t38#38CtemperaturedegC; IPTS-68
t38#90CtemperaturedegC; ITS-90
t4968CtemperaturedegC; IPTS-68
t4990CtemperaturedegC; ITS-90
timeHtimeHhour; elapsed
timeJV2timeJV2julian day
timeJtimeJjulian day
timeKtimeKs; since Jan 1, 2000
timeMtimeMminute; elapsed
timeNtimeNs; NMEA since Jan 1, 1970
timeQtimeQs; NMEA since Jan 1, 2000
timeStimeSs; elapsed
tnc268CtemperaturedegC; IPTS-68
tnc290CtemperaturedegC; ITS-90
tnc68CtemperaturedegC; IPTS-68
tnc90CtemperaturedegC; ITS-90
tsathermostericAnomaly1e-8 m^3/kg
turbflTCdiffturbidityDifferenceNTU; Turner Cyclops
turbflTC#turbidityNTU; Turner Cyclops
turbWETbbdiffturbidityDifference1/(m\*sr); WET Labs ECO
turbWETbb#turbidity1/(m\*sr); WET Labs ECO
turbWETntudiffturbidityDifferenceNTU; WET Labs ECO
turbWETntu#turbidityNTU; WET Labs ECO
tv268CtemperaturedegC; IPTS-68
tv290CtemperaturedegC; ITS-90
t#68CtemperaturedegC; IPTS-68
t#68temperaturedegC; IPTS-68
t#90CtemperaturedegC; ITS-90
t#90temperaturedegC; ITS-90
upoly#upoly-
user#user-
v##voltageV
wetBAttnbeamAttenuation1/m; WET Labs AC3
wetBTransbeamTransmissionpercent; WET Labs AC3
wetCDOMdifffluorescenceDifferencemg/m^3; WET Labs CDOM
wetCDOM#fluorescencemg/m^3; WET Labs CDOM
wetChAbsfluorescence1/m; WET Labs AC3 absorption
wetStardifffluorescenceDifferencemg/m^3; WET Labs WETstar
wetStar#fluorescencemg/m^3; WET Labs WETstar
xmissbeamTransmissionpercent; Chelsea/Seatech
xmiss#beamTransmissionpercent; Chelsea/Seatech

Notes:

  1. pr is in a Dalhousie-generated data file but seems not to be in reference 1.

  2. This is a strange unit, and so if sw* functions are called on an object containing this, a conversion will be made before performing the computation. Be on the lookout for errors, since this is a rare situation.

  3. Assume ITS-90 temperature scale, since sample .cnv file headers do not specify it.

  4. Some files have PSU for this. Should we handle that? And are there other S scales to consider?

  5. The 'theta' symbol (here shown accented e) may appear in different ways with different encoding configurations, set up within R or in the operating system.

References

  1. A SBE data processing manual was once at http://www.seabird.com/document/sbe-data-processing-manual, but as of summer 2018, this no longer seems to be provided by SeaBird. A web search will turn up copies of the manual that have been put online by various research groups and data-archiving agencies. As of 2018-07-05, the latest version was named SBEDataProcessing_7.26.4.pdf and had release date 12/08/2017, and this was the reference version used in coding oce.

Author

Dan Kelley