- 积分
- 4119
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-11-12
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
绘制假相当位温出现错误,求改正。{:soso_e105:}
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin;
a = addfile("/atm200/guest1/liuxr/WRFV3/run/wrfout_d02_2013-06-17_00:00:00.nc","r")
; type = "x11"
type = "pdf"
; type = "ps"
wks = gsn_open_wks(type,"plt_PressureLevel3")
gsn_define_colormap(wks,"wh-bl-gr-ye-re")
res = True
res@MainTitle = "REAL-TIME WRF"
res@Footer = False
pltres = True
mpres = True
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
mpres@mpGeophysicalLineThicknessF = 2.0
mpres@mpGridLineThicknessF = 2.0
mpres@mpLimbLineThicknessF = 2.0
mpres@mpNationalLineThicknessF = 2.0
mpres@mpUSStateLineThicknessF = 2.0
mpres@mpDataBaseVersion="MediumRes"
mpres@mpDataSetName="Earth..4"
mpres@mpOutlineSpecifiers="China:Provinces"
; What times and how many time steps are in the data set?
times = wrf_user_getvar(a,"times",-1) ; get all times in the file
ntimes = dimsizes(times) ; number of times in the file
pressure_levels = (/ 1000.,950.,900.,850.,800.,750.,700.,650.,600.,550.,500.,450.,400.,\
350.,300.,250.,200.,150.,100./) ; pressure levels to plot
nlevels = dimsizes(pressure_levels) ; number of pressure levels
do it = 0,ntimes-1,2 ; TIME LOOP
print("Working on time: " + times(it) )
res@TimeLabel = times(it) ;
tc = wrf_user_getvar(a,"tc",it) ; T in C
u = wrf_user_getvar(a,"ua",it) ; u averaged to mass points
v = wrf_user_getvar(a,"va",it) ; v averaged to mass points
p = wrf_user_getvar(a, "pressure",it) ;
rh = wrf_user_getvar(a,"rh",it) ; relative humidity;
z = wrf_user_getvar(a, "z",it)
do level = 0,nlevels-1 ; LOOP OVER LEVELS
pressure = pressure_levels(level)
tc_plane = wrf_user_intrp3d(tc,p,"h",pressure_levels,0.,False)
z_plane = wrf_user_intrp3d( z,p,"h",pressure_levels,0.,False)
rh_plane = wrf_user_intrp3d(rh,p,"h",pressure_levels,0.,False)
u_plane = wrf_user_intrp3d( u,p,"h",pressure_levels,0.,False)
p_plane = wrf_user_intrp3d( p,p,"h",pressure_levels,0.,False)
v_plane = wrf_user_intrp3d( v,p,"h",pressure_levels,0.,False)
spd = (u_plane*u_plane + v_plane*v_plane)^(0.5) ;
spd@description = "Wind Speed"
spd@units = "m/s"
u_plane = u_plane*1.94386 ; kts
v_plane = v_plane*1.94386 ; kts
u_plane@units = "kts"
v_plane@units = "kts"
tk=tc_plane+273.166
P = conform(tc_plane,pressure_levels ,0)
a1 = where(tk .gt. 263.0, 0.622*6.11*exp(17.26*(tk-273.16)/(tk-35.86)), \
0.622*6.11*exp(21.87*(tk-273.16)/(tk-7.66))) ;
b1= where(tk .gt. 263.0, P-0.278*exp(17.26*(tk-273.16)/(tk-35.86)),\
P-0.278*exp(21.87*(tk-273.16)/(tk-7.66))) ;
qs1=a1/b1
q1=qs1*rh_plane
e1=P*q1/100./(0.62197+q1/100.0)
tk1=55.0+2840.0/(3.5*log(tk)-log(e1)-4.805)
pot1=tk*(1000/P)^(0.2854*(1.0-0.28*q1/100.0))
ept1=pot1*exp(((3376./tk1)-2.54)*q1/100.0*(1.0+0.81*q1/100.0)) ;
ept1@description = "0se"
ept1@units = "K"
copy_VarCoords(tc_plane,ept1) ; assign coordinates
opts = res
opts@cnLineColor = "Red"
opts@ContourParameters = (/ 5.0 /)
opts@cnInfoLabelOrthogonalPosF = 0.07 ; offset second label information
opts@gsnContourLineThicknessesScale = 2.0
contour_ept1 = wrf_contour(a,wks,ept1,opts)
delete(opts)
opts_z@ContourParameters = (/ 60.0 /)
contour_height = wrf_contour(a,wks, z_plane,opts_z)
plot = wrf_map_overlays(a,wks,(/contour_ept1/),pltres,mpres)
delete(opts_z)
end do
end do
end
fatal:Number of dimensions in parameter (2) of (wrf_contour) is (3), (2) dimensions were expected
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 94 in file xing
这里出现错误,求改正求改正。 contour_ept1 = wrf_contour(a,wks,ept1,opts)
|
|