- 积分
- 91
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-1-5
- 最后登录
- 1970-1-1
|
1金钱
近来需要计算水汽通量,用matlab2010a读取nc文件,读出来八层比湿,气压,17层风速,不晓得之后如何操作,请大侠指点。
代码如下:
%------------ 读取所需nc文件
shum = netcdf.open('G:\NCEP\water vapor need\shum.mon.mean.nc','nc_nowrite');
[varname, xtype, dimids, atts] = netcdf.inqVar(shum,0);
varid = netcdf.inqVarID(shum,varname);
data1 = netcdf.getVar(shum,varid)
whos data1
pres = netcdf.open('G:\NCEP\water vapor need\pres.sfc.mon.mean.nc','nc_nowrite');
[varname, xtype, dimids, atts] = netcdf.inqVar(pres,0);
varid = netcdf.inqVarID(pres,varname);
data2 = netcdf.getVar(pres,varid)
whos data2
uwnd = netcdf.open('G:\NCEP\water vapor need\uwnd.mon.mean.nc','nc_nowrite');
[varname, xtype, dimids, atts] = netcdf.inqVar(uwnd,0);
varid = netcdf.inqVarID(uwnd,varname);
data3 = netcdf.getVar(uwnd,varid)
whos data3
vwnd = netcdf.open('G:\NCEP\water vapor need\vwnd.mon.mean.nc','nc_nowrite');
[varname, xtype, dimids, atts] = netcdf.inqVar(vwnd,0);
varid = netcdf.inqVarID(vwnd,varname);
data4 = netcdf.getVar(vwnd,varid)
whos data4 |
|