Learn R Programming

oce (version 1.7-10)

cnvName2oceName: Infer variable name, units and scale from a Seabird (.cnv) header line

Description

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, debug = getOption("oceDebug"))

Arguments

h

The header line.

columns

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

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.

Author

Dan Kelley

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 ~ in the table; their decoding is done 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 oceRenameData() 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. (To save development time, there is no plan to add all possible data types without a reasonable and specific expression user interest. Oxygen alone has over forty variants.)

KeyResultUnit;scaleNotes
altaltimeterm
altMaltimeterm
accMaccelerationm/s^2
bat~beamAttenuation1/m
C2-C1S/mconductivityDifferenceS/m
C2-C1mS/cmconductivityDifferencemS/cm
C2-C1uS/cmconductivityDifferenceuS/cm
c~mS/cmconductivitymS/cm
cond~mS/cmconductivitymS/cm
c~S/mconductivityS/m
cond~S/mconductivityS/m
c~uS/cmconductivityuS/cm
cond~uS/cmconductivityuS/cm
CStarAt~beamAttenuation1/m
CStarTr~beamTransmissionpercent
density~~densitykg/m^3
depSdepthm
depSMdepthm
depFdepthm
depFMdepthm
dz/dtMdescentRatem/s
f~frequencyHz
f~~frequencyHz
flC~fluorescenceug/l; Chelsea Aqua 3
flCMfluorescenceug/l; Chelsea Mini Chl Con
flCUVA~fluorescenceug/l; Chelsea UV Aquatracka
flEC-AFL~fluorescencemg/m^3; WET Labs ECO-AFL/FLtabflS
fluorescence-; SeatechflScufa~
fluorescence-; Turner SCUFA (RFU)flSP
fluorescence-; SeapointflSPR
fluorescence-; Seapoint, RhodamineflSPuv
fluorescence-; Seapoint, UVflT
fluorescence-; Turner 10-005 flTgpa
geopotentialAnomaly-; J/kglatitude
latitudedegNlongitude
longitudedegEn2satML/L
nitrogenSaturationml/ln2satMg/L
nitrogenSaturationmg/ln2satumol/kg
nitrogenSaturationumol/kgnbin
nbinobsscufa~
backscatterNTU; Turner SCUFAopoxMg/L
oxygenmg/l; Optode, AanderaaopoxML/L
oxygenml/l; Optode, AanderaaopoxMm/L
oxygenumol/l; Optode, AanderaaopoxPS
oxygenpercent; Optode, AanderaaoxsatML/L
oxygenml/l; WeissoxsatMg/L
oxygenmg/l; WeissoxsatMm/Kg
oxygenumol/kg; WeissoxsolML/L
oxygenml/l; Garcia-GordonoxsolMg/L
oxygenmg/l; Garcia-GordonoxsolMm/Kg
oxygenumol/kg; Garcia-Gordonpar~
PAR-; Biospherical/Licorpar/log
PARlog; Satlanticph
pH-potemp~68C
thetaMdegC; IPTS-68potemp~90C
thetaMdegC; ITS-90pr
pressuredbar1prM
pressuredbarpr50M
pressuredbar; SBE50prSM
pressuredbarprDM
pressuredbar; digiquartzprdE
pressurepsi; strain gauge2prDE
pressurepsi; digiquartz2prdM
pressuredbar; strain gaugeprSM
pressuredbar; strain gaugeptempC
pressureTemperaturedegC; ITS-903pumps
pumpStatusrhodflTC~
Rhodamineppb; Turner Cyclopssal~~
salinity-, PSS-784sbox~dV/dT
oxygendov/dt; SBE43sbeox~ML/L
oxygenml/l; SBE43sbeox~Mm/Kg
oxygenumol/kg; SBE43sbox~Mm/Kg
oxygenumol/kg; SBE43sbeox~Mm/L
oxygenumol/l; SBE43sbox~Mm/L
oxygenumol/l; SBE43sbeox~PS
oxygenpercent; SBE43sbox~PS
oxygenpercent; SBE43sbeox~V
oxygenRawV; SBE43sbox~V
oxygenRawV; SBE43scan
scan-seaTurbMtr~
turbidityFTU; SeapointsecS-priS
salinityDifference-, PSS-78sigma-t
sigmaTkg/m^3sigma-theta
sigmaThetakg/m^35sigma-é
sigmaThetakg/m^35spar
spar-specc
conductivityuS/cmsva
specificVolumeAnomaly1e-8 m^3/kg;svCM~
soundSpeedm/s; Chen-MilleroT2~68C
temperatureDifferencedegC; IPTS-68T2~90C
temperatureDifferencedegC; ITS-90t~68
temperaturedegC; IPTS-68t~90
temperaturedegC; ITS-90t~68
temperaturedegC; IPTS-68t~68C
temperaturedegC; IPTS-68t~90C
temperaturedegC; ITS-90t090Cm
temperaturedegC; ITS-90t4990C
temperaturedegC; ITS-90tnc90C
temperaturedegC; ITS-90tsa
thermostericAnomaly1e-8 m^3/kgtv290C
temperaturedegC; ITS-90t4968C
temperaturedegC; IPTS-68tnc68C
temperaturedegC; IPTS-68tv268C
temperaturedegC; IPTS-68t190C
temperaturedegC; ITS-90tnc290C
temperaturedegC; ITS-90tnc268C
temperaturedegC; IPTS-68t3890C~
temperaturedegC; ITS-90t38~90C
temperaturedegC; ITS-90t3868C~
temperaturedegC; IPTS-68t38~38C
temperaturedegC; IPTS-68timeH
timeHhour; elapsedtimeJ
timeJjulian daytimeJV2
timeJV2julian daytimeK
timeKs; since Jan 1, 2000timeM
timeMminute; elapsedtimeN
timeNs; NMEA since Jan 1, 1970timeQ
timeQs; NMEA since Jan 1, 2000timeS
timeSs; elapsedturbflTC~
turbidityNTU; Turner CyclopsturbflTCdiff
turbidityDifferenceNTU; Turner CyclopsturbWETbb~
turbidity1/(m\*sr); WET Labs ECOturbWETbbdiff
turbidityDifference1/(m\*sr); WET Labs ECOturbWETntu~
turbidityNTU; WET Labs ECOturbWETntudiff
turbidityDifferenceNTU; WET Labs ECOupoly~
upoly-user~
user-v~~
voltageVwetBAttn
beamAttenuation1/m; WET Labs AC3wetBTrans
beamTransmissionpercent; WET Labs AC3wetCDOM~
fluorescencemg/m^3; WET Labs CDOMwetCDOMdiff
fluorescenceDifferencemg/m^3; WET Labs CDOMwetChAbs
fluorescence1/m; WET Labs AC3 absorptionwetStar~
fluorescencemg/m^3; WET Labs WETstarwetStardiff
fluorescenceDifferencemg/m^3; WET Labs WETstarxmiss
beamTransmissionpercent; Chelsea/Seatechxmiss~
beamTransmissionpercent; Chelsea/Seatech

Notes:

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

  2. This is an odd 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.

See Also

Other things related to ctd data: CTD_BCD2014666_008_1_DN.ODF.gz, [[,ctd-method, [[<-,ctd-method, as.ctd(), ctd-class, ctd.cnv, ctdDecimate(), ctdFindProfiles(), ctdRaw, ctdRepair(), ctdTrim(), ctd_aml.csv, ctd, d200321-001.ctd, d201211_0011.cnv, handleFlags,ctd-method, initialize,ctd-method, initializeFlagScheme,ctd-method, oceNames2whpNames(), oceUnits2whpUnits(), plot,ctd-method, plotProfile(), plotScan(), plotTS(), read.ctd.aml(), read.ctd.itp(), read.ctd.odf(), read.ctd.odv(), read.ctd.sbe(), read.ctd.ssda(), read.ctd.woce.other(), read.ctd.woce(), read.ctd(), setFlags,ctd-method, subset,ctd-method, summary,ctd-method, woceNames2oceNames(), woceUnit2oceUnit(), write.ctd()

Other functions that interpret variable names and units from headers: ODFNames2oceNames(), oceNames2whpNames(), oceUnits2whpUnits(), unitFromStringRsk(), unitFromString(), woceNames2oceNames(), woceUnit2oceUnit()