Friday, February 28, 2014

Convert TRRM Real Time Binary File into ESRI ASCII

Be The First To Comment
Seven simple steps for converting TRMM binary to ASCII grid using MATLAB

Step1:
 %Open TRMM realtime binary file

trmmFile = fopen('E:\TrmmBinary Processing\3B42RT.2012.03.27.09z.bin', 'rb');  

Step2:
%Move file pointer to the begining of  file

frewind(trmmFile);

Step3:
%Read TRMM value from the binary file having 1140 rows and 480 columns

precipitation = fread(trmmFile, [1440,480], 'float32','b');

Step4:
%Shift precipitation by 90 degree to relate data with equator

precipitation = rot90(precipitation);

 Step5:
%Assign ESRI ASCII GRID HEADER
%After rotaion by 90 degree ncols changed into 1440 from 480 and nrows
%changed into 480 from 1440
 

© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me