- 积分
- 746
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-5-17
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
今天在用NCL画图是想做这样一件事:全球72×36的A气候资料,已shaded在全球地图上,现在想在图上再叠加一个变量B,让绝对值大于0.5的B值画在图上。在官网找半天也没找天(原谅我是一个初学者,刚学第二天。。。痛苦)。后来退而求其次让小于-0.5与大于0.5的部分画阴影,在论坛里找到了ShadeLtGtContour,可是用的时候cgwin里面说ShadeLtGtContour未定义。我用的应该是6.2.1版本。错误如下:
fatal:Undefined identifier: (ShadeLtGtContour) is undefined, can't continue
fatal:["Execute.c":8578]:Execute: Error occurred at or near line 36 in file nianfenzhihou.ncl 我在官网看见说ShadeLtGtContour过时了,是不是这个原因呢?
我写的程序如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
f=addfile("C:/MDVST1901_2014/NAOzhihou/MDVSTyuNAOzhihouxiangguan.nc","r")
tzhihou=f->tzhihou
jianyan=f->jianyan
tzhihouxishu=f->tzhihouxishu
tzhihou=mask(tzhihou,jianyan.gt.0.05,False)
tzhihouxishu=mask(tzhihouxishu,jianyan.gt.0.05,False)
wks=gsn_open_wks("png","C:/MDVST1901_2014/NAOzhihou/nianfen")
gsn_define_colormap(wks,"rainbow")
res=True
res@gsnFrame=False
res@mpMinLatF =-60
res@cnLevelSelectionMode="ManualLevels"
res@cnMinLevelValF=13 ;滞后年份最小值
res@cnMaxLevelValF=30 ;滞后年份最大值
res@cnLevelSpacingF=1 ;间隔
res@gsnSpreadColorStart=14 ;起始于color index 14
res@cnFillOn=True;打开等值线颜色
res@cnLinesOn=False;关闭等值线线条
res@lbBoxLinesOn=False;关闭lbar box线条
res@gsnLeftString = "" ; turn off subtitles
res@gsnRightString = ""
res@gsnCenterString = ""
plot1=gsn_csm_contour_map(wks,tzhihou,res)
;-----显著性检验-----
res2=True
res2@cnFillOn=True
res2@cnLinesOn=True
res2@cnLevelSpacingF = 0.05
res2@gsnLeftString = "" ; turn off subtitles
res2@gsnRightString = ""
res2@gsnCenterString = ""
plot2=gsn_csm_contour_map(wks,tzhihouxishu,res2)
plot2=ShadeLtGtContour(plot2,-0.5,8,0.9,5)
draw(plot2)
overlay(plot1,plot2)
frame(wks)
end
求大神帮助呀!!!
|
|