- 积分
- 113
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-4-26
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请教各位大神,我在网上下载了一个ncl处理wrfout脚本,都没怎么修改,为什么画出来的图坐标刻度都不显示呢?求指导求帮助;*************************************************
; WRF: panel three different variables at the same time step
;************************************************
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/WRF_contributed.ncl"
begin
;************************************************
; open file and read in data
;************************************************
f = addfile("wrfout_d01_000000.nc", "r")
;************************************************
; Read character variable Times; Convert to string for plots
; Read vertical coordinate for plot labels
;************************************************
times = chartostring(f->Times) ; built-in function
znu = f->ZNU(0,:) ; (Time, bottom_top)
;************************************************
; Read perturbation geopotential, pressure, water vapor
; at all times and levels
;************************************************
ph = f->PH ; (Time, bottom_top, south_north, west_east)
p = f->P ; (Time, bottom_top, south_north, west_east)
q2 = f->Q2 ; (Time, south_north, west_east )
;************************************************
; create plots
;************************************************
wks = gsn_open_wks("ps" ,"WRF_lc") ; ps,pdf,x11,ncgm,eps
gsn_define_colormap(wks ,"BlAqGrYeOrReVi200"); choose colormap
res = True ; plot mods desired
;;res@gsnMaximize = True ; uncomment to maximize size
res@gsnSpreadColors = True ; use full range of colormap
res@cnFillOn = True ; color plot desired
res@cnLinesOn = False ; turn off contour lines
res@cnLineLabelsOn = False ; turn off contour labels
res@lbLabelAutoStride = True ; let NCL figure lb stride
;************************************************
; Use WRF_contributed procedure to set map resources
;************************************************
WRF_map_c(f,res,0) ; set map resources
;************************************************
; set True for native mapping (faster plotting)
; set to False othewise
;************************************************
res@tfDoNDCOverlay = True
;************************************************
; associate the 2-dimensional coordinates to variables for plotting
; only if res@tfDoNDCOverlay=False
;************************************************
if (.not.res@tfDoNDCOverlay) then
lat2d = f->XLAT(0,:,:) ; need for map limits
lon2d = f->XLONG(0,:,:)
p@lat2d = lat2d
p@lon2d = lon2d
ph@lat2d = lat2d
ph@lon2d = lon2d
q2@lat2d = lat2d
q2@lon2d = lon2d
end if
;************************************************
; allocate array for 3 plots
;************************************************
plts = new (3,"graphic")
;************************************************
; Specify (arbitrarily chosen) subscripts
; This could also be done in a do loop or explicitly specified
;************************************************
nt = 24 ; last time step
kl = 3
;************************************************
; Tell NCL not to draw or advance frame for individual plots
;************************************************
res@gsnDraw = False ; (a) do not draw
res@gsnFrame = False ; (b) do not advance 'frame'
res@gsnLeftString = ph@description+": znu="+znu(kl)
plts(0) = gsn_csm_contour_map(wks,ph(nt,kl,:,:),res)
res@gsnLeftString = p@description+": znu="+znu(kl)
plts(1) = gsn_csm_contour_map(wks,p(nt,kl,:,:),res)
delete(res@gsnLeftString)
plts(2) = gsn_csm_contour_map(wks,q2(nt,:,:),res)
;************************************************
; create panel: panel plots have their own set of resources
;************************************************
resP = True ; modify the panel plot
resP@txString = f@TITLE+": "+times(nt)
resP@gsnMaximize = True ; maximize panel area
resP@gsnPanelRowSpec = True ; specify 1 top, 2 lower level
gsn_panel(wks,plts,(/1,2/),resP) ; now draw as one plot
end
|
|