爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 8888|回复: 2

[作图] NCL中条件语句产生缺失值,NCL无法确定分支。。。

[复制链接]
发表于 2017-11-4 12:18:15 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
如题有大神知道吗?附上运行的ncl脚本。

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/wrf/WRFUserARW.ncl"
begin
a = addfile("./wrfout_d03_2013-04-05_12:00:00.nc","r")
wks =gsn_open_wks("png","plt_HeightLevel")
res = True
res@MainTitle = "REAL-TIME WRF"
res@Footer = False
pltres = True
mpres = True
times =wrf_user_getvar(a,"times",-1)
ntimes = dimsizes(times)
height_levels = (/250.,2000./)
nlevels = dimsizes(height_levels)
do it = 0,ntimes-1,2
       print("Workingon time:" + times(it))
       res@TimeLabel= times(it)
       tc= wrf_user_getvar(a,"tc",it)
       u  = wrf_user_getvar(a,"ua",it)
       v  = wrf_user_getvar(a,"va",it)
       p  = wrf_user_getvar(a,"pressure",it)
       z  = wrf_user_getvar(a,"z",it)
       rh= wrf_user_getvar(a,"rh",it)
       dolevel = 0,nlevels-1
              height= height_levels(level)
              
              p_plane  = wrf_user_intrp3d(p,z,"h",height,0.,False)
              tc_plane= wrf_user_intrp3d(tc,z,"h",height,0.,False)
              rh_plane= wrf_user_intrp3d(rh,z,"h",height,0.,False)
              u_plane  = wrf_user_intrp3d( u,z,"h",height,0.,False)
              v_plane  = wrf_user_intrp3d(v,z,"h",height,0.,False)
              u_plane= u_plane*1.94386
              v_plane= v_plane*1.94386
              u_plane@units= "kts"
              v_plane@units= "kts"
              opts= res
              opts@cnLineColor= "Blue"
              opts@gsnContourLineThicknessesScale= 3.0
              contour_tc= wrf_contour(a,wks,tc_plane,opts)
              delete(opts)
              opts= res
              opts@cnLineColor= "Blue"
              opts@gsnContourLineThicknessesScale= 3.0
              contour_p= wrf_contour(a,wks,p_plane,opts)
              delete(opts)
              opts= res
              opts@cnFillOn= True
              opts@ContourParameters= (/10.,90.,10./)
              opts@cnFillColors=(/"White","White","White","White","Chartreuse","Green","Green3","Green4"/)
              contour_rh= wrf_contour(a,wks,rh_plane,opts)
              delete(opts)
              opts= res
              opts@FieldTitle= "Wind"
              opts@NumVectors= 47
              vector= wrf_vector(a,wks,u_plane,v_plane,opts)
              delete(opts)
              plot=wrf_map_overlays(a,wks,(/contour_rh,contour_tc,contour_p,vector/),pltres,mpres)
              
       enddo
end do
end

Screenshot from 2017-11-06 10-45-29.png
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2017-11-4 12:19:10 | 显示全部楼层
自顶
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2021-7-19 22:24:05 | 显示全部楼层
遇到了同样的问题,楼主解决了吗
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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