爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6471|回复: 0

对wrfout 做垂直速度的高度-纬度剖面图出错

[复制链接]

新浪微博达人勋

发表于 2018-5-22 21:13:22 | 显示全部楼层 |阅读模式
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)这一句出现问题,请问如何解决,谢谢大家

密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表