Você está na página 1de 4

海洋信息 2006年

I DL语言处理HDF格式遥感数据的研究
路文海1’2
(1.中国海洋大学青岛市266003 2.国家海洋信息中心天津市300171)

摘要本文分别介绍了HDF格式与IDL语言,说明了数据下载的相关问题。并以MODIS的SST数据为例,详
细介绍了用IDL处理HDF格式数据和相应的制图方法。

关键词IDL HDF MODIS SST制图

代计算机语言。它可以快速地分析数据和实现可
1 HDF格式与IDL语言 视化。IDL语言提供了大量的基础数据类型,能
读入几乎所有的数据格式。IDL适用于各种主要
1.1 HDF格式 平台,如Windows,UNIX等,使用户在多平台环
由美国伊利诺伊大学(the University of 境下的数据分析变得更加容易,并确保在硬件变
I ll inois)的NCSA组织(The National Center 动的情况下,由某平台开发的程序能成功地移植
for Supercomputing Appl ications)开发的HDF 到另一个平台,从而提高了程序的可移植性。本
(Hierarchical data formats)文件格式是一 文数据处理使用的是IDL6.1,以下简称IDL。
种超文本文件格式,能够综合管理2D、3D、矢
量、属性、文本等多种信息,帮助科学家摆脱不 2数据下载
同数据格式之问相互繁琐的转换,将更多的时间
和精力用于数据分析。HDF格式能够存储不同种 2.1 数据来源
类的SDS(Scientific Data Set),包括图像、 美国宇航局JPL实验室物理海洋学数据现有
多维数组、指针及文本数据。HDF格式还提供命 档案分发中心(PO.DAAC/JPL)的网站提供了大
令方式,分析现存HDF文件的结构,并即时显示 量的卫星遥感信息和资料,可以使用匿名FTP登
图像内容。科学家可以用这种标准数据格式快速 陆下载数据。本文数据的FTP地址为:
熟悉文件结构,并能立即着手对数据文件进行管 ftp://128.149.225.30/sea——surface—temperature/modis/data/

aqua/L3_mapped/sst/monthly/04km/2005
理和分析。由于HDF的诸多优点,这种格式已经
被广泛应用于目前国外各种卫星传感器的标准数 2.2数据说明

据格式。读取HDF文件的软件很多,包括C、 MODIS (ioderate Resolution Imaging

IDL、MATLAB、FORTRAN等,本文以MODIS的SST Spectroradiometer)中分辨率成像光谱仪是NASA
数据为例将详细讲解用IDL语言读取HDF格式数 联合其他一些科研机构开发的卫星搭载的传感
据的方法。 器。MODIS是搭载在EOS(Earth Observing System)
1.2 I DL语言 AM和PM卫星上的关键设备,每两天就可以提供
IDL(Interactive Data Language)交互式 从可见光到红外波段的地球陆地、海洋和大气的
数据语言是由美国Kodak公司的全资子公司RSI 全面的全球观测数据。

(Research System Inc)开发并投向市场、面 SST(Sea Surface Temperature)海表温度

向矩阵且用于数据可视化研究与应用开发的第四 资料是容易获得的,特别是近年来从卫星观测海

收稿日期:2006年7B 3日

 万方数据
第3期 路文海:IDL语言处理IHDF格式遥感数据的研究

表温度快速而准确,有利于海洋气候和海气相互 strQ=reverse(strQ,2)

作用的研究。本文下载了2005年1~12月的全球4 strChina=fltarr(m,n)
for i=0,m-1 do begin
km白天月平均温度数据。
for j=O,n一1 do begin
MODIS的SST数据对应着两个文件:SST数 case strQ[i,n}+j】ot
据文件和数据质量文件。在处理数据文件时,若 0:begin

数据质量文件中点值不为零,则对应的SST数据 strChina【ij]=(str[ml+i,nl+j】+0.oD-300
end
点必须剔除掉。
255:begin

strChina【idl=mO
3 数据制图 end

else:begin

(1)首先用spawn函数将所有SST数据名读 strChina【Ⅷ=99
end
入到fileli st中。经常需要一次处理许多遥感
endcase
数据文件,手工修改文件名工作量会相当大,
endfor
IDL中提供的spawn函数可以直接调用“DOS命 endfor
令提示符”对文件名进行读取。语法为:spawn,
(4)对数据做拉伸处理以增加显示度。将无
‘dir/b‘+文件所在目录+文件名(允许使用
效数据赋为白色,陆地部分赋为浅褐色。用户可
通配符),filelist
以采用IDL自带色板,也可以根据需要自定义色
(2)读取HDF数据。IDL中有很多函数可以直
板。命令可以加载IDL预定义的41个色板中的
接读取HDF数据信息,下面列举HDF数据读取的
一个,本文采用自定义的色板。
方法,执行完下列命令后,获得数据值,即str
indexl--where(strChina eq 100.0):返回陆地点数组下标值
矩阵。
index2=where(strChina eq 99.0);返回无效点数组下标值
sd—id=hdf—sd—start(tempdir+filename【i],/read):打开
strChina=bytscl(strChina,0,35,top=191);数据拉伸范围
HDF文件
(0,191)
result=hdf—sd select(sd_id,o);获取SDS ID
strChina【indexl]=254;陆地点赋值为浅褐色
hdf_sd__getdata,result,str;获取SDS数据值
strChina[index2]=0;无效点赋值为白色
hdf—sd—end,sd_id;关闭HDF文件
(5)用tv命令来显示图像。同时,为图像加
(3)从str矩阵中截取中国海区(东经105。
上陆地、配置色板和文字标注,进行整饰输出。
~150。,北纬5。~45。)进行处理。由于IDL
画图时默认从左下角开始,数据第一行显示在
下方,最后一行显示在上方,正好和str矩阵
存放数据顺序相反,因此需要对str矩阵做翻
转。另外,读HDF属性数据时会发现转换公
式:Y=slope木X+intercept,str矩阵要按照
此公式进行转换才能得到真实值。在数据处理
过程中,陆地值赋100,无效值赋99。实现代
码如下:

Inl=fix((8192/360.O、+(105+180D
n I=fix((4096/1 80.0)+(5+90))
m2=fix((8 I 92/360.0)+(1 50+i 80))
n2=fix((4096/l 80.O)+(45+90))
m=m2.ml

n=n2.rll
图1 四月份白天西北太平洋海表面月平均温度
str=reverse(str,2)

 万方数据
IDL语言处理HDF格式遥感数据的研究
作者: 路文海
作者单位: 中国海洋大学,青岛市,266003;国家海洋信息中心,天津市,300171
刊名: 海洋信息
英文刊名: MARINE INFORMATION
年,卷(期): 2006,(3)
被引用次数: 2次

相似文献(10条)

1.外文会议 K. A. Lee An Interactive Visualization and Analysis Tool for Hierarchical Data Format

Version 4 and 5 Files


The Clouds and Earth's Radiant Energy System (CERES) project at NASA Langley Research Center (NASA/LaRC) is a key component of
NASA's Earth Observing System program. The data files are written in Hierarchical Data Format version 4 (HDF4). Due to some
limitations of the HDF4, the National Center for Supercomputing Applications has issued a new design format, version 5 (HDF5). These
two HDF formats are not compatible. NASA/LaRC has developed an interactive visualization and analysis tool, view_hdf, written in
Research Systems Inc. Interactive Data Language, to manipulate HDF4 files. view_hdf has been enhanced to access and manipulate HDF5
files. This tool provides a broad range of visualization and analysis capabilities that allow researchers to select, analyze, and
manipulate information stored in HDF files. Although developed mainly for the CERES project, this tool is of more general use with
other data sets written in HDF.

2.会议论文 王旻燕.臧海佳 HDF分层数据格式和IDL交互式数据语言 2007


HDF是一种新型的、有别于传统数据文件格式的分层数据格式,它的数据结构更为复杂,因此可包含更为全面的数据及其数据各项属性的信息。除利
用一般的程序读取语言外,IDL交互式数据语言在读取HDF文件方面具有独到之处。本文介绍了HDF数据格式,比较了HDF与传统数据格式之间的区别,并
举例说明如何用IDL语言程序说明读取HDF文件。

3.外文会议 Kam-Pui Lee.Peter L. Spence View_HDF: visualization and analysis tool for hierarchical

data format files


Many atmospheric and oceanographic data sets are being archived in Hierarchical Data Format (HDF). HDF is self-documenting and
enables the storage of large scientific data sets in a common, efficient machine-independent binary format. Science Applications
International Corporation (SAIC) along with the Atmospheric Sciences Competency at NASA Langley Research Center (LaRC), have
developed an interactive visualization and analysis tool, view_HDF to manipulate HDF files. view_HDF was initially developed for the
Clouds and the Earth's Radiant Energy System (CERES) project at NASA/LaRC, then later extended to HDF files in general. This tool is
designed to work with any HDF file and provides a broad range of visualization and analysis capabilities that allow researchers to
select, analyze, and manipulate information stored in HDF files. view_HDF can also read column formatted ASCII text. Examples of the
tool's versatility and utility are presented using atmospheric and oceanographic data sets. The included data products come from the
CERES, TOPEX/Poseidon, MODIS, and Pathfinder missions. From these data products, view_HDF is demonstrated to extract and geolocate,
Sea Surface Height, Sea Surface Temperature, Scene Identification, and Wind Speed over ocean for a common data day. The software is
written in Interactive Data Language (IDL), and although originally developed on a UNIX platform, it has been ported to Microsoft
Windows environment. It should be portable to any platform that supports IDL. view_HDF is available from the NASA/LaRC Atmospheric
Sciences Data Center at http://eosweb.larc.nasa.gov/HPDOCS/view hdf.html. The software packages also contain a User's Guide in PDF
and a sample data file.

4.外文会议 Gregory Leptoukh.Dimitar Ouzounov.Andrey Savtchenko.Suraiya Ahmad.Li Lu.Nathan Pollack.

Zhong Liu.James Johnson.Jianchun Qin.Sunmi Cho.Jason Y. Li.Steven Kempler.Bill Teng HDF/HDF-EOS Data

Access, Visualization and Processing Tools at the GES DAAC


To help users of remote sensing data, the NASA Goddard Earth Sciences Distributed Active Archive Center (GES DAAC) has developed
a series of desktop and on-line tools. These are presented in this article. Various HDF readers for AIRS and MODIS data have been
written in IDL, C and Fortran. HDFLook for AIRS and MODIS works as a desktop application as well as an integral part of various
subsetting systems. AIRS QuickLook is an on-line package that allows users to view AIRS/HSB/AMSU Level-IB data online by specifying a
channel prior to obtaining data. AIRS Online Channel/Variable subsetter provides on-line subsetting of the AIRS Level IB and Level 2
data products. OASIS (Online data AnalySIS) is an IDL-based HTML/CGI interface for search, selection, and simple analysis of earth
science data. TRMM Online Visualization and Analysis System is designed for quick exploration, analyses, and visualization of TRMM
Level-3 and other precipitation products. WebGIS is online web software that implements the Open GIS Consortium (OGC) standards for
requesting rendered maps from OGC-compliant servers.

5.会议论文 王旻燕.臧海佳 HDF分层数据格式和IDL交互式数据语言 2007


HDF是一种新型的、有别于传统数据文件格式的分层数据格式,它的数据结构更为复杂,因此可包含更为全面的数据及其数据各项属性的信息。除利
用一般的程序读取语言外,IDL交互式数据语言在读取HDF文件方面具有独到之处。本文介绍了HDF数据格式,比较了HDF与传统数据格式之间的区别,并
举例说明如何用IDL语言程序说明读取HDF文件。

6.OA论文 Koennecke. Mark.Filges. Uwe NeXus Software Status


NeXus is a joint effort of both the synchrotron and neutron scattering
community to devlop a common data exchange format based on HDF. In order to
simplify access to NeXus-files a NeXus-API is provided. This NeXus-API has been
redesigned and expanded to cover both HDF versions 4 and 5. Only small changes
to the API were necessary in order to accomplish. A new NeXus-API for IDL based
on IDL C interface has been implemented.

7.外文会议 Kam-Pui Lee.Spence. P.L. view/spl I.bar/HDF: visualization and analysis tool for
hierarchical data format files
Many atmospheric and oceanographic data sets are being archived in hierarchical data format (HDF). HDF is self-documenting and
enables the storage of large scientific data sets in a common, efficient machine-independent binary format. Science Applications
International Corporation (SAIC) along with the Atmospheric Sciences Competency at NASA Langley Research Center (LaRC), have
developed an interactive visualization and analysis tool, view/spl I.bar/HDF was initially developed for the Clouds and the Earth's
Radiant Energy System (CERES) project at NASA/LaRC, then later extended to HDF files in general. This tool is designed to work with
any HDF file and provides a broad range of visualization and analysis capabilities that allow researchers to select, analyze, and
manipulate information stored in HDF files. view/spl I.bar/HDF can also read column formatted ASCII text. Examples of the tool's
versatility and utility are presented using atmospheric and oceanographic data sets. The included data products come from the CERES,
TOPEX/Poseidon, MODIS, and Pathfinder missions. From these data products, view/spl I.bar/HDF is demonstrated to extract and
geolocate, sea surface height, sea surface temperature, scene identification, and wind speed over ocean for a common data day. The
software is written in interactive data language (IDL), and although originally developed on a UNIX platform, it has been ported to
Microsoft Windows environment. It should be portable from NASA/LaRC Atmospheric Sciences Data Center at
http://eosweb.larc.nasa.gov/HPDOCS/view/spl I.bar/hdf.html. The software packages also contain a user's guide in PDF and a sample
data file.

8.期刊论文 何全军.张月维.曹静.吴志军.黄江.HE Quan-jun.ZHANG Yue-wei.CAO Jing.WU Zhi-jun.HUANG Jiang

基于IDL的MODIS1B数据SST反演 -热带气象学报2009,25(2)
海表温度是重要的海洋环境参数.MODIS(Moderate Resolution Imaging Spectrora-diometer)具有强大的海洋信息探测功能.采用多通道分裂窗算法
,通过交互式数据语言IDL编程,实现了直接利用MODIS1B数据进行海表温度(SST)反演,并将反演结果存贮为标准的HDF文件以供其他软件使用.该方法能够
适应对整条轨道的MODIS1B数据进行快速、实时和自动处理,大大节省人力资源,同时提高遥感产品数据的分发和共享能力.

9.外文期刊 D. Ouzounov.A. Savtchenko.G. Leptoukh.B. Zhou.D. Ostrenga.C. Deroo.L. Gonzalez GES DAAC

tools for accessing Terra and Aqua MODIS data


The unique position of the NASA Goddard Earth Sciences Distributed Active Archive Center (GES DAAC), as an intermediary between
users and Terra and Aqua/MODIS data, let us to explore and develop tools that could help users access and manipulate data. The search
and order tools include DAAC-unique extensions such as: the Web-based hierarchical ordering mechanism, the multi-product ordering
system, and moderate-resolution imaging spectroradiometer (MODIS) Level 1B channel subsetting. Visualization and data manipulation
tools, exemplified by HDFLook_MODIS, resulted from a joint collaboration between GES DAAC, University of Science and Technology,
Lillie, and MODIS Science team; furthermore, simple interactive data language (IDL) tools were developed at GES DAAC as work aids.
The key features of some of the improved tools available from the GES DAAC are described.

10.学位论文 黄晓园 MODIS 1B数据处理及反演地表温度和土壤湿度IDL实现 2008


中分辨率成像光谱仪MODIS(Moderate Resolution Imaging Spectroradiometer)是新一代地球观测系统中“图谱合一”的光学传感器,具有36个光
谱通道,分布在0.4-14Um的电磁波谱范围内。它的地面分辨率有250m、500m和1000m三种,扫描宽度为2330Km。在对地观测过程中,每秒可同时获得
6.1兆比特的来自大气、海洋和陆地表面信息,每天或每2天就可获取一次全球观测数据。本研究主要是对MODIS1B数据进行预处理,然后提取云雾、冰雪
、水体、植被覆盖,这些都是后续对地表温/湿度反演所必不可少的步骤,并选择适合的算法,通过IDL语言编写的处理软件,结合ENVI和MODIStools控
件加以实现。主要研究内容如下:<br>  
对分层数据格式(HDF格式)和IDL语言提供了的相关函数进行研究;对MODIS数据预处理,包括数据条纹噪声、数据重叠消除,反(辐)射率定标,太阳天
顶角订正,以及亮温反演和几何纠正等,并选择不同的光谱组合和阈值,来提取地物。针对MODIS数据温度的分裂窗算法进行了简要的介绍,并对参数的
获取进行了分析,并在IDL6.2环境下,编程实现了该算法。利用MODIS影像,对云南地区的陆面温度进行反演,其反演的温度由滇西北向滇东南逐渐增加
,这一现象符合了云南高纬度与高海拔相结合、低纬度和低海拔相一致的地型环境,说明反演的瞬时陆面温度的分布与同步气温数据的宏观变化规律基
本一致。在地表温度的基础上,结合植被指数得出植被供水指数(VSWI)来实现对土壤湿度的反演,也可通过第6、7光谱波段对水的吸收率的差异得地表
含水量指数(SWCI)来实现,两种方法都具有一定的可行性。<br>  
研究表明,从遥感测量得到的地面温/湿度可以反映每个像元的下垫面温/湿度的平均状况和下垫面温/湿度场的空间分布特征,具有传统观测方法无法
比拟的优越性。虽然利用MODIS遥感数据反演陆面温/湿度还存在相当的问题,但它仍然是目前获取大面积区域陆面温/湿度的最有效、最简便的方法,也
是未来研究和发展的方向。

引证文献(2条)

1.王跃启.江洪.肖钟湧.张秀英.周国模.余树全 基于OMI数据的中国臭氧总量时空动态信息提取[期刊论文]-环境科

学与技术 2009(6)

2.何全军.张月维.曹静.吴志军.黄江 基于IDL的MODIS1B数据SST反演[期刊论文]-热带气象学报 2009(2)

本文链接:http://d.g.wanfangdata.com.cn/Periodical_hyxx200603003.aspx
授权使用:同济大学图书馆(tjdxtsg),授权号:7d18b6d0-6ed9-4a02-aae6-9ea6017b0eb5
下载时间:2011年3月14日

Você também pode gostar