- 积分
- 153215
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-10-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 又是那隻貓 于 2017-2-23 10:07 编辑
关于用matlab一站式读取NetCDF, OPeNDAP, HDF5, GRIB, GRIB2, HDF4等等
http://bbs.06climate.com/forum.php?mod=viewthread&tid=47599
其实这里是补一下上次欠下的一个示例;
从型如GFS_Global_0p5deg_20140531_0000_anl.grib2的文件中读取温度等变量
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
grib=ncgeodataset(Data_File);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%time
utc_time=double(grib.data('time'));
Data.UTC=datestr(datenum([Data_File(end-22:end-15) Data_File(end-13:end-10)],'yyyymmddHHSS')+ utc_time/24 ,'dd-mmm-yyyy HH:MM:SS' );
%%%%%%%%%%%%%%%%%%%%%%%%%%%%grid isobaric
Data.isobaric=double(grib.data('isobaric1'))/100;%21 level and convert it into hPa
%%%%%%%%%%%%%%%%%%%%%%%%%%%%grid lat lon
Data.lat=double(grib.data('lat'));
Data.lon=double(grib.data('lon'));
Data.Temperature=squeeze(double(grib.data('Temperature_isobaric')));%K
Data.Temperature=Data.Temperature(1:21,:,:)-273;%convert it into degress Centigrade
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
上面是读取温度的示例,完整的我传成一个文件,收少许贡献。附件里包含了可降水率、相对湿度、风场、温度等
%float Precipitable_water_entire_atmosphere(time=1, lat=361, lon=720);
%float Relative_humidity_isobaric(time=1, isobaric3=25, lat=361, lon=720);
%float Temperature_isobaric(time=1, isobaric=26, lat=361, lon=720);
%float u-component_of_wind_isobaric(time=1, isobaric=26, lat=361, lon=720);
%float v-component_of_wind_isobaric(time=1, isobaric=26, lat=361, lon=720);
%float Vertical_velocity_pressure_isobaric(time=1, isobaric1=21, lat=361, lon=720);
%float Convective_available_potential_energy_surface(time=1, lat=361, lon=720);
%float Convective_inhibition_surface(time=1, lat=361, lon=720);
等变量的读取
Fun_GFS_Data.m
(2.26 KB, 下载次数: 259, 售价: 3 贡献)
|
评分
-
查看全部评分
|