- 积分
- 37
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-10-23
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
亲们,用ncl画wrf-out,24个小时循环出来的时间是乱的,每张图上面时间都是乱码,不知道怎么搞得,大家帮我看看file:///C:\Users\lenovo\AppData\Roaming\Tencent\Users\523380043\QQ\WinTemp\RichOle\HN6ZE2ZT6822BOYZIKP(KLH.jpg
下面是我的脚本
;*************************************************
;
;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ; Add special wrf functions
;************************************************
begin
;************************************************
; open file and read in data
;************************************************
; a = addfile("./wrfchemi_12z_d02.nc","r")
; a = addfile("./wrfinput_d01.nc","r")
a = addfile("./wrfout_d02_2014-01-06_12:00:00.nc","r")
;************************************************
; create plot
;************************************************
; type = "x11"
type = "pdf"
wks = gsn_open_wks(type ,"wrf-out-PM2.5") ; open a ps file
gsn_define_colormap(wks,"BlAqGrYeOrRe") ; choose colormap
res = True
res@MainTitle = "WRF-chem PM2.5"
res@Footer = False
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
do it=0,ntimes-1,1
print("Working on time: " + times(it) )
res@TimeLabel = times(it) ; Set Valid time to use on plots
ter= wrf_user_getvar(a,"PM2_5_DRY",it)
u10 = wrf_user_getvar(a,"U10",it) ; u at 10 m, mass point
v10 = wrf_user_getvar(a,"V10",it) ; v at 10 m, mass point
u10 = u10*1.94386 ; Turn wind into knots
v10 = v10*1.94386
u10@units = "kts"
v10@units = "kts"
; Plotting options for PM2.5
opts = res
opts@cnFillOn = True ; turn on color fill
opts@ContourParameters = (/ 20., 260., 20. /) ; Set the levels
contour = wrf_contour(a,wks,ter(0,:,:),opts)
delete(opts)
; Plotting options for Wind Vectors
opts = res
opts@FieldTitle = "10m Wind"
opts@NumVectors = 50
vector = wrf_vector(a,wks,u10,v10,opts)
delete(opts)
; opts = res
;opts@FieldTitle = "10m Wind"
; opts@gsnMaximize = True ; Maximize plot in frame
;opts@vcFillArrowsOn = True
; opts@vcRefMagnitudeF =10.
; opts@vcRefLengthF = 0.02
;opts@vcMinFracLengthF = 0.2
; opts@vcFillArrowEdgeColor = "white"
;opts@vcFillArrowFillColor = "black"
;opts@vcMinDistanceF =0.03 ;int
;vector = gsn_vector(wks,u10,v10,opts)
;delete(opts)
pltres = True ; Set plot options
mpres = True ; Set map options
mpres@mpGridAndLimbOn = True
mpres@mpGridLineDashPattern = 2.
mpres@mpGridLatSpacingF = 5.
mpres@mpGridLonSpacingF = 5.
mpres@mpGeophysicalLineColor = "Black"
mpres@mpGeophysicalLineThicknessF = 2
mpres@mpNationalLineColor = "Black"
mpres@mpNationalLineThicknessF = 2
mpres@mpGridLineColor = "Black"
mpres@mpGridLineThicknessF = 2
mpres@mpLimbLineColor = "Black"
mpres@mpLimbLineThicknessF = 2
mpres@mpPerimLineColor = "Black"
mpres@mpPerimLineThicknessF = 2
mpres@mpUSStateLineColor = "Black"
mpres@mpUSStateLineThicknessF = 2
mpres@mpDataBaseVersion = "MediumRes"
mpres@mpDataSetName = "Earth..4"
mpres@mpOutlineSpecifiers = (/"China:states"/)
mpres@tfDoNDCOverlay = True
;plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
plot = wrf_map_overlays(a,wks,(/contour,vector/),pltres,mpres)
;************************************************
end do
end
|
|