% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/argo.R
\name{argoNames2oceNames}
\alias{argoNames2oceNames}
\title{Convert Argo Data Name to Oce Name}
\usage{
argoNames2oceNames(names, ignore.case = TRUE)
}
\arguments{
\item{names}{vector of character strings containing names in the Argo convention.}

\item{ignore.case}{a logical value passed to \code{\link[=gsub]{gsub()}}, indicating whether to
ignore the case of input strings. The default is set to \code{TRUE} because some data
files use lower-case names, despite the fact that the Argo documentation specifies
upper-case.}
}
\value{
A character vector of the same length as \code{names}, but with
replacements having been made for all known quantities.
}
\description{
This function is used internally by \code{\link[=read.argo]{read.argo()}} to convert Argo-convention
data names to oce-convention names. Users should not call this directly, since
its return value may be changed at any moment (e.g. to include units as well
as names).
}
\details{
Initially, Feb 2016, the inference of names was initially done
by an inspection of some data files, based on reference 1. Later, in June
2023, broader inspection of more files and documents yielded about ten
additions, and a single correction: \code{VRSpH} was renamed
\code{phSensorVoltageDifference}, to match related names that had been added.

It should be noted that the data files examined contain some names that are not
documented in reference 1, and others that are listed only in its changelog,
with no actual definitions being given. For example, the files had six distinct
variable names that seem to relate to phase in the oxygen sensor, but
these are not translated by the present function because these
variable names are not defined in reference 1, or not defined uniquely
in reference 2.

The names are converted with
\code{\link[=gsub]{gsub()}}, using the \code{ignore.case} argument of the present
function.
The procedure
is to first handle the items listed in the following table, with string
searches anchored to the start of the string. After that,
the qualifiers
\verb{_ADJUSTED}, \verb{_ERROR} and \verb{_QC},
are translated to \code{Adjusted}, \code{Error}, and \code{QC}, respectively.

An incomplete list of name translations is as follows, where \code{~}
represents digit sequences in some instances and letters
in others.  Note that until June 2023, \code{pHSensorVoltageDifference}
was called \code{VRSpH}.

\tabular{ll}{
\strong{Argo name} \tab \strong{oce name}\cr
\code{BBP} \tab \code{bbp}\cr
\code{BETA_BACKSCATTERING} \tab \code{betaBackscattering}\cr
\code{BPHASE_OXY} \tab \code{bphaseOxygen}\cr
\code{C~PHASE_DOXY} \tab \code{C~phaseOxygen}\cr
\code{CDOM} \tab \code{CDOM}\cr
\code{CNDC} \tab \code{conductivity}\cr
\code{CHLA} \tab \code{chlorophyllA}\cr
\code{CP} \tab \code{beamAttenuation}\cr
\code{CYCLE_NUMBER} \tab \code{cycleNumber} (both this and \code{cycle} are handled by the [[ operator)\cr
\code{DATA_CENTRE} \tab \code{dataCentre}\cr
\code{DATA_MODE} \tab \code{dataMode}\cr
\code{DATA_STATE_INDICATOR} \tab \code{dataStateIndicator}\cr
\code{DC_REFERENCE} \tab \code{DCReference}\cr
\code{DIRECTION} \tab \code{direction}\cr
\code{DOWN_IRRADIANCE} \tab \code{downwellingIrradiance}\cr
\code{DOWNWELLING_PAR} \tab \code{downwellingPAR}\cr
\code{FIRMWARE_VERSION} \tab \code{firmwareVersion}\cr
\code{FIT_ERROR_NITRATE} \tab \code{fitErrorNitrate}\cr
\code{FLUORESCENCE_CDOM} \tab \code{fluorescenceCDOM}\cr
\code{FLUORESCENCE_CHLA} \tab \code{fluorescenceChlorophyllA}\cr
\code{IB_PH} \tab \code{pHBaseCurrent}\cr
\code{IK_PH} \tab \code{pHCounterCurrent}\cr
\code{INST_REFERENCE} \tab \code{instReference}\cr
\code{JULD} \tab \code{juld} (and used to compute \code{time})\cr
\code{JULD_QC_LOCATION} \tab \code{juldQCLocation}\cr
\code{LATITUDE} \tab \code{latitude}\cr
\code{LONGITUDE} \tab \code{longitude}\cr
\code{MOLAR_DOXY} \tab \code{oxygenUncompensated}\cr
\code{MTIME} \tab \code{mtime}\cr
\code{NB_SAMPLE_CTD} \tab \code{nbSampleCtd}\cr
\code{PH_IN_SITU_FREE} \tab \code{pHFree}\cr
\code{PH_IN_SITU_TOTAL} \tab \code{pH}\cr
\code{PI_NAME} \tab \code{PIName}\cr
\code{PLATFORM_NUMBER} \tab \code{id}\cr
\code{POSITION_ACCURACY} \tab \code{positionAccuracy}\cr
\code{POSITIONING_SYSTEM} \tab \code{positioningSystem}\cr
\code{PROFILE} \tab \code{profile}\cr
\code{PROJECT_NAME} \tab \code{projectName}\cr
\code{RAW_DOWNWELLING_IRRADIANCE} \tab \code{rawDownwellingIrradiance}\cr
\code{RAW_DOWNWELLING_PAR} \tab \code{rawDownwellingPAR}\cr
\code{RAW_UPWELLING_RADIANCE} \tab \code{rawUpwellingRadiance}\cr
\code{STATION_PARAMETERS} \tab \code{stationParameters}\cr
\code{TEMP} \tab \code{temperature}\cr
\code{TEMP_CPU_CHLA} \tab \code{temperatureCPUChlorophyllA}\cr
\code{TEMP_DOXY} \tab \code{temperatureOxygen}\cr
\code{TEMP_NITRATE} \tab \code{temperatureNitrate}\cr
\code{TEMP_PH} \tab \code{temperaturePH}\cr
\code{TEMP_SPECTROPHOTOMETER_NITRATE} \tab \code{temperatureSpectrophotometerNitrate}\cr
\code{TILT} \tab \code{tilt}\cr
\code{TPHASE_DOXY} \tab \code{tphaseOxygen}\cr
\code{TURBIDITY} \tab \code{turbidity}\cr
\code{UP_RADIANCE} \tab \code{upwellingRadiance}\cr
\code{UV_INTENSITY} \tab \code{UVIntensity}\cr
\code{UV_INTENSITY_DARK_NITRATE} \tab \code{UVIntensityDarkNitrate}\cr
\code{UV_INTENSITY_NITRATE} \tab \code{UVIntensityNitrate}\cr
\code{VRS_PH} \tab \code{pHSensorVoltageDifference}\cr
\code{WMO_INST_TYPE} \tab \code{WMOInstType}\cr
}
}
\references{
\enumerate{
\item Argo User's Manual Version 3.3, Nov 89th, 2019, available at
\verb{https://archimer.ifremer.fr/doc/00187/29825/} online.
\item Argo list of parameters in an excel spreadsheet, available at
\verb{http://www.argodatamgt.org/content/download/27444/187206/file/argo-parameters-list-core-and-b.xlsx}
}
}
\seealso{
Other functions that convert variable names to the oce convention: 
\code{\link{ODFNames2oceNames}()},
\code{\link{bodcNames2oceNames}()},
\code{\link{metNames2oceNames}()},
\code{\link{woceNames2oceNames}()}

Other things related to argo data: 
\code{\link{D4902337_219.nc}},
\code{\link{[[,argo-method}},
\code{\link{[[<-,argo-method}},
\code{\link{argo}},
\code{\link{argo-class}},
\code{\link{argo2ctd}()},
\code{\link{argoGrid}()},
\code{\link{as.argo}()},
\code{\link{handleFlags,argo-method}},
\code{\link{plot,argo-method}},
\code{\link{read.argo}()},
\code{\link{read.argo.copernicus}()},
\code{\link{subset,argo-method}},
\code{\link{summary,argo-method}}
}
\author{
Dan Kelley, with help from Anna Victor
}
\concept{functions that convert variable names to the oce convention}
\concept{things related to argo data}
