Read a "ctd" File in ODV Format
Usage
read.ctd.odv(
file,
columns = NULL,
station = NULL,
missingValue,
deploymentType,
encoding = "latin1",
monitor = FALSE,
debug = getOption("oceDebug"),
processingLog,
...
)
Arguments
- file
either a connection or a character value naming a file. For
read.ctd.sbe()
andread.ctd.woce()
, this may be a wildcard (e.g."*.cnv"
or"*.csv"
) in which case the return value is a vector containing CTD objects created by reading the files fromlist.files()
withpattern
set to the specified wildcard pattern.- columns
an optional list that can be used to convert unrecognized data names to resultant variable names. This is used only by
read.ctd.sbe()
andread.ctd.odf()
. For example, if a data file named salinity as"SAL"
, then usingd <- read.ctd(f, columns=list( salinity=list(name="SAL", unit=list(unit=expression(), scale="PSS-78"))))
would assign the
"SAL"
column to thesalinity
entry in the data slot of the CTD object returned by theread.*
function.- station
optional character string containing an identifying name or number for the station. This can be useful if the routine cannot determine the name automatically, or if another name is preferred.
- missingValue
optional missing-value flag; data matching this value will be set to
NA
upon reading. If this is provided, then it overrules any missing-value flag found in the data. For Seabird (.cnv
) files, there is usually no need to setmissingValue
, because it can be inferred from the header (typically as -9.990e-29). SetmissingValue=NULL
to turn off missing-value detection, even in.cnv
files that contain missing-value codes in their headers. IfmissingValue
is not specified, then an attempt is made to infer such a value from the data, by testing whether salinity and/or temperature has a minimum that is under -8 in value; this should catch common values in files, without false positives. A warning will be issued in this case, and a note inserted in the processing log of the return value.- deploymentType
character string indicating the type of deployment. Use
"unknown"
if this is not known,"profile"
for a profile (in which the data were acquired during a downcast, while the device was lowered into the water column, perhaps also including an upcast;"moored"
if the device is installed on a fixed mooring,"thermosalinograph"
(or"tsg"
) if the device is mounted on a moving vessel, to record near-surface properties, or"towyo"
if the device is repeatedly lowered and raised.- encoding
a character value that indicates the encoding to be used for this data file, if it is textual. The default value for most functions is
"latin1"
, which seems to be suitable for files containing text written in English and French.- monitor
boolean, set to
TRUE
to provide an indication of progress. This is useful iffilename
is a wildcard.- 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, settingdebug=0
turns off the printing, while higher values suggest that more information be printed.- processingLog
if provided, the action item to be stored in the log. This is typically only provided for internal calls; the default that it provides is better for normal calls by a user.
- ...
additional arguments, passed to called routines.
Value
This function returns a ctd object.
Details
read.ctd.odv()
attempts to read files stored in ODV format,
used by some European data providers. This works only crudely, as of
2020-05-17. In particular, the translation from ODV parameter names to oce
names is very limited. For example, only one of the dozens of possibilities
for variants of phosphate is handled at the moment, and that is because
this was the variant supplied in a test file sent to the author on
2020-05-16. It is unlikely that full support of ODV files will
become available in read.ctd.odv()
, given the lack of a comprehensive source
listing ODV variable names and their meanings, and low user
interest.
References
https://www.bodc.ac.uk/resources/delivery_formats/odv_format/
describes theODV
format.https://vocab.nerc.ac.uk/collection/P07/current/
may be worth consulting for variable names.
See also
Other things related to ctd data:
CTD_BCD2014666_008_1_DN.ODF.gz
,
[[,ctd-method
,
[[<-,ctd-method
,
argo2ctd()
,
as.ctd()
,
cnvName2oceName()
,
ctd
,
ctd-class
,
ctd.cnv.gz
,
ctdDecimate()
,
ctdFindProfiles()
,
ctdFindProfilesRBR()
,
ctdRaw
,
ctdRepair()
,
ctdTrim()
,
ctd_aml_type1.csv.gz
,
ctd_aml_type3.csv.gz
,
d200321-001.ctd.gz
,
d201211_0011.cnv.gz
,
handleFlags,ctd-method
,
initialize,ctd-method
,
initializeFlagScheme,ctd-method
,
oceNames2whpNames()
,
oceUnits2whpUnits()
,
plot,ctd-method
,
plotProfile()
,
plotScan()
,
plotTS()
,
read.ctd()
,
read.ctd.aml()
,
read.ctd.itp()
,
read.ctd.odf()
,
read.ctd.saiv()
,
read.ctd.sbe()
,
read.ctd.ssda()
,
read.ctd.woce()
,
read.ctd.woce.other()
,
setFlags,ctd-method
,
subset,ctd-method
,
summary,ctd-method
,
woceNames2oceNames()
,
woceUnit2oceUnit()
,
write.ctd()