Learn R Programming

rnoaa (version 1.3.8)

argo: Get Argo buoy data

Description

Get Argo buoy data

Usage

argo_search(
  func = NULL,
  of = NULL,
  qwmo = NULL,
  wmo = NULL,
  box = NULL,
  area = NULL,
  around = NULL,
  year = NULL,
  yearmin = NULL,
  yearmax = NULL,
  month = NULL,
  monthmin = NULL,
  monthmax = NULL,
  lr = NULL,
  from = NULL,
  to = NULL,
  dmode = NULL,
  pres_qc = NULL,
  temp_qc = NULL,
  psal_qc = NULL,
  doxy_qc = NULL,
  ticket = NULL,
  limit = 10,
  ...
)

argo_files(wmo = NULL, cyc = NULL, ...)

argo_qwmo(qwmo, limit = 10, ...)

argo_plan(...)

argo_buoy_files(dac, id, ...)

argo(dac, id, cycle, dtype, ...)

Arguments

func

A function, one of n, np, nf, coord, fullcoord, list, ftplist, ticket, version

of

of string

qwmo

qwmo string

wmo

wmo string. mandatory when using argo_files

box

Bounding box, of the form: A) lon, lat for geographical coordinates of the center of a box, or B) min lon, min lat, width, height, for geographical coordinates of the center of the box and its width and height, and the longitude must given between -180W and 180E. Width and height are in degrees of longitude and latitude.

area

(integer/character), One of 0, 1, or 2, but can be in combination. e.g. 0, '0,2' See Details.

around

(character) Selects profiles located around a given center point. List of 3 or 4 numerical values depending on how the center point need to be specified: e.g., '-40,35,100', '6900678,2,200', '6900678,2,200,30'. See Details

year

restrict profiles sampled on a single, or a list of given years. One or a comma separated list of numerical value(s) higher than 0 and lower than 9999.

yearmin, yearmax

restrict profiles sampled before (yearmax) and/or after (yearmin) a given year. A numerical value higher than 0 and lower than 9999. cannot be applied with the other restriction parameter year

month

restrict profiles sampled on a single, or a list of given month(s). One or a comma separated list of numerical value(s) higher or equal to 1 and lower or equal to 12. The month convention is a standard one: January is 1, February is 2, ... December is 12.

monthmin, monthmax

restrict profiles sampled before (monthmax) and/or after (monthmin) a given month. Higher or equal to 1 and lower or equal to 12. The month convention is a standard one: January is 1, February is 2, ... December is 12. These restrictions cannot be applied with the other restriction parameter month. At this time, these parameters are not circular, so that the restriction chain: monthmin=12&monthmax=2 will through an error and not select December to February profiles. To do so, you need to use a coma separated list of months using the month restriction parameter.

lr

restriction allows you to impose the last report (hence lr) date in days. A numerical value in days between 1 (profiles sampled yesterday) and 60 (profiles sampled over the last 60 days). This restriction allows a simple selection of the so-called 'active' floats, ie those which reported a profiles over the last 30 days.

from, to

select profiles sampled before (to) and/or after (from) an explicit date (included). The date is specified following the format: YYYYMMDD, ie the year, month and day numbers.

dmode

(character) imposes a restriction on the Data Mode of profiles. A single value or a coma separated list of characters defining the Data Mode to select. It can be: R for "Real Time", A for "Real Time with Adjusted value" and D for "Delayed Mode". See Details.

pres_qc, temp_qc, psal_qc, doxy_qc

Quality control. Imposes a restriction on the profile data quality flag. For a given variable PARAM which can be: pres (pressure), temp (temperature), psal (salinity) or doxy (oxygen), this restriction selects profiles having one or a coma separated list of data quality flag. See Details.

ticket

(numeric) select profiles with or without a ticket filled in the database. A value: 0 (no ticket) or 1 (has a ticket). See http://www.ifremer.fr/lpo/naarc/m/docs/api/database.html for more details.

limit

(integer) number to return

...

Curl options passed on to HttpClient. Optional

cyc

a cycle number

dac

(character) Data assembly center code

id

(numeric) Buoy identifier

cycle

(numeric) Cycle number

dtype

(character) Data type, one of D for delayed, or R for real-time

File storage

We use rappdirs to store files, see user_cache_dir for how we determine the directory on your machine to save files to, and run rappdirs::user_cache_dir("rnoaa/argo") to get that directory.

API Status

The API weas down as of 2019-11-07, and probably some time before that. The following functions were defunct:

  • argo_search

  • argo_files

  • argo_qwmo

  • argo_plan

These functions are working again as of 2020-06-12.

Details

area parameter definitions:

  • Value 0 selects profiles located in the North-Atlantic ocean north of 20S and not in areas 1 and 2.

  • Value 1 selects profiles located in the Mediterranean Sea.

  • Value 2 selects profiles located in the Nordic Seas.

around parameter definitions:

  • Specification 1: The location is specified with specific geographical coordinates in the following format: around=longitude,latitude,distance - The longitude must given between -180W and 180E and the distance is in kilometers.

  • Specification 2: The location is the one of an existing profile in the database. It is thus specified with a float WMO and a cycle number: around=wmo,cyc,distance This specification can take an optional fourth value specifying the time range in days around the specified profile.

dmode parameter definitions:

  • Data from Argo floats are transmitted from the float, passed through processing and automatic quality control procedures. These profiles have a Data Mode called: real-time data.

  • The data are also issued to the Principle Investigators who apply other procedures to check data quality returned to the global data centre within 6 to 12 months. These profiles have a Data Mode called: delayed mode data.

  • The adjustments applied to delayed-data may also be applied to real-time data, to correct sensor drifts for real-time users. These profiles have a Data Mode called: real time data with adjusted values.

*_qc parameter definitions: This information was extracted from the netcdf profile variable PROFILE_PARAM_QC. Once quality control procedures have been applied, a synthetic flag is assigned for each parameter of each profile under this variable in netcdf files. It indicates the fraction n of profile levels with good data. It can take one of the following values:

  • A or F: All (n=100%) or none (n=0%) of the profile levels contain good data,

  • B,C,D,E: n is in one of the intermediate range: 75-100, 50-75, 25-50 or 0-25

  • empty: No QC was performed.

References

http://www.ifremer.fr/lpo/naarc/m/docs/api/howto.html

Examples

Run this code
if (FALSE) {
# Search Argo metadata
## Number of profiles
argo_search("np", limit = 3)
## Number of floats
argo_search("nf", limit = 3)
## Number of both profiles and floats
argo_search("n", limit = 3)
## return the coordinates in time and space of profiles
argo_search("coord", limit = 3)
## return the coordinates in time and space of profiles, plus other metadata
argo_search("fullcoord", limit = 3)

## List various things, e.g,...
### data assembly centers
argo_search("list", "dac")
### data modes
argo_search("list", "dmode", limit = 5)
### World Meteorological Organization unique float ID's
argo_search("list", "wmo", limit = 5)
### Profile years
argo_search("list", "year", limit = 5)

## coord or fullcoord with specific buoy id
argo_search("coord", wmo = 13857, limit = 3)
argo_search("fullcoord", wmo = 13857, limit = 3)

# Spatial search
### search by bounding box (see param def above)
argo_search("coord", box = c(-40, 35, 3, 2))
### search by area
argo_search("coord", area = 0)
### search by around
argo_search("coord", around = '-40,35,100')

# Time based search
### search by year
argo_search("coord", year = 2006)
### search by yearmin and yearmax
argo_search("coord", yearmin = 2007)
argo_search("coord", yearmin = 2007, yearmax = 2009)
### search by month
argo_search("coord", month = '12,1,2')
### search by from or to
argo_search("coord", from = 20090212)
argo_search("coord", to = 20051129)

# Data mode search
argo_search("coord", dmode = "R")
argo_search("coord", dmode = "R,A")

# Data quality based search
argo_search("coord", pres_qc = "A,B")
argo_search("coord", temp_qc = "A")
argo_search("coord", pres_qc = "A", temp_qc = "A")

# Ticket search
argo_search("coord", ticket = 0)

## Search on partial float id number
argo_qwmo(qwmo = 49)
argo_qwmo(qwmo = 49, limit = 2)

## Get files
argo_files(wmo = 13857)
argo_files(wmo = 13857, cyc = 12)
argo_files(wmo = 13857, cyc = 45)

## Get planned buoys data, accepts no parameters
argo_plan()

# Get files for a buoy, must specify data assembly center (dac)
argo_buoy_files(dac = "bodc", id = 1901309)
argo_buoy_files(dac = "kma", id = 2900308)

# Get data
x <- argo_buoy_files(dac = "meds", id = 4900881)
argo(dac = "meds", id = 4900881, cycle = 127, dtype = "D")
}

Run the code above in your browser using DataLab