- 积分
- 1437
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-4-26
- 最后登录
- 1970-1-1

|
NCL
系统平台: |
|
问题截图: |
- |
问题概况: |
fatal:Argument type mismatch on argument (0) of (wrf_contour) can not coerce
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 82 in file W.ncl |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
2 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
脚本如下:
begin
;************************************************
; read in data
res = True
res@MainTitle = "REAL-TIME WRF"
res@Footer = False
pltres = True
;************************************************
fils = systemfunc ("ls /usr/test/QLwrfout/BMJwrfout_d02_2017*") ; file paths
f = addfiles (fils, "r")
ListSetType (f, "cat") ; concatenate (=default)
; read T from all files
; We generate plots, but what kind do we prefer?
; type = "x11"
type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"plt_CrossSection4")
ter=wrf_user_getvar(f,"wa",-1)
printVarSummary(ter)
xlat = wrf_user_getvar(f, "XLAT",0)
xlon=f[:]->XLONG
z=wrf_user_getvar(f,"z",-1)
locationij=wrf_user_ll_to_ij(f,(/107,108/),(/31,37/),True)
loc=locationij-1
WE=ter(744:2971,:,loc(1,0):loc(1,1),loc(0,0):loc(0,1))
plane = new(2,float)
plane = (/ 89, 62 /) ; pivot point is center of domain (x,y)
angle = 0.
X_plane = wrf_user_intrp2d(xlat,plane,angle,False)
X_desc = "latitude"
t0 = wrf_user_intrp3d(WE,z,"v",plane,angle,False)
t3=dim_avg_n_Wrap(t0,0)
t1=dim_avg_n_Wrap(t3,1)
printVarSummary(t1)
; get u data
;************************************************
; plotting parameters
;************************************************
;************************************************
dimsX = dimsizes(X_plane)
xmin = X_plane(0)
xmax = X_plane(dimsX(0)-1)
xspan = dimsX(0)-1
nx = floattoint( (xmax-xmin)/2 + 1)
zmin=0
zmax=max(z)
nz=floattoint( zmax/2 + 1)
res=True
res@sfYArray=z
res@sfXArray=xlat
; Options for XY Plots
opts_xy = res
opts_xy@tiXAxisString = X_desc
opts_xy@tiYAxisString = "Height (km)"
opts_xy@cnMissingValPerimOn = True
opts_xy@cnMissingValFillColor = 0
opts_xy@cnMissingValFillPattern = 11
opts_xy@tmXTOn = False
opts_xy@tmYROn = False
opts_xy@tmXBMode = "Explicit"
opts_xy@tmXBValues = fspan(0,xspan,nx) ; Create tick marks
opts_xy@tmXBLabels = sprintf("%.1f",fspan(xmin,xmax,nx)) ; Create labels
opts_xy@tmXBLabelFontHeightF = 0.015
opts_xy@tmYLMode = "Explicit"
opts_xy@tmYLLabels = sprintf("%.1f",fspan(zmin,zmax,nz)) ; Create labels
opts_xy@tiXAxisFontHeightF = 0.020
opts_xy@tiYAxisFontHeightF = 0.020
opts_xy@tmXBMajorLengthF = 0.02
opts_xy@tmYLMajorLengthF = 0.02
opts_xy@tmYLLabelFontHeightF = 0.015
opts_tc = opts_xy
opts_tc@cnInfoLabelZone = 1
opts_tc@cnInfoLabelSide = "Top"
opts_tc@cnInfoLabelPerimOn = True
opts_tc@cnInfoLabelOrthogonalPosF = -0.00005
contour_tc = wrf_contour(f,wks,t3,opts_tc)
opts_tc@ContourParameters = (/ 5. /)
contour_tc = wrf_contour(f[0],wks,t1,opts_tc)
plots = wrf_map_overlays(f[0],wks,(/contour/),plres,mpres)
end
错误提示:fatal:Argument type mismatch on argument (0) of (wrf_contour) can not coerce
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 82 in file W.ncl
contour_tc = wrf_contour(f[0],wks,t1,opts_tc)这一句出现问题,请问如何解决,谢谢大家
|
|