getProfileFromUrl: Get Data for an Argo Float Profile

View source: R/get.R

getProfileFromUrlR Documentation

Get Data for an Argo Float Profile

Description

Get Data for an Argo Float Profile

Usage

getProfileFromUrl(
  url = NULL,
  destdir = argoDefaultDestdir(),
  destfile = NULL,
  age = argoDefaultProfileAge(),
  retries = 3,
  quiet = FALSE,
  debug = 0
)

Arguments

url

character value giving the URL for a NetCDF file containing an particular profile of a particular Argo float.

destdir

character value indicating the directory in which to store downloaded files. The default value is to compute this using argoDefaultDestdir(), which returns ⁠~/data/argo⁠ by default, although it also provides ways to set other values using options(). Set destdir=NULL if destfile is a filename with full path information. File clutter is reduced by creating a top-level directory called data, with subdirectories for various file types; see “Examples”.

destfile

optional character value that specifies the name to be used for the downloaded file. If this is not specified, then a name is determined from the value of url.

age

a numerical value indicating a time interval, in days. If the file to be downloaded from the server already exists locally, and was created is less than age days in the past, it will not be downloaded. The default, argoDefaultProfileAge(), is one year. Setting age=0 will force a download.

retries

integer telling how many times to retry a download, if the first attempt fails.

quiet

logical value; use FALSE to show more verbose information when downloading files. (Even if quiet is TRUE, problems will still be reported.)

debug

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 debug=1, to see if the output suggests a problem in the call.

Value

A character value naming the local location of the downloaded file, or NA if the file could not be downloaded.

Author(s)

Dan Kelley


argoFloats documentation built on Oct. 18, 2023, 1:06 a.m.