爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5297|回复: 1

[作图] ncl读取数据

[复制链接]

新浪微博达人勋

发表于 2019-4-15 00:18:39 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 肖琪7 于 2019-4-15 00:22 编辑

本人ncl小白一枚,求各位大神指教数据在图上显示不出来
这是nc数据
SMJ{())PCX(O)D44{UZ](JN.png
脚本如下
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

   f = addfile("d:/CYGWin/tu/BCC-snd.nc","r")
   snd = f->snd

   lat = f->lat
   lon = f->lon



   snd@_FillValue=1.0E20
   lat@units = "degrees_north"  
   lon@units = "degrees_east"
   snd@lat=lat
   snd@lon=lon

   snd@_FillValue=-999
   wks=gsn_open_wks("png","snd1")


   res                  =True  
   res@cnFillOn         =True
   res@cnLinesOn        =False
   res@mpOutlineOn      =True
   res@gsnFrame         =False
   res@cnFillPalette    = "NCV_blu_red"
   res@cnLevelSelectionMode = "ExplicitLevels"   
   res@cnSmoothingOn    = True            
   res@cnSmoothingDistanceF =0.005
   res@cnSmoothingTensionF=2
   res@cnLevels    = (/0,5,10,15,20,25,30,35,40/)


   res@mpMinLatF         = 25
   res@mpMaxLatF         = 45
   res@mpMinLonF         = 70
   res@mpMaxLonF         = 105
    res@mpCenterLonF= (res@mpMinLonF + res@mpMaxLonF)/ 2



   res@lbOrientation="Vertical"
   res@gsnAddCyclic          = False

   map = gsn_csm_contour_map(wks,snd(0,:,:),res)


   filename ="D:/CYGWin/qing/DBATP/DBATP_Polygon.shp"
   lnres        = True
   lnres@gsLineColor = "black"
   lnres@gsLineThicknessF = 15
   shp_plot= gsn_add_shapefile_polylines(wks,map,filename,lnres)
   draw(map)
   frame(wks)

读出来的图是这样子的
snd1.png
还有这个图的数值是什么意思,缺测值吗

EPQ_Z@2R`D%T(KDSUBHPZQA.png



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

新浪微博达人勋

发表于 2019-4-15 07:31:37 | 显示全部楼层
nc数据信息里面肯定有缺测值说明,去对一下就知道了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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