- 积分
- 181
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-11-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
; mple script to produce dbz plots for a WRF real-data run,
; with the ARW coordinate dynamics option.
; November 2008
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
a = addfile("/public/home/nwpstudy/work/ye/yj/work2/wrfout_d01_2018-06-22_09:00:00.nc","r")
; We generate plots, but what kind do we prefer?
type = "png"
; type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"plt_dbz18")
gsn_define_colormap(wks,"radar")
;gsn_define_colormap(wks,"prcp_1")
; Set some basic resources
res = True
res@MainTitle = "REAL-TIME WRF"
pltres = True
mpres = True
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Which times and how many time steps are in the data set?
lat = wrf_user_getvar(a,"XLAT",-1)
lon = wrf_user_getvar(a,"XLONG",-1)
times = wrf_user_getvar(a,"times",-1) ; get all times in the file
ntimes = dimsizes(times) ; number of times in the file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; do it = 1,ntimes-1 ; TIME LOOP
it = 0 ;
print("Working on time: " + times(it) )
res@TimeLabel = times(it) ; Set Valid time to use on plots
; First get the variables we will need
; Both dbz and mdbz will be calculated using intercept parameters
; for rain, snow, and graupel, which are consistent with
; Thompson, Rasmussen, and Manning (2004, Monthly Weather Review,
; Vol. 132, No. 2, pp. 519-542.)
; First "1" in wrf_user_getvar
; Frozen particles that are at a temperature above freezing will be
; assumed to scatter as a liquid particle.
; Second "1" in wrf_user_getvar
aa = wrf_user_getvar(a,(/"mdbz"/),it)
bb = wrf_user_getvar(a,(/"dbz"/),it)
print(max(bb))
printVarSummary(aa)
printVarSummary(bb)
;cc = wrf_ll_to_ij(18,107,res)
;dd = wrf_ll_to_ij(26,115,res)
; print(cc)
; print(dd)
; latmin = cc(1)
;latmax = dd(1)
;lonmin = cc(2)
;lonmax = dd(2)
;mdbz = mdbzz(18:26,107:115)
;dbz = dbzz(:,18:26,107:115)
;bb = wrf_user_getvar(a,"dbz",-1)
mdbz=aa ;({latmin:latmax},{lonmin:lonmax})
dbz =bb ;({latmin:latmax},{lonmin:lonmax})
; mdbz=aa(18:26,107:115)
;dbz= bb(it,18:26,107:115)
;printVarSummary(mdbz)
;printVarSummary(dbz)
;;;;;;;;;;;;以下为设置中国省界的代码
mpres@mpMinLatF = 18
mpres@mpMaxLatF = 26
mpres@mpMinLonF = 107
mpres@mpMaxLonF = 115
; mpres@mpDataBaseVersion="MediumRes"
mpres@mpDataBaseVersion="Ncarg4_1"
mpres@mpOutlineOn= True
mpres@mpDataSetName="Earth..4"
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
mpres@mpUSStateLineThicknessF = 2
mpres@mpNationalLineThicknessF = 2
mpres@mpGeophysicalLineThicknessF = 2
mpres@mpUSStateLineColor="Black"
mpres@mpOutlineSpecifiers="China:states"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
opts = res
opts@cnFillOn = True
opts@ContourParameters = (/ 5., 75.,5./)
contour = wrf_contour(a,wks,dbz(1,:,:),opts) ; plot only lowest level
plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
contour = wrf_contour(a,wks,mdbz,opts)
plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
; end do ; END OF TIME LOOP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
-
观测的
-
wrfout
|