- 积分
- 1041
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-10-31
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 海蓝海魂一 于 2015-12-3 16:29 编辑
一楼格式错乱,烦请移步二楼~
下面是网站(http://www.opendap.org/user/jimg/blog/matlab_2012a)上的一篇关于用matlab直接读取网络上数据资源的样例,拿来分享之~~顺便有一点不懂之处想请假各位。就是data = netcdf.getVar(ncid,3);这个命令可以直接从网上获取数据了,但我用的那个dataset不是样例里的,非常大,这样下下来之后保存在哪里了,关掉matlab之后会继续占我电脑存储空间吗?
% To open a remote dataset, use its URL:modis='http://test.opendap.org/dap/data/hdf/MOD08_D3.A2001153.003.2001207172930.hdf.gz';ncid = netcdf.open ( modis );% If you don't know what it contains, start by using the 'netcdf.inq' operation:[numdims,numvars,numglobalatts,unlimdimid] = netcdf.inq(ncid);% How many variables are there?>> numvarsnumvars = 666% Lets look at the fourth variable:[name,xtype,dimids,natts] = netcdf.inqVar(ncid,3);>> namename = mod08.Data%20Fields.Scattering_Angle_Maximum% Now lets get values for 'Scattering_Angle_Maximum'>> data = netcdf.getVar(ncid,3);>> datadata = Columns 1 through 22 -9999 11924 12044 12135 12226 12298 12386 12513 12619 12712 12820... -9999 11942 12037 12128 12220 12313 12413 12518 12612 12720 12820... -9999 11899 12019 12121 12214 12299 12418 12511 12621 12721 12823...... |
|