% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bodc.R
\name{bodcNames2oceNames}
\alias{bodcNames2oceNames}
\title{Determine oce Variable Names from an NERC/BODC Names}
\usage{
bodcNames2oceNames(bodcNames, unduplicate = TRUE)
}
\arguments{
\item{bodcNames}{character vector that specifies variable names
that use the NERC/BODC convention.}

\item{unduplicate}{logical value indicating whether to rename
repeated entries, so that e.g. if \verb{"temperature} occurs
twice, the second instance will be changed to \code{"temperature2"}.
Set this to FALSE if you plan are calling  \code{bodcNames2oceNames}
in a renaming function of your own, and call \code{\link[=unduplicateNames]{unduplicateNames()}}
at the end of your function; see Example 2.}
}
\value{
\code{bodcNames2oceNames} returns a vector of the same length as its
first argument, with translations to oce names, as appropriate.
Note that the usual oce convention for handling duplicates is
used, with the first name that maps to temperature being set
to \code{temperature}, the next to \code{temperature2}, etc.
}
\description{
Translate names in the NERC/BODC vocabulary to oce names, primarily so that
\code{\link[=read.netcdf]{read.netcdf()}} can produce more easily interpreted results. Please note
that \code{bodcNames2oceNames()} handles only a tiny subset of the huge number of
names in the NERC/BODC vocabulary (see Reference 1). To see the names that
the function handles currently, type \code{bodcNames2oceNames} in an R session.
}
\examples{

# Example 1: typical usage
bodcNames2oceNames(c("PSALST01", "TEMPP901", "PRESPR01"))

# Example 2: extend to add new variables
BODC2 <- function(originalNames) {
    rval <- bodcNames2oceNames(originalNames, unduplicate = FALSE)
    rval[rval == "bowler hat"] <- "hat"
    rval[rval == "top hat"] <- "hat"
    unduplicateNames(rval)
}
BODC2(c("PSALST01", "TEMPP901", "PRESPR01", "bowler hat", "top hat"))

}
\references{
\enumerate{
\item The NERC Environmental Data Server.
\url{http://vocab.nerc.ac.uk/collection/P01/current/}
}
}
\seealso{
Other functions that convert variable names to the oce convention: 
\code{\link{ODFNames2oceNames}()},
\code{\link{argoNames2oceNames}()},
\code{\link{metNames2oceNames}()},
\code{\link{woceNames2oceNames}()}
}
\author{
Dan Kelley
}
\concept{functions that convert variable names to the oce convention}
