Import TRMM: Difference between revisions
(added rotation trick from Markus Metz) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
north=50 south=-50 east=180 west=-180 rows=400 cols=1440 | north=50 south=-50 east=180 west=-180 rows=400 cols=1440 | ||
Optionally convert then | Optionally convert then from mm/hr to some other time unit. | ||
=== Getting rotated maps in TRMM-HDF? === | === Getting rotated maps in TRMM-HDF? === | ||
Line 27: | Line 27: | ||
These are rotated and need to be rotated back. The (properly oriented) binary grids are much easier to handle than the original HDF files. | These are rotated and need to be rotated back. The (properly oriented) binary grids are much easier to handle than the original HDF files. | ||
See also [[AddOns/GRASS7/raster#r.flip]] | |||
[[Category: FAQ]] | [[Category: FAQ]] | ||
[[Category: Import]] |
Latest revision as of 09:06, 25 September 2014
TRMM data are usually delivered in a specific HDF format which is (partially) supported from GDAL 1.8+ (so, r.in.gdal would in theory work, see also below for rotation problem).
However, it is easier to get instead binary grids from here:
ftp://disc2.nascom.nasa.gov/data/TRMM/Gridded/3B43_V6/
The format is explained here. Hence, to import gridded TRMM into a Lat-long location with is done via
# generally r.in.bin -f -b north=50 south=-50 east=180 west=-180 rows=400 cols=1440 ....
e.g.
r.in.bin -f -b input=3B43.100101.6.precipitation.bin output=3B43.100101.6.precipitation \ north=50 south=-50 east=180 west=-180 rows=400 cols=1440
Optionally convert then from mm/hr to some other time unit.
Getting rotated maps in TRMM-HDF?
The TRMM 3B43 HDF files are rotated by 90° (clockwise), so north is right and west is up. The included datasets "precipitation" and "error" can be dumped from the HDF files to a binary or ASCII file with the "hdp" tool which should be on any system that has the HDF4 library installed.
Rotate "precipitation" with
hdp dumpsds -r 4 -d -o <outfile> -b <TRMM_3B43.hdf>
and "error" with
hdp dumpsds -r 5 -d -o <outfile> -b <TRMM_3B43.hdf>
These are rotated and need to be rotated back. The (properly oriented) binary grids are much easier to handle than the original HDF files.
See also AddOns/GRASS7/raster#r.flip