爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6504|回复: 3

[作图] ncl画500hPa位势高度场只保留一条0线改如何设置?

[复制链接]
发表于 2019-3-1 15:29:22 | 显示全部楼层 |阅读模式

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

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

x
在文献调研中看见一张位置高度的图,希望用ncl画出类似的,参考图如下

                               
登录/注册后可看大图

自己写的ncl脚本,略去读入数据,仅放画图设置,如下
  wks = gsn_open_wks("eps","test_H500")              ; send graphics to PNG file

  gsn_define_colormap(wks,"BlueDarkRed18")

  res            = True                          ; plot mods desired
  res@gsnPolar   = "NH"                          ; specify the hemisphere

  res@cnFillOn             = True               ; turns on the color
  res@mpFillOn             = False              ; turns off continent gray
  res@cnLinesOn            = True               ; turn off contour lines

  res@mpGridLatSpacingF    = 30.                ; change latitude  line spacing
  res@mpGridLonSpacingF    = 30.                ; change longitude line spacing  
  res@mpCenterLonF = 180  

  res@cnLineLabelsOn       =  True
  res@cnLevelSelectionMode = "ManualLevels"     ; set manual contour levels
  res@cnMinLevelValF       = -20.                 ; set min contour level
  res@cnMaxLevelValF       = 20.                 ; set max contour level
  res@cnLevelSpacingF      =   2              ; set contour spacing
         
  res@gsnContourZeroLineThicknessF = 3

  plot = gsn_csm_contour_map_polar(wks,zg,res)    ; create the plot

得到效果如下

                               
登录/注册后可看大图

请问如何像参考图仅保留加粗的0线而去掉其他等值线和数值?谢谢大家解答

QQ截图20190301152756.jpg
QQ截图20190301152537.jpg
密码修改失败请联系微信:mofangbao
发表于 2019-3-1 17:03:05 | 显示全部楼层
cnLevelSelectionMode = "Ex....."
cnlevels=(/0/)
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2019-3-1 19:52:45 | 显示全部楼层
我不喜欢吃生姜 发表于 2019-3-1 17:03
cnLevelSelectionMode = "Ex....."
cnlevels=(/0/)

谢谢你。
我按照上面修改后,得到的图如下 QQ截图20190301194735.jpg
0线到时很明显了,但是其他等值线还是存在,请问该怎么设置呢?
密码修改失败请联系微信:mofangbao
发表于 2019-3-4 17:30:17 | 显示全部楼层
felin 发表于 2019-3-1 19:52
谢谢你。
我按照上面修改后,得到的图如下
0线到时很明显了,但是其他等值线还是存在,请问该怎么设置 ...

额,不然你试试res@cnLevels=0
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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