- This sample program is to read TRMM L3 HDF4 data precipitation = hdfread('3B43.20090101.7.HDF','/Grid/precipitation')
- Rot 90 deg anticlockwise to make (-49.875, -179.875) at the lower left corner point of the array rain_90rot = rot90(precipitation)
for j_lon = 1:3
lat = 49.875 - 0.25*(i_lat - 1)
lon = -179.875 + 0.25*(j_lon - 1)
rain = rain_90rot(i_lat,j_lon)
end
end
Here is a sample program to read a TRMM Level 2 HDF4 file in Matlab
data = hdfread('2A25.20090520.65575.7.HDF', 'ZRParmA')
Related links:
http://www.mathworks.com/help/techdoc/ref/hdfread.html
http://hdfeos.org/zoo/GESDISC_TRMM_matlab.php
http://hdfeos.org/zoo/index_openGESDISC_Examples.php
