一年前曾摸索着如何读写TRMM降水资料(HDF格式),现在又需要重新处理一些数据,发现很多东西都忘记了,花了一下午的时间才想起来怎么弄,只怪自己当初没写一个向详细的总结,现在重新补充一个吧
1.
资料下载地址:
资料简单说明:
The
Tropical Rainfall Measuring Mission (TRMM) is a joint U.S.-Japan
satellite mission to monitor tropical and subtropical precipitation
and to estimate its associated latent heating. TRMM was
successfully launched on November 27, at 4:27 PM (EST) from the
Tanegashima Space Center in Japan. The rainfall measuring
instruments on the TRMM satellite include the Precipitation Radar
(PR), an electronically scanning radar operating at 13.8 GHz; TRMM
Microwave Image (TMI), a nine-channel passive microwave radiometer;
and Visible and Infrared Scanner (VIRS), a five-channel
visible/infrared radiometer. The purpose of the 3B42 algorithm is
to produce TRMM-adjusted merged-infrared (IR) precipitation and
root-mean-square (RMS) precipitation-error estimates. The algorithm consists of two separate
steps. The first step uses
the TRMM VIRS and TMI orbit data (TRMM products 1B01 and 2A12) and
the monthly TMI/TRMM Combined Instrument (TCI) calibration parameters (from TRMM
product 3B31) to produce monthly IR calibration
parameters. The second step
uses these derived monthly IR calibration parameters to adjust the
merged-IR precipitation data, which consists of GMS, GOES-E,
GOES-W, Meteosat-7, Meteosat-5, and NOAA-12 data. The final gridded, adjusted merged-IR
precipitation (mm/hr) and RMS precipitation-error estimates have a
daily temporal resolution and a 0.25-degree by 0.25-degree spatial
resolution. Spatial coverage extends from 50 degrees south to
50degrees north latitude. The data are stored in the Hierarchical
Data Format (HDF), which includes both core and product specific
metadata. The file size is
about 0.25 MB (compressed).
2.
资料解压
需要在服务器上解压,dos下解压的文件无法读取
具体命令:gunzip */*.Z
3.
HDF格式数据的读取
需要借助HDF专门的库函数,因此要在unix下面安装一个可以调用g77的库函数(hdf4),具体操作见《在LINUX下如何利用C和Fortran读取HDF数据文件.doc》
4.
编写fortran程序,见“sd_read_batch.for”,然后输出为一般格式的数据;
具体编译步骤为:
进入fortran程序所在的目录
H4fc
sd_read_batch.for
%生成sd_read_batch.o文件
H4fc
sd_read_batch.o
%生成可执行文件a.out文件
./a.out
%运行可执行文件即可
如果运行过程中出现文件读入出错的信息,有可能是原始的数据有问题,此时需要重新下载数据;当然出现这种情况也有可能是磁盘已满
5.
其他注意事项:
1)
写成逐日的数据,注意在unix下,fortran会用一个字节来表示换行符,在window下输入该数据时需要用有格式方式来读取;
2)
完成整个数据输出需要用到以下程序:
TRMM_file-09.03.25.for %用来生成数据文件的文件名,包括路径
sd_read_batch-09.03.25.for %主程序,用来读HDF数据,并输出降水率资料,也可用read_my.m程序(matlab程序)
daily_TRMM_rainfall.for %用降水率资料计算得到逐日降水量
3)