- 积分
- 7953
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-12-27
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
出现的错误是:fatal:Dimension (Vertical) of (qcloud) does not have an associated coordinate variable
代码如下:
begin
;---Open WRF output file
filename = "wrfout_d03_2013-07-29_09_00_00"
a = addfile(filename,"r")
;---Read temperature at first time step
time=0
qcl = wrf_user_getvar(a,"QCLOUD",time)
z = wrf_user_getvar(a, "height",time) ; grid point height
p = wrf_user_getvar(a, "pressure",time) ; total pressure
dimsrh = dimsizes(qcl)
plane = (/ dimsrh(2)/2, dimsrh(1)/2 /) ; pivot point is center of domain
; Extract data on a W-E cross section that runs through "plane"
; Interpolate to height
qcloud = wrf_user_intrp3d(qcl,z,"v",plane,90.0,False)
wks = gsn_open_wks("pdf","wrf_gsn")
;---Resources for filled contour plot
res = True ; plot mods desired
res@cnLevelSelectionMode = "ManualLevels" ; manually select levels
res@cnLevelSpacingF = 5.0 ; contour spacing
res@cnMinLevelValF = -50. ; min level
res@cnMaxLevelValF = 50. ; max level
res@cnLineLabelsOn = True ; turn on line labels
res@cnFillOn = True ; turn on color fill
res@cnFillPalette = "BlWhRe" ; choose colormap
res@lbOrientation = "Vertical"
res@tiMainString = filename
;---Necessary for contours to be overlaid correctly on WRF projection
;res@tfDoNDCOverlay = True
;res@gsnAddCyclic = False
;---Set map resources based on projection on WRF output file
res = wrf_map_resources(a,res)
;---Call plotting routine which draws contours over a map
;nl = 5 ; bottomost level
;plot = gsn_csm_contour_map(wks,qcloud(nl,:,:),res)
plot = gsn_csm_pres_hgt(wks,qcloud({29.8},:),res)
end
请问大神们错在哪里了?
|
|