爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
123
返回列表 发新帖
楼主: 姚小娟

ncl画风场图如何去掉陆地上的值呢

[复制链接]

新浪微博达人勋

发表于 2016-3-1 19:51:15 | 显示全部楼层
井中月 发表于 2013-3-1 06:51
可以给陆地涂色,并设定为最后画,这样就自然把陆地上的盖住了

请问 res@cnFillDrawOrder      = "Predraw" 是这个吗?我用了这个但是陆地上还是有数据,这是为什么啊?大神,请指教
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-3-2 08:49:42 | 显示全部楼层
subtropical 发表于 2016-3-1 19:51
请问 res@cnFillDrawOrder      = "Predraw" 是这个吗?我用了这个但是陆地上还是有数据,这是为什么啊? ...

http://ncl.ucar.edu/Applications/mask.shtml
第二个例子
这里面其它例子也可以参考
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-3-2 09:33:02 | 显示全部楼层
多谢分享~~~
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2016-3-2 18:23:20 | 显示全部楼层
井中月 发表于 2016-3-2 08:49
http://ncl.ucar.edu/Applications/mask.shtml
第二个例子
这里面其它例子也可以参考

谢谢你,我已经解决了,虽然不是用的这个方法
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-3-2 18:23:31 | 显示全部楼层
井中月 发表于 2016-3-2 08:49
http://ncl.ucar.edu/Applications/mask.shtml
第二个例子
这里面其它例子也可以参考

谢谢你,我已经解决了,虽然不是用的这个方法
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-9-11 21:01:50 | 显示全部楼层
我想只画海洋部分
f1=addfile("e:/data/slp.mon.mean.nc","r")
slp=f1->slp(0:827,8:28,40:100)
a    = addfile("E:\cygwin\app\ncl\lib\ncarg\data\cdf\landsea.nc","r")
  lsdata = a->LSMASK
lsm = landsea_mask(lsdata,slp&lat,slp&lon)
  slp = mask(slp,conform(slp,lsm,(/1,2/)).ge.0,False)
printVarSummary(slp)
wks = gsn_open_wks("eps","mask")            ; send graphics to PNG file
  gsn_define_colormap(wks,"wh-bl-gr-ye-re")
  
   res2 = True
    res2@gsnAddCyclic          = False
  res2@mpFillOn         = False                ; do not color-fill the map
  res2@gsnTickMarksOn   = False                ; turn off all tick marks
  res2@mpPerimOn        = True                 ; turn the map perimeter on
  res2@mpPerimDrawOrder = "PostDraw"           ; draw the map perimeter last
  res2@gsnDraw          = False                ; do not draw the plot
  res2@gsnFrame         = False                ; do not advance the frame
  res2@cnLinesOn        = False                ; turn off the contour lines
  res2@cnLineLabelsOn   = False                ; turn off the contour line labels
  res2@cnFillOn         = True                 ; turn on color fill
  res2@cnLinesOn        = False                ; turn the contour lines off
  res2@gsnCenterString  = "TS Field (ocean-masked)"
  res2@gsnLeftString    = ""
  plot = gsn_csm_contour_map_ce(wks,slp(0,:,:),res2)
  draw(plot)
我是根据之前landsea_mask函数里的例子处理的数据,但是出现了
warning:ContourPlotInitialize: no valid values in scalar field; ContourPlot not possible:[errno=1101]
但是想问一下,究竟是哪里不对,哪位大神能指点一下,或者帮忙给我几个可以参考的例子
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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