getdata: Download data from an ERDDAP server

Description Usage Arguments Details Value

View source: R/getdata.R

Description

Download data using eserver name

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
getdata(
  id,
  pars = NULL,
  lat = c(7, 13),
  lon = c(72, 78),
  date = NULL,
  altitude = 10,
  alt.name = "altitude",
  eserver = "http://apdrc.soest.hawaii.edu/erddap",
  datadir = "data"
)

Arguments

id

The id of the data. Like hawaii_soest_26fe_f2c9_ed3b. In quotes.

pars

Name of the parameter. Like sst, e.g. In quotes.

lat

Min-max latitude

lon

Min-max longitude

date

To specify a date range, pass this in like c("2020-01-01", "2020-02-01"). Leave off to download the whole data range.

altitude

Optional. Some data types need this. Ignore if not. Look on the data page. time, latitude and longitude are always there. If altitude is also there, then put that in.

alt.name

If altitude is present, what is it's name.

eserver

The url to the erddap server

datadir

The folder where to save the data.

Details

Go to the server to see what the pars names are and the format. The names for things are unique and can't be predicted. e.g. http://apdrc.soest.hawaii.edu/erddap/griddap/hawaii_soest_26fe_f2c9_ed3b.html The 2 main servers I use are https://coastwatch.pfeg.noaa.gov/erddap and http://apdrc.soest.hawaii.edu/erddap Search from there to find the data you want.

Common ids on apdrc.soest.hawaii.edu server

Value

The function saves a csv file and returns the data list invisibly.


UW-Upwelling-Project/imageryML documentation built on Dec. 18, 2021, 6:11 p.m.