- 积分
- 5156
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-4-18
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
用wrfout作图,单画地面温度没问题,显示正常,但是叠加了风场跟气压场后温度显示不正常,分层特别明显,如下两张图:
这是我的脚本:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/cnmap/cnmap.ncl"
begin
;
; The WRF ARW input file.
a = addfile("wrfout_d02_1991-05-21_18.nc","r")
; We generate plots, but what kind do we prefer?
; type = "x11"
type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"plt_Surface1")
; gsn_define_colormap(wks,"WhBlGrYeRe")
; Set some basic resources
res = True
res@MainTitle = "REAL-TIME WRF"
pltres = True
mpres = True
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
res@TimeLabel = times(0) ; Set Valid time to use on plots
mpres@mpGridAndLimbOn = False
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need
slp = wrf_user_getvar(a,"PSFC",0) ; slp
wrf_smooth_2d( slp, 3 ) ; smooth slp
tc2 = wrf_user_getvar(a,"T2",0) ; T2 in Kelvin
; tc2 = tc2-273.16 ; T2 in C
u10 = wrf_user_getvar(a,"U10",0) ; u at 10 m, mass point
v10 = wrf_user_getvar(a,"V10",0) ; v at 10 m, mass point
tc2@description = "Surface Temperature"
tc2@units = "K"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Plotting options for T
opts = res
opts@cnFillOn = True
;res@ContourParameters = (/ 274., 302., 2./)
opts@gsnSpreadColorEnd = -3 ; End third from the last color in color map
;contour_tc = wrf_contour(a,wks,tc2,opts)
opts@cnLineColor = "Blue"
opts@gsnDraw = False ; Don't draw plots
opts@gsnFrame = False ; Don't advance frames
;res@cnLinesOn = False
contour_tc = wrf_contour(a,wks,tc2,opts)
;plot2 = wrf_map_overlays(a,wks,(/contour_tc/),pltres,mpres)
delete(opts)
; Plotting options for SLP
opts = res
opts@cnLineColor = "Black"
opts@cnHighLabelsOn = True
opts@cnLowLabelsOn = True
;opts@ContourParameters = (/ 900., 1100., 4. /)
opts@cnLineLabelBackgroundColor = -1
opts@gsnContourLineThicknessesScale = 2.0
contour_psl = wrf_contour(a,wks,slp,opts)
delete(opts)
; Plotting options for Wind Vectors
opts = res
opts@FieldTitle = "Wind" ; overwrite Field Title
; opts@NumVectors = 47 ; density of wind barbs
;opts@mpFillDrawOrder = "PostDraw"
opts@vcRefMagnitudeF = 4. ; make vectors larger
opts@vcRefLengthF = 0.032 ; ref vec length
;res@vcGlyphStyle = "WindBarb" ; select wind barbs
opts@vcMinDistanceF = 0.015 ; thin out vectors
opts@vcGlyphStyle = "CurlyVector"
opts@vcWindBarbColor = "Blue"
opts@vcMinDistanceF = 0.05
opts@vcRefAnnoString1On = True
opts@vcRefAnnoString1 = "4m/s"
vector = wrf_vector(a,wks,u10,v10,opts)
delete(opts)
; MAKE PLOTS
plot = wrf_map_overlays(a,wks,(/contour_tc,contour_psl,vector/),pltres,mpres)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end
对NCL还是处在摸索阶段,还请各位帮我找一下原因。
|
|