This is a provisional function, written to handle some particular files available to the author.
Usage
read.glider.netcdf(
file,
saveGlobalAttributes = TRUE,
rename = TRUE,
debug = getOption("gliderDebug", default = 0)
)Arguments
- file
character value holding the name of a netcdf file that holds glider data.
- saveGlobalAttributes
logical value indicating whether to read the entirety of the global attributes stored within the file into the
metadataslot in a list namedglobalAttributes.- rename
an indication of how (or if) to rename variables. This is needed for most practical work in the oce package, which expects standardized names, such as
"temperature", as opposed to the names stored in glider files. There are three choices forrename. (a) It can be logical, with TRUE (the default) meaning to use names as defined insystem.file("extdata/dictionaries/seaexplorerDict.csv",package="oceglider")or FALSE, meaning not to rename variables. (b) It can be the name of a CSV file that is in the same format as the file above-named file. (c) It can be a two-column data frame in which column 1 holds variable names in the glider file and column 2 holds the corresponding names to be used in the return value.- debug
an integer specifying whether debugging information is to be printed during processing. If this is not provided, then the value of
getOption("gliderDebug",0)is used. The printing is done by a call togliderDebug. Settingdebug=0turns off this form of debugging, while higher values may yield more information, depending on the function. If onegliderfunction calls another, it passes the value ofdebugbut decreased by 1, which means that the value ofdebugcontrols not just the breadth of debugging, but also the depth.
Value
A glider object, i.e. one inheriting from glider. (This class inherits from oce::oce in the oce package.)
Details
The data are copied directly from the file, except that time
is converted from an integer to a POSIX time, and variables
may be renamed according to the rename parameter. The code
was last tested on 2025-03-01 using the file downloaded
from the URL given in Reference 1.
See also
Other functions to read glider data:
read.glider.netcdf.ioos(),
read.glider.seaexplorer.raw(),
read.glider.slocum.csv(),
read.glider.slocum.netcdf()
Other functions to read netcdf glider data:
read.glider.netcdf.ioos(),
read.glider.slocum.netcdf()