- 积分
- 811
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-9-7
- 最后登录
- 1970-1-1
|
发表于 2017-5-24 13:06:27
|
显示全部楼层
脚本本身比较简单。您看下呢~
; ===============================================
; h_time_4.ncl
; ===============================================
;
; These files are loaded by default in NCL V6.2.0 and newer
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/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
fils1 = systemfunc("ls /home/h/wrfchemoutput/tmp/wrfout_d02_*")
; fils1 = systemfunc("ls /home/h/wrfchemoutput/tmp/wrfout_d02_*")
a = addfiles(fils1,"r") ;wrfout file
;-----------------------------------------------------------------------
ListSetType(a,"cat")
v = wrf_user_getvar(a,"PM2_5_DRY",-1) ; get tc for all times
printVarSummary(v)
dim = dimsizes(v)
data = v(:,:,:,50)
printVarSummary(data)
slice = data(south_north|0, bottom_top|:,Time|:) ; trick to copy meta data
wks = gsn_open_wks ("png", "h_time") ; send graphics to PNG file
res = True ; plot mods desired
res@cnFillOn = True ; turn on color
; res@cnFillPalette = "BlWhRe" ; set color map
res@cnLinesOn = False ; no contour lines
res@cnLevelSelectionMode = "ExplicitLevels"
tres@cnLevels = (/10,25, 50, 75, 100, 125, 150,200/)
tres@cnFillPalette = "MPL_jet"
res@tmYRTickSpacingF = 1 ;
slice!0 = "lev"
slice!1 = "time"
; print(slice)
printVarSummary(slice)
print("--------------------------------------")
print(slice(lev|:, time|0))
print("--------------------------------------")
; terra = gsn_csm_contour (wks,slice,res)
plot = gsn_csm_pres_hgt (wks,slice,res)
end |
|