oceandata_url_mapper: Map Oceancolor URL to file path Oceancolor data file URLs...

Description Usage Arguments Value References

View source: R/oceandata_handler.R

Description

Map Oceancolor URL to file path Oceancolor data file URLs need to be mapped to a file system hierarchy that mirrors the one used on the Oceancolor web site. For example, https://oceancolor.gsfc.nasa.gov/cgi/l3/V2016044.L3m_DAY_NPP_PAR_par_9km.nc or https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/V2016044.L3m_DAY_NPP_PAR_par_9km.nc (obtained from the OceanColor visual browser or file search facility) map to https://oceandata.sci.gsfc.nasa.gov/VIIRS/Mapped/Daily/9km/par/2016/V2016044.L3m_DAY_NPP_PAR_par_9km.nc (in the Oceancolor file browse interface). RAADSync will store the local copy of this file as oceandata.sci.gsfc.nasa.gov/VIIRS/Mapped/Daily/9km/par/2016/V2016044.L3m_DAY_NPP_PAR_par_9km.nc The oceandata_url_mapper function maps the URL parameter component ("NPP_PAR_par" in this example) to the corresponding directory name ("par").

Usage

1
oceandata_url_mapper(this_url, path_only = FALSE, sep = .Platform$file.sep)

Arguments

this_url

string: the Oceancolor URL, e.g. https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2002359.L3m_DAY_CHL_chlor_a_9km.bz2

path_only

logical: if TRUE, do not append the file name to the path

sep

string: the path separator to use

Value

Either the directory string corresponding to the URL code, if abbrev supplied, or a data.frame of all URL regexps and corresponding directory name strings if urlparm is missing

References

https://oceandata.sci.gsfc.nasa.gov/


AustralianAntarcticDataCentre/raadsync documentation built on May 5, 2019, 8:14 a.m.