file = "C:\Users\Administrator\Desktop\FY3B_MWRID_GBAL_L1_20141209_0611_010KM_MS.HDF";
datainfo = h5info(file);
ds = '/EARTH_OBSERVE_BT_10_to_GHz'
h5disp(file)
bt = h5read(file,ds)
disp(bt(:,:,1))
file = "C:\Users\Administrator\Desktop\FY3B_MWRID_GBAL_L1_20141209_0611_010KM_MS.HDF";
%datainfo = h5info(file);
ds = '/EARTH_OBSERVE_BT_10_to_GHz'
%h5disp(file)
bt = h5read(file,ds)
bt1 = bt(:,:,1)
help(bt)
disp(bt1)
之前自己在读取风云3号数据时候,各种查资料都没有找到相关的内容,后来自己慢慢摸索终于将数据读了出来,虽然方法很笨,但是算是达到了基本效果吧。给自己记录下,也分享给大家。
中间值得注意的是我读取的是风云3B 和 3C的数据,这两种数据的内部格式其实是不一样的,所以分开来读取。
代码如下:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%This is the program for calculating the Snow Water Equivalent from
%FengYun-3 Satelite Images
%Satalite:FY-3A and FY-3B; Sensor: WMRI; Data Level: L1; Orbit:A&D.
%Author:Jinbang Peng; Coding time: 20171107.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Scan the image files in the appointed fold
FoldPath='C:\FY3\code\datasample\';
% FoldPath='C:\FY3\code\datasample\';
DataPath=dir([FoldPath,'FY3*_MWRI*MS.HDF']);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%1.Data input
for i=1%:numel(DataPath)
i=12
file=[FoldPath,DataPath(i).name];
hinfo = hdf5info(file);
% i=5;
% Judge the satelite style of the images (FY_3B or FY-3C), cause the
% data structure is different for FY_3B and FY-3C datasets.
if strncmp(DataPath(i).name,'FY3B',4)
Lati_info = hdf5read(hinfo.GroupHierarchy.Datasets(20));%
Long_info = hdf5read(hinfo.GroupHierarchy.Datasets(21));%
EO_BT_info = hdf5read(hinfo.GroupHierarchy.Datasets(8));%
elseif strncmp(DataPath(i).name,'FY3C',4)
Lati_info = hdf5read(hinfo.GroupHierarchy.Groups(2).Datasets(1));%
Long_info = hdf5read(hinfo.GroupHierarchy.Groups(2).Datasets(2));%
EO_BT_info = hdf5read(hinfo.GroupHierarchy.Groups(1).Datasets(2));%
else
disp('No FY-3 B&C data available in appointed file fold!');
% pritf('No file available in appointed file fold!');
% return;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EO_BT_info19h=EO_BT_info(:,:,4);
EO_BT_info37h=EO_BT_info(:,:,8);
close all; clear all; clc
datainfo=hdf5info('FY3B_MWRID_GBAL_L1_20180530_0049_010KM_MS.HDF');
MWRIBT=hdf5read(datainfo.GroupHierarchy.Datasets(8));
latitude=hdf5read(datainfo.GroupHierarchy.Datasets(20));
longitude=hdf5read(datainfo.GroupHierarchy.Datasets(21));
Earth_MWRIBT=MWRIBT(:,:,2);
m_proj('robinson','lat',[-87.6080,87.2409],'long',[-133.3665,118.2140]);
m_coast('patch',[.93,1,.93],'edgecolor','k');hold on;
m_contourf(latitude,longitude,Earth_MWRIBT);hold off;
m_grid('linestyle',':','tickdir','out','fontsize',11);
colormap('jet(15)');colorbar('location','southoutside');
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- igat.cn 版权所有 赣ICP备2024042791号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务