爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 3822|回复: 2

MeteoInfo 怎样读取NetCDF文件作图

[复制链接]

新浪微博达人勋

发表于 2012-3-24 14:13:54 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
请教一下,类似于GrADS那样,读取nc 文件,然后画出shaded的那种彩色图来?
多谢!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2012-3-24 16:49:07 | 显示全部楼层
这是我的nc读取绘图示例代码,绘制的是等值线,希望对你有用~~~~填充图的大同小异
NetCDFDataInfo aDataInfo = new NetCDFDataInfo();
            string aFile = Application.StartupPath + "\\Sample\\1.nc";
            aDataInfo.ReadDataInfo(aFile);

            GridData gridData = aDataInfo.GetGridData_LonLat(1, 1, 0);  //这个就是那个LU指数的绘制
            bool hasNoData = true;
            LegendScheme aLS = LegendManage.CreateLegendSchemeFromGridData(gridData, LegendType.UniqueValue,
                ShapeTypes.Polyline, ref hasNoData);
            VectorLayer aLayer = new VectorLayer(ShapeTypes.Polyline);
            aLayer = DrawMeteoData.CreateContourLayer(gridData, aLS, "NetCDF");
            aLayer.IsMaskout = true;
            int aLayerHandle = G_LayerLegend.MapFrames[0].AddLayer(aLayer,0);

评分

参与人数 1金钱 +5 贡献 +2 收起 理由
mofangbao + 5 + 2

查看全部评分

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2012-3-24 18:04:57 | 显示全部楼层
Meteo Data对话框中有打开NetCDF文件的菜单,其后的操作和打开GrADS文件一样的。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表