This function gets an index of available Argo float profiles, typically
for later use as the first argument to
getProfiles(). The work is done
either by downloading information from a data repository or by reusing an existing
index (packaged within an
.rda file) that is controlled by the
age argument behind the scenes.
1 2 3 4 5 6 7 8 9
character value that indicates the file name on the server, as in the first column of the table given in “Details”, or (for some file types) as in the nickname given in the middle column. Note that the downloaded file name will be based on the full file name given as this argument, and that nicknames are expanded to the full filenames before saving.
character value, or vector of character values, indicating
the name of servers that supply argo data. If more than
one value is given, then these are tried sequentially until one
is found to supply the index file named in the
character value indicating the directory in which to store
downloaded files. The default value is to compute this using
numeric value indicating how old a downloaded file
must be (in days), for it to be considered out-of-date. The
logical value indicating whether to silence some progress indicators. The default is to show such indicators.
logical value indicating whether to retain the
raw index file as downloaded from the server. This is
integer value indicating level of debugging. If this
is less than 1, no debugging is done. Otherwise, some functions
will print debugging information. If a function call fails, the
first step should be to rerun the function with
The first step is to construct a URL for downloading, based on the
file arguments. That URL will be a string ending in
.txt and from this the name of a local file is constructed by changing the
.rda and prepending the file directory specified by
destdir. If an
.rda file of that name already exists, and is less
age days old, then no downloading takes place. This caching
procedure is a way to save time, because the download can take from a
minute to an hour, depending on the bandwidth of the connection to the
.rda file, which is named in the return value of this
function, holds a list named
index that holds following elements:
ftpRoot, the FTP root stored in the header of the source
(see next paragraph).
server, the URL at which the index was found, and from
getProfiles() can construct URLs from which to
download the NetCDF files for individual float profiles.
filename, the argument provided here.
header, the preliminary lines in the source file that start
data, a data frame containing the items in the source file.
The names of these items are determined automatically from
Some expertise is required in deciding on the value for the
file argument to
getIndex(). As of June 2020, the
contain multiple index files, as listed in the left-hand column of the
following table. The middle column lists nicknames
for some of the files. These can be provided as the
as alternatives to the full names.
The right-hand column describes the file contents.
Note that the servers also provide files with names similar to those
given in the table, but ending in
.txt. These are uncompressed
equivalents of the
.gz files that offer no advantage and take
longer to download, so
getIndex() is not designed to work with them.
|| ||Argo data|
|| ||Trajectory files|
|| ||Biogeochemical Argo data (without S or T)|
|| ||Bio-trajectory files|
|| || Synthetic data, successor to
Note: as of Dec 01,2020 the user will no longer have the option to use
"argo" as a filename argument. Instead,
The next step after using
getIndex() is usually to
getProfiles(), which downloads or checks for local
copies of the per-profile data files that are listed in an
index, and this is typically followed by a call to
readProfiles(), which reads the local files, yielding
an object that can be plotted or analyzed in other ways.
For more on this function, see section 2 of Kelley et al. (2021).
An object of class
argoFloats with type=
is suitable as the first argument of
Kelley, D. E., Harbin, J., & Richards, C. (2021). argoFloats: An R package for analyzing Argo data. Frontiers in Marine Science, (8), 636922. doi: 10.3389/fmars.2021.635922
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.