- 积分
- 905
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-8-14
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
前段时间画WRF输出结果的温度平流,我是参考气象家园的几个帖子画的,但是画完了却觉得不对劲儿,原因是温度平流不是我平时看天气图比较完整地一块块的,而是波浪状的,暖平流里竟然还夹杂着冷平流,令我百思不得其解,也许是因为模式的分辨率太高?5km也不高呀.....
ncl程序如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
a = addfile("wrfout.nc","r")
wks = gsn_open_wks(“pdf”,"temp_advent")
res = True
pltres = True
mpres = True
times = wrf_user_getvar(a,"times",-1)
ntimes = dimsizes(times)
do it = 0,ntimes-1,6
print("Working on time: " + times(it) )
res@TimeLabel = times(it)
; First get the variables we will need
tc = wrf_user_getvar(a,"tc",it) ; T in C
rh = wrf_user_getvar(a,"rh",it) ; relative humidity
u = wrf_user_getvar(a,"ua",it) ; 3D U at mass points
v = wrf_user_getvar(a,"va",it) ; 3D V at mass points
p = wrf_user_getvar(a,"p",it)
z = wrf_user_getvar(a,"z",it)
x = wrf_user_getvar(a,"XLAT",it)
y = wrf_user_getvar(a,"XLONG",it)
pressure = 850.
tc_p = wrf_user_intrp3d(tc,p,"h",pressure,0.,False)
z_p = wrf_user_intrp3d(z,p,"h",pressure,0.,False)
rh_p = wrf_user_intrp3d(rh,p,"h",pressure,0.,False)
u_p = wrf_user_intrp3d(u,p,"h",pressure,0.,False)
v_p = wrf_user_intrp3d(v,p,"h",pressure,0.,False)
dlon = (y(1,2)-y(1,1))*0.0174533
dTdX = new((/368,440/),typeof(tc_p),tc_p@_Fillvalue)
do nl = 0,368-1
dX =6378388.*cos(0.0174533*x(nl,1))*dlon
dTdX(nl:nl,:) = center_finite_diff_n(tc_p(nl:nl,:),dX,True,0,0)
end do
dlat = (x(2,1)-x(1,1))*0.0174533
dTdY = new((/368,440/),typeof(tc_p),tc_p@_Fillvalue)
do ml = 0,440-1
dY = 6378388.*dlat;
dTdY(:,ml:ml) = center_finite_diff_n(tc_p(:,ml:ml),dY,True,0,0)
end do
advT=-(u_p*dTdX+v_p*dTdY)
advT=smth9(advT,0.5,0.25,False)
advT@description = "Temperature advection"
; Plotting
opts = res
opts@cnFillOn = True
gsn_define_colormap(wks,"MPL_bwr")
opts@gsnSpreadColors=True
opts@cnLevelSelectionMode="ExplicitLevels"
opts@cnLevels=(/-0.0002,-0.0001,0,0.0001,0.0002/)
opts@cnFillColors=(/"Blue","cyan","lightcyan","lightpink","tomato","Red"/)
contour_tc = wrf_contour(a,wks,advT,opts)
delete(opts)
opts = res
opts@FieldTitle = "Wind"
opts@vcGlyphStyle ="CurlyVector"
opts@vcLineArrowThicknessF = 2.0
opts@NumVectors = 30
;opts@vcWindBarbScaleFactorF =2.5
opts@vcRefAnnoOn = True
opts@vcRefAnnoString1On = True
opts@vcRefAnnoString1 = "20m/s"
vector = wrf_vector(a,wks,u_p,v_p,opts)
delete(opts)
; MAKE PLOTS
plot = wrf_map_overlays(a,wks,(/contour_tc,vector/),pltres,mpres)
end do ; END OF TIME LOOP
end
画图结果如下:
心碎啊,心凉啊,哪位走过路过的好心大哥大姐大婶大爷给帮忙看看,是我的程序哪里出错了吗?
|
|