汪帮主卫星遥感空间分享 http://blog.sciencenet.cn/u/zjwang 湖北鄂州人,2011年博士毕业于吉林大学。现从事卫星遥感技术工作。

博文

The function for reading AIRS CO2 Level3 HDF data

已有 7105 次阅读 2010-11-14 14:01 |个人分类:计算程序|系统分类:科研笔记

The Atmospheric Infrared Sounder, AIRS, was launched aboard the Aqua Spacecraft in 2002 as part of NASA's Earth Observing System Afternoon Constellation of satellites known as the 'A-Train.' AIRS has provided the first satellite retrieval of mid-tropospheric CO2 under cloudy conditions, without the use of a priori information from models. AIRS retrievals use cloud-cleared thermal IR radiance spectra in the 15 micron band with an accuracy better than 2 ppm.The hyperspectral data from AIRS have been used to produce global maps of carbon dioxide and other trace gases including ozone, methane, and carbon monoxide. These data are providing important constraints on modeling the global distribution and transport of these gases around the world.

The introduction on AIRS and its carbon dioxide product and the figure are from http://airs.jpl.nasa.gov/AIRS_CO2_Data/, and the data is availabe on this website.

The function wzjReadAIRSMonthL3CO2 can help you to retreive the AIRS data once you gave the filename "fn".

function AIRS=wzjReadAIRSMonthL3CO2(fn)
    hinf = hdfinfo(fn);
    vgCO2=hinf.Vgroup;
    vgDF=vgCO2.Vgroup(1);
    vgGA=vgCO2.Vgroup(2);
       
    lat = hdfread(vgDF.SDS(1));
    lon = hdfread(vgDF.SDS(2));
    lat(77:91,:)=[];
    lon(77:91,:)=[];
    co2 = hdfread(vgDF.SDS(3));
    co2(77:91,:)=[];
    idx=abs(co2+9999)<1e-6;
    co2(idx)=NaN;
   
    AIRS.lat = lat;
    AIRS.lon = lon;
    AIRS.co2 = co2;
    vdGA = vgGA.Vdata;
    year = hdfread(vdGA(6));
    month = hdfread(vdGA(7));
    AIRS.year = year;
    AIRS.month = month;
end

Furthermore, you are allowed to read the selected data according to year and month, and location by the following function, which is based on former function. Please note that you must call this function when the current directory of MATLAB is the path where the data be placed or the current directory is included in the MATLAB seraching paths .

% dts : given y.m as yyyy.mm, e.g. '2002.09'
% locRange: given [lonMin lonMax latMin latMax]
function selAIRS = wzjSelectAIRS(ym, locRange)
    if nargin <2
        locRange = [-180 180 -90 90];
    end
    fn=['AIRS.' ym '*.hdf'];
    flst = dir(fn);
    if isempty(flst)
        disp('can not find this file');
    end
    airs = wzjReadAIRSMonthL3CO2(flst(1).name);
    selAIRS = airs;
    lon = airs.lon;
    lat = airs.lat;
    co2 = airs.co2;
    lonMin = locRange(1);
    lonMax = locRange(2);
    latMin = locRange(3);
    latMax = locRange(4);
    [r, c] = find(lon<lonMin | lon>lonMax);
    selAIRS.lon(:,c)=[];
    selAIRS.lat(:,c)=[];
    selAIRS.co2(:,c)=[];
    [r, c] = find(lat<latMin | lat>latMax);
    selAIRS.lat(r,:)=[];
    selAIRS.lon(r,:)=[];
    selAIRS.co2(r,:)=[];
end



https://blog.sciencenet.cn/blog-43777-383642.html

上一篇:The function for reading MOPITT CO Level3 HDF data
下一篇:SCIATRAN Assist V4.0
收藏 IP: 202.98.17.*| 热度|

0

发表评论 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-11-23 10:07

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部