-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
36 lines (23 loc) · 973 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
NASA trmm data files are a high spatial and temporal
resolution rainfall data product. Although I think
they may be available as HDF/NetCDF formats from
another source, the original source seems to be
here:
ftp://trmmopen.gsfc.nasa.gov/pub/merged/
That FTP site also includes some C and Fortran code
that needs a bit of a massage to make work. There's
issues with endianness and compiler limitations and
stack overflows.
So here's an R package. Here's how it works.
* install the package
* Read the header info from wherever you saved the file:
H = get_header("../Data/3B41RT.2014033100.7.bin")
* Get a layer from the file as a raster object, and plot:
prec = get_layer(H,"precipitation")
plot(prec)
* The metadata is available from `H`, for example:
> H$variable_name
[1] "precipitation" "precipitation_error" "total_pixels"
* You can read all layers into a raster brick:
data = get_brick(H)
plot(data)