trmm2ncdf: trmm2ncdf function

Description Usage Arguments Value

Description

A function to convert TRMM rainfall data binaries into a NetCDF file

Usage

1
2
3
4
5
trmm2ncdf(directory, outfile = tempfile(fileext = ".nc"),
  start = ymd("20060101"), end = ymd("20060102"), by = "days",
  hours = c("00", "03", "06", "09", "12", "15", "18", "21"),
  product = "3B42RT", version = 7, poly = NULL, brick = TRUE,
  layer = NULL, quiet = FALSE)

Arguments

directory

directory in which the .bin files are stored. Note these must be gunzipped first

outfile

name and location of the NetCDF file to save results into

start

start date e.g. ymd('20121231')

end

end date e.g. ymd('20130101')

by

argument passed to seq(start,end,by), the sequence of days to download data from, default is all days between start and end

hours

the hours in the day for which to download data, a character string. Default is all hours.

product

the product to download, default is '3B42RT', but other options are '3B41RT' and '3B40RT'

version

version of the data to download, default is 7, but could be either 5 or 6. Note that version 7 has the greatest temporal coverage at present

poly

a polygonal window bounding a spatial subset of the data to extract. By default, all data over the range covered by TRMM will be extracted

brick

logical. If set to TRUE (the default) then this extracts all TRMM data at each time point

layer

the name of the layer to extract. Options are ”

quiet

logical: show progress?

Value

an object of class trmmNCDF, for which there is a method extract_ncdf for extracting data from the saved NetCDF file. The returned list object contains an element firstslice which is a raster brick of data from the first time point, this can be used to give the extracted data geographical context.


barryrowlingson/trmm documentation built on May 11, 2019, 8:31 p.m.