Do you have software code that can read TRMM files in Matlab, IDL, NCL?

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
GES DISC - ingridgs
Subject Matter Expert
Subject Matter Expert
Posts: 243
Joined: Fri Apr 23, 2021 9:14 am America/New_York
Answers: 1
Endorsed: 7 times

Do you have software code that can read TRMM files in Matlab, IDL, NCL?

by GES DISC - ingridgs » Fri Nov 27, 2026 9:37 am America/New_York

Here is a sample program to read a TRMM Level 3 HDF4 data file in Matlab.
  • 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 i_lat = 400:400
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

Filters:

Post Reply