加载中…
个人资料
yangcan69
yangcan69
  • 博客等级:
  • 博客积分:0
  • 博客访问:10,372
  • 关注人气:114
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

matlab输出NC数据

(2019-09-24 03:28:32)
分类: PLAY
load("./output_tracking.mat","lat_traj","lon_traj","alt_traj")
lat=lat_traj
lon=lon_traj
height=alt_traj

newfile = netcdf.create("latlonheight.nc","NC_SHARE")

a = [1,2,3,4,5,6]
dimlat = netcdf.defDim(newfile,"lat",241*6*6)
dimlon = netcdf.defDim(newfile,"lon",241*6*6)
dimheight = netcdf.defDim(newfile,"height",241*6*6)

varlat = netcdf.defVar(newfile,"varlat","double",dimlat);
varlon = netcdf.defVar(newfile,"varlon","float",dimlon)
varheight = netcdf.defVar(newfile,"varheight","float",dimheight)

netcdf.endDef(newfile)

netcdf.putVar(newfile,varlat,lat)
netcdf.putVar(newfile,varlon,lon)
netcdf.putVar(newfile,varheight,height)

netcdf.close(newfile)

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有