download.amsr {oce} | R Documentation |
Download and Cache an amsr File
Description
If the file is already present in destdir
, then it is not
downloaded again. The default destdir
is the present directory,
but it probably makes more sense to use something like "~/data/amsr"
to make it easy for scripts in other directories to use the cached data.
The file is downloaded with download.file()
. Please read the
‘History’ section for important details on how download.amsr()
and also read.amsr()
have had be altered over the years, to deal
with changes in the directory structure and file format on the
server from which files are downloaded.
Usage
download.amsr(
year = NULL,
month,
day,
destdir = ".",
server = "https://data.remss.com/amsr2/ocean/L3/v08.2",
type = "3day",
debug = 0
)
Arguments
year , month , day |
a specification of the desired observation time.
There are 3 choices for this specification. (a) If |
destdir |
A string naming the directory in which to cache the downloaded file.
The default is to store in the present directory, but many users find it more
helpful to use something like |
server |
A string naming the server from which data are to be acquired. See “History”. |
type |
character value indicating where to get the data. This may be
|
debug |
an integer specifying whether debugging information is
to be printed during the processing. This is a general parameter that
is used by many |
Value
download.amsr
returns a character value holding the full pathname
of the downloaded file.
History
Until 25 March 2017, the default server was
"ftp.ssmi.com/amsr2/bmaps_v07.2"
, but this was changed when the author
discovered that this FTP site had been changed to require users to create
accounts to register for downloads. The default was changed to
"http://data.remss.com/amsr2/bmaps_v07.2"
on the named date.
This site was found by a web search, but it seems to provide proper data.
It is assumed that users will do some checking on the best source.
On 23 January 2018, it was noticed that the server-url naming convention
had changed, e.g.
http://data.remss.com/amsr2/bmaps_v07.2/y2017/m01/f34_20170114v7.2.gz
becoming
http://data.remss.com/amsr2/bmaps_v08/y2017/m01/f34_20170114v8.gz
On 26 July 2023, it was noticed that the server-url naming convention
had changed again, requiring not only the alteration of the default
server
value but also the addition of a new parameter named type
.
Worse yet – much worse – the file format is now changed from a gzipped
format to a NetCDF format, and this will require a complete rewriting
of read.amsr()
.
Sample of Usage
# The download may take up to about a minute. f <- download.amsr(2023, 7, 27, destdir="~/data/amsr") d <- read.amsr(f) plot(d) mtext(d[["filename"]], side=3, line=0, adj=0)
Author(s)
Dan Kelley
See Also
Other functions that download files:
download.coastline()
,
download.met()
,
download.topo()
Other functions that plot oce data:
plot,adp-method
,
plot,adv-method
,
plot,amsr-method
,
plot,argo-method
,
plot,bremen-method
,
plot,cm-method
,
plot,coastline-method
,
plot,ctd-method
,
plot,gps-method
,
plot,ladp-method
,
plot,landsat-method
,
plot,lisst-method
,
plot,lobo-method
,
plot,met-method
,
plot,odf-method
,
plot,rsk-method
,
plot,satellite-method
,
plot,sealevel-method
,
plot,section-method
,
plot,tidem-method
,
plot,topo-method
,
plot,windrose-method
,
plot,xbt-method
,
plotProfile()
,
plotScan()
,
plotTS()
,
tidem-class
Other things related to amsr data:
[[,amsr-method
,
[[<-,amsr-method
,
amsr-class
,
amsr
,
composite,amsr-method
,
plot,amsr-method
,
read.amsr()
,
subset,amsr-method
,
summary,amsr-method