Description Usage Arguments Value Limitations Author(s) References See Also Examples
dc.hydrography()
downloads hydrographic datasets from the CCHDO archive,
(or mirrors that use the exact same URL structure, apart from the
server name) based on a specified "expocode" that specifies the
expedition or cruise. This is convenient, because expocodes are how
cruises are referred to in the literature. See “Limitiations” for
a comments on the brittleness of dc.hydrography()
.
1 2 3 4 5 6 7 8 9 10 11 |
expocode |
String indicating the cruise (or 'expedition') code. |
type |
String indicating data type, either |
format |
String indicating data format, either |
server |
character value giving the base name of the server, used in the construction of URL queries. Since servers tend to change over time, this is a good argument to check, when debugging code that once worked but now fails. |
destdir |
character value indicating the directory in which to store
downloaded files. The default value of |
destfile |
character value indicating the name of the file. If not supplied, then the file name is constructed from the other parameters of the function call, so that subsequent calls with the same parameters will yield the same result; this is useful for caching. |
force |
A logical value that indicates whether to force the download,
even if the pathname constructed from |
dryrun |
A logical value that indicates whether to return the constructed web query, without attempting to download the file. This can be helpful in designing responses to changing URLs. |
debug |
an integer specifying whether debugging information is
to be printed during processing. The printing is done by
a call to |
String indicating the full pathname to the downloaded file.
Unfortunately, cchdo.ucsd.edu does not provide data organized
into URLs that can be inferred from the expocode alone, and so the
procedure used here is to scan the HTML for a summary URL that
can be inferred, and then to discover links from the HTML
text. This is brittle to changes in the formatting used by CCHDO, which
means that changes may need to be made to dc.hydrography()
whenever
CCHDO changes their website. Another consequence is that a web connection
is required even if the desired file has already been downloaded.
Dan Kelley (2017-11-25)
The work is done with dc()
.
Other functions that download ocean-related data:
dc.coastline()
,
dc.g1sst()
,
dc.met()
,
dc.topo()
,
dc.woa()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(dc)
## Not run:
library(oce)
## 1. Bottle stations for a Southern Ocean cruise
bottle <- dc.hydrography("09AR20041223", destdir="~/data/hydrography")
plot(read.section(bottle), which="map")
##
## 2. CTD data from same cruise, subsetted to
## a section between Antarctica and Australia
ctd <- dc.hydrography("09AR20041223", type="ctd", destdir="~/data/hydrography")
secCTD <- read.section(directory=ctd)
transectCTD <- subset(secCTD, 100 < longitude & longitude < 120)
plot(transectCTD)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.