想用ncl画wrfout的降水量图,得一个3*3的区域平均的降水量的值,然后逐小时输出一个值来做一个折线图
但就是在读取这个3*3的区域的时候没法读取
下面是我的程序
begin
a = addfile("../wrfout_d02_2015-08-18_00:00:00","r")
rainc = wrf_user_getvar(a,"RAINC",-1)
rainc@lat2d = wrf_user_getvar(a,"XLAT",0) ; latitude/longitude
rainc@lon2d = wrf_user_getvar(a,"XLONG",0) ; required for plotting
rainnc = wrf_user_getvar(a,"RAINNC",-1)
rainnc@lat2d = wrf_user_getvar(a,"XLAT",0) ; latitude/longitude
rainnc@lon2d = wrf_user_getvar(a,"XLONG",0) ; required for plotting
j = 0
X = new(24, float)
do i = 23,47
raincj = rainc(i+1,{28:31},{93:96})-rainc(i,{28:31},{93:96})
rainncj = rainnc(i+1,{28:31},{93:96}) -rainnc(i,{28:31},{93:96})
rainTot = raincj + rainncj
n = avg(rainTot)
X(j) = n
j=j+1
end do
res = True
wks = gsn_open_wks("png","zxt")
plot = gsn_csm_xy(wks,(/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24/),X,res)
end
这是报的错
fatal:Dimension (west_east) of (rainc) does not have an associated coordinate variable