- 积分
- 105
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-3-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请教各位大神,我用ncl画OLR随时间的变化趋势图,怎么在图上添加趋势线呢?
下面是我的脚本和画出的图
各位大神帮忙看一下呀
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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/wind_rose.ncl"
begin
f=addfile("/yhhome/home/wangchendi/olr/olr.day.mean.nc","r")
print(f)
lat = f->lat
lon = f->lon
time = f->time
tt = time/24/365
olr = f->olr
olr1 = olr*0.01+327.65
copy_VarCoords(olr,olr1)
printMinMax(olr1,False)
wtype = "png"
wtype@wkWidth = 3000
wtype@wkHeight = 3000
wks = gsn_open_wks(wtype,"beijing")
gsn_define_colormap(wks,"rainbow")
res = True
res@trYMinF= -34000
res@trYMaxF= -2000
res@trXMinF= min(tt)
res@trXMaxF= max(tt)
res@vpWidthF= 0.7
res@vpHeightF= 0.5
res@tmXBMode="Explicit"
res@tmXBValues= (/2004.0,2006.0,2008.0,2010.0,2012.0,2014.0/)
res@tmXBLabels= ispan(2004,2014,2)
res@tiMainString= "Variation of the OLR in Beijing"
res@tiXAxisString= "year"
res@tiYAxisString= "OLR (w/m^2)"
plot = gsn_csm_xy(wks,tt,olr(:,{39.9},{116.3}),res)
end
|
|