爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 13305|回复: 15

[作图] 如何在NCL画出的wrfout等值线图中加一个方框

[复制链接]
发表于 2015-4-5 18:15:35 | 显示全部楼层 |阅读模式

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

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

x
求教,我用
contour_tc=wrf_contour(wrf,wks,T,res)
plot=wrf_map_overlays(wrf,wks,(/contour_tc/),pltres,mpres)
画出温度的等值线图后,想在此图上面加一个方框,但是循环了
gsn_add_polyline(swks,plot,xpts(i:i+1),ypts(i:i+1),res)
后却没有成功。提示说
warning:gsnLineColor is not a valid resource in graphic_style at this time
warning:gsnLineThicknessF is not a valid resource in graphic_style at this time


请教各位大神都是用什么命令来加框的~~
密码修改失败请联系微信:mofangbao
发表于 2015-4-6 07:57:04 来自手机 | 显示全部楼层

回帖奖励 +1 金钱

gs,不是gsn!

评分

参与人数 1金钱 +3 收起 理由
1luochen1 + 3 很给力!

查看全部评分

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

使用道具 举报

 楼主| 发表于 2015-4-6 09:10:31 | 显示全部楼层

谢谢楼上,改了之后没有再出警告了,但是还是没有方框出来。。。
下面是我的程序,求楼上帮忙看看~~

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/wrf/WRFUserARW.ncl"
begin
wrf=addfile("/home/sunhw/wrfout-data/wrfout3/wrfout_d01_2011-12-01_00:00:00","r")
tt=wrf->T2
swks=gsn_open_wks("eps","wrfd01-tt")
res = True
pltres = True
mpres = True
res@cnFillOn = True
res@cnMonoFillPattern = True
res@cnMonoFillColor = False
res@cnLineDrawOrder="Predraw"
res@cnFillDrawOrder="Predraw"
contour_tc=wrf_contour(wrf,swks,tt(0,:,:),res)
plot=wrf_map_overlays(wrf,swks,(/contour_tc/),pltres,mpres)
xpts=(/107.0,110.0,110.0,107.0,107.0/)
ypts=(/41.0,41.0,43,43.0,41.0/)
resp=True
resp@gsLineColor="black"
resp@gsLineThicknessF=2.0
dum=new(4,graphic)
do i=0,3
        dum(i)=gsn_add_polyline(swks,plot,xpts(i:i+1),ypts(i:i+1),resp)
end do
end
密码修改失败请联系微信:mofangbao
发表于 2015-4-8 10:08:00 | 显示全部楼层

回帖奖励 +1 金钱

不能更赞了~~~~~~~~~~~~~~~~~~~~~~
密码修改失败请联系微信:mofangbao
发表于 2015-6-4 16:19:49 | 显示全部楼层

回帖奖励 +1 金钱

不知道楼主有没有解决?我觉得这个可能有用,讲了要设置哪些属性http://www.ncl.ucar.edu/Document ... _map_overlays.shtml
密码修改失败请联系微信:mofangbao
发表于 2015-6-4 18:32:36 | 显示全部楼层

回帖奖励 +1 金钱

不知道楼主有没有解决呢
密码修改失败请联系微信:mofangbao
发表于 2015-6-5 11:28:49 | 显示全部楼层

回帖奖励 +1 金钱

岗开始学习WRF ,功能很强大
密码修改失败请联系微信:mofangbao
发表于 2015-6-7 08:07:56 | 显示全部楼层
楼主解决了吗?分享一下吧
密码修改失败请联系微信:mofangbao
发表于 2015-10-8 14:54:37 | 显示全部楼层

回帖奖励 +1 金钱

{:eb502:}{:eb502:}{:eb502:}
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2016-3-16 15:15:52 | 显示全部楼层

回帖奖励 +1 金钱

密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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