- 积分
- 810
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-9-23
- 最后登录
- 1970-1-1

|
NCL
系统平台: |
|
问题截图: |
- |
问题概况: |
我引用大神的脚本,改了自己的参数后报错 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
7 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 15918702650 于 2017-7-5 16:43 编辑
以下是我改过的的脚本:出错是在27行,红色字体部分(小弟在这个地方已经停留两个星期了,望大神指导):
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
a = addfile("wrfout_d01_1999-09-16_00_00_00.nc","r")
type = "pdf"
wks = gsn_open_wks(type,"case")
res = True
res@MainTitie = "REAL-TIME WRF"
res@Footer = False
pltres = True
mpres = True
;times = wrf_user_getvar(a,"times",-1)
;ntimes = dimsizes(times)
;it = 0
;res@TimeLabel = times(it)
;slp = wrf_user_getvar(a,"slp",it)
;wrf_smooth_2d(slp,3)
;t2 = wrf_user_getvar(a,"T2",it)
;tc2 = t2-273.16
;tf2 = 1.8*tc2+32
;tf2@description = "Surface Temperature"
;tf2@units = "F"
FirstTime = True
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
it=6
print("Working on time: " + times(it) )
u10 = wrf_user_getvar(a,"U10",it)
v10 = wrf_user_getvar(a,"V10",it)
u10 = u10*1.94386
v10 = v10*1.94386
u10@units = "kts"
v10@units = "kts"
WindVeo = sqrt(u10*u10+v10*v10)
opts = res
opts@cnFillOn = True
opts@ContourParameters=(/0.,12.,5./)
opts@gsnSpreadColorEnd = -3
contour_WindVeo = wrf_contour(a,wks,WindVeo,opts)
delete(opts)
;opts = res
;opts@cnFillOn = True
;opts@ContourParameters=(/-20.,90.,5./)
;opts@gsnSpreadColorEnd = -3
;contour_tc = wrf_contour(a,wks,tf2,opts)
;delete(opts)
;opts = res
;opts@cnLineColor = "Blue"
;opts@cnHighLabelsOn = True
;opts@ContourParameters = (/900.,1100.,4./)
;contour_psl = wrf_contour(a,wks,slp,opts)
;delete(opts)
opts = res
opts@FieldTitle = "Winds"
opts@NumVectors = 47
vector = wrf_vector(a,wks,u10,v10,opts)
delete(opts)
;plot = wrf_map_overlays(a,wks,(/contour_tc,contour_psl,vector/),pltres,mpres)
plot = wrf_map_overlays(a,wks,(/contour_WindVeo,vector/),pltres,mpres)
end
|
-
|