- 积分
- 810
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-9-23
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我用ncl把wrf_out文件的每个时刻的气压图都画出来,每出一个图就要修改一次脚本,这样很费时间,请问有没有什么命令可以批量出图呢,求大神指导如何修改下脚本,不胜感激。以下是我的脚本(每出一张图就要修改脚本的那两行红色字体,有没有什么改进方法):
; load functions and procedures
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
; WRF ARW input file (NOTE, your wrfout file does not need the .nc,
; but NCL needs it so make sure to add it in the line below)
a = addfile("wrfout_d01_1999-09-17_00:00:00.nc","r")
; Output on screen (type="x11"). Output will be called "plt_Surface1"
type = "png"
wks = gsn_open_wks(type,"1700")
; Set basic resources
res = True
res@MainTitle = "REAL-TIME WRF" ; Give plot a main title
res@Footer = False ; Set Footers off
pltres = True ; Plotting resources
mpres = True ; Map resources
;---------------------------------------------------------------
times = wrf_user_getvar(a,"times",-1) ; get all times in the file
ntimes = dimsizes(times) ; number of times in the file
it = 0 ; only interested in first time
res@TimeLabel = times(it) ; keep some time information
;---------------------------------------------------------------
; Get variables
slp = wrf_user_getvar(a,"slp",it) ;Get slp
wrf_smooth_2d( slp, 3 ) ; Smooth slp
; Plotting options for SLP
opts = res ; Add basic resources
opts@cnLineColor = "Blue" ; Set line color
opts@cnHighLabelsOn = True ; Set labels
opts@cnLowLabelsOn = True
opts@ContourParameters = (/ 900.,1100.,4./) ; Contour intervals
contour_psl = wrf_contour(a,wks,slp,opts) ; Create plot
delete(opts)
plot = wrf_map_overlays(a,wks, \
(/contour_psl/),pltres,mpres)
|
|