download_oc: Download ocean colour files

View source: R/satfile_funcs.R

download_ocR Documentation

Download ocean colour files

Description

Download file lists from functions get_imglist_multi() and get_imglist_l1()

Usage

download_oc(filenames, urls)

Arguments

filenames

Filename to download

urls

URLs of files corresponding to filenames

Details

Uses wget (works on Mac, Linux, or Cygwin from Windows), and you need to have the OBPG .netrc credentials, i.e. you need to create an Earthdata account, and then type the following on the command line, replacing USERNAME and PASSWD with your own username and password:

echo "machine urs.earthdata.nasa.gov login USERNAME password PASSWD" > ~/.netrc ; > ~/.urs_cookies

chmod 0600 ~/.netrc

See "Download Methods" here for more details: https://oceancolor.gsfc.nasa.gov/data/download_methods/

Value

Data.frame with metadata and URLs of files to download.

Examples

filename = "A2003001162000.L2_LAC_OC.nc"
url = "https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2003001162000.L2_LAC_OC.nc"
download_oc(filename, url)

BIO-RSG/oceancolouR documentation built on April 30, 2024, 7:54 a.m.