- 积分
- 808
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-10-25
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
begin
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;open a file
datadir = "~/shuju/Metgrid/"
filenames = systemfunc("ls -1 "+datadir+"met_em.d01*")
nfilenames = dimsizes(filenames)
;;;;;;;;;;;;;;;;;;;;;-----open a workstation
type = "x11"
;type = "ncgm"
;type = "ps"
;type = "pdf"
wks = gsn_open_wks(type,"overlayrs")
;------------set some basic plot resources
res = True
res@Footer = False
res@gsnframe = False
pltres = True
mpres = True
;--------get variables
do i=0,nfilenames-1
a = addfile(filenames(i),"r")
if(isfilevar(a,"slp") .and. isfilevar(a,"U10") .and. isfilevar(a,"V10") .and. isfilevar(a,"T2"))
slp = wrf_user_getvar(a,"slp",0)
u10 = wrf_user_getvar(a,"U10",0)
v10 = wrf_user_getvar(a,"V10",0)
u10 = u10*1.94386
v10 = v10*1.94386
u10@units = "kts"
v10@units = "kts"
tc2 = wrf_user_getvar(a,"T2",0)
tc2 = tc2-273.16
tf2 = 1.8*tc2+32.
tf2@units = "F"
;;;;;;;;;;;;;;;;;;;set some special plotting resources for some variables
;-----------for SLP
opts = res
opts@FieldTitle = "Sea Level Temperature"
opts@cnLinesOn = True
opts@cnLineColor = "Blue"
opts@cnLineLabelsOn = True
opts@gsnContourLineThicknessesScale = 2.0
opts@cnLineLabelBackgroundColor = -1
opts@cnHighLabelsOn = True
opts@cnHighLabelFontThicknessF = 2.0
opts@cnLowLabelsOn = True
opts@cnLowLabelFontThicknessF = 2.0
opts@ContourParameters = (/900.,1100.,4./)
contour_SLP = wrf_contour(a,wks,slp,opts)
delete (opts)
;----------for wind vectors
opts = res
opts@FieldTitle = "wind"
opts@NumVectors = 50
vector = wrf_vector(a,wks,u10,v10,opts)
delete(opts)
;;;---------for T2
opts = res
opts@cnFillOn = True
opts@FieldTitle = "Surface Temperature"
contour_tf2 = wrf_contour(a,wks,tf2,opts)
delete(opts)
plot = wrf_map_overlays(a,wks,(/contour_SLP,vector,contour_tf2/),pltres,mpres)
end if
frame(wks)
end do
end
|
|