请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4673|回复: 0

NCL 画等值线遇到问题求助

[复制链接]

新浪微博达人勋

发表于 2016-12-2 14:33:43 | 显示全部楼层 |阅读模式

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

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

x
第一张是模板,第二张是我画的,数据用的是micaps地面气压数据,时间是12月1日20时时次的部分代码如下:
data_sp = readAsciiTable(file_sp(i),nlon,"float",3)

olon = new(nlon,"float");
olat = new(nlat,"float");
do ii=0,nlon-1
olon(ii)=lon1+(lon2-lon1)/(nlon-1)*ii
end do
do jj=0,nlat-1
olat(jj)=lat1+(lat2-lat1)/(nlat-1)*jj
end do
olon!0          = "lon"
olon@long_name  = "lon"
olon@units      = "degrees_east"
olon&lon        = olon
olat!0          = "lat"
olat@long_name  = "lat"
olat@units      = "degrees_north"
olat&lat        = olat

data_sp!0="lat"
data_sp!1="lon"
data_sp&lat=olat
data_sp&lon=olon

  res = True
   res@gsnFrame  = False
   res@gsnDraw   = False
   res@vpWidthF  = 0.8
   res@vpHeightF = 0.8
;   res@mpProjection = "Mercator"
   res@mpLimitMode           = "LatLon"
   res@mpMinLatF             =  20
   res@mpMaxLatF             =  45
   res@mpMinLonF             =  100
   res@mpMaxLonF             =  130

   cnres = res
   cnres@gsnAddCyclic  = False
   cnres@cnFillOn  = True
   cnres@cnLinesOn = False
   cnres@cnLevelSelectionMode   = "ExplicitLevels"
   cnres@cnLineLabelsOn         = False
   cnres@cnInfoLabelOn          = False
   cnres@lbLabelBarOn           = True
   cnres@mpOutlineOn   = True
   cnres@mpFillOn      = True
   cnres@mpMonoFillColor = True  ;important
   cnres@mpFillColor ="white"    ;important
   cnres@mpDataBaseVersion = "MediumRes"
   cnres@mpDataSetName="Earth..4"
   cnres@mpOutlineSpecifiers=(/"China:states","Taiwan"/)
   cnres@mpOutlineBoundarySets ="NoBoundaries"
;   cnres@cnFillDrawOrder  = "PreDraw"
   cnres@mpAreaMaskingOn = True

  cnres@mpAreaMaskingOn = True
;   cnres@gsnLeftStringOrthogonalPosF = 0.03
;   cnres@gsnRightStringOrthogonalPosF = -0.01
;   cnres@gsnRightStringFontHeightF = 0.02
   cnres@pmTickMarkDisplayMode = "Always"
   cnres@mpOceanFillColor = 0
   cnres@mpInlandWaterFillColor = 0
   cnres@cnSmoothingOn = True
   cnres@cnRasterSmoothingOn = True
   cnres@cnSmoothingDistanceF = 0.03
;   cnres@cnSmoothingTensionF = 1

cnres@cnLinesOn = True
  cnres@cnFillOn  = False
  cnres@cnLineLabelsOn  = True
  cnres@lbLabelBarOn  = False
  cnres@cnMonoLineColor = True
  cnres@cnLineColor = "blue"
  cnres@cnLineThicknessF = 2.0
  cnres@cnMonoLineLabelFontColor = True
  cnres@cnLineLabelFontColor = "red"
  cnres@cnLineLabelFontHeightF = 0.01
  cnres@cnLineLabelFontThicknessF = 2.0

opts=cnres

  opts@cnLevelSelectionMode = "ExplicitLevels"       ; set explicit contour levels
plevels=fspan(1020,1030,5)
opts@cnLevels    = plevels ; set levels
draw_contour(data_sp, opts,"SP_"+time(i))
   delete(opts)


我画的图等值线太乱了,用了smooth平滑效果也不好,求大神指点,跪谢!

QQ截图20161202142800.png
SP_0120.png
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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