- 积分
- 510
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-6-28
- 最后登录
- 1970-1-1
|
发表于 2015-3-26 08:09:02
|
显示全部楼层
本帖最后由 dcx 于 2015-3-26 08:14 编辑
图片1
楼主
你好,我现在遇到设置经纬度的问题,wrfout.nc画图,在没有设置经纬度时出来的图是第一个图。设置经纬度后成了这样第二个图..请教楼主这是怎么回事啊。谢谢。这是我的ncl
; Example script to produce dbz plots for a WRF real-data run,
; with the ARW coordinate dynamics option.
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"
begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
a= addfile("/public/home/chun/Program/wrf3.5.1/WRFV3/test/em_real/2106/wrfout_d04_2014-07-23_06:00:00.nc","r")
lat2d = a->XLAT(0,:,:)
lon2d = a->XLONG(0,:,:)
type = "png"
wks = gsn_open_wks(type,"wrfoutdbz2210")
colors= (/"white","black","white",\
"cyan1","cyan2","cornflowerblue","green1","green2",\
"green3","yellow","darkgoldenrod1","darkgoldenrod3",\
"firebrick1","firebrick3", "firebrick4","darkorchid1"/)
gsn_define_colormap(wks, colors)
; Set some basic resources
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
do it = 2,ntimes-59; TIME LOOP
print("Working on time: " + times(it) )
mdbz = wrf_user_getvar(a,"mdbz",it)
dbz = wrf_user_getvar(a,"dbz",it)
dbz@lat2d = lat2d
dbz@lon2d = lon2d
res = True
res@TimeLabel = times(it) ; Set Valid time to use on plots
res@MainTitle = "WRFout reflectivity"
res@gsnDraw = False
res@gsnFrame = False
pltres = True
mpres = True
opts = res
opts@cnFillOn = True
opts@ContourParameters = (/ 0., 60., 5./)
mpLimitMode="Corners"
mpres@mpLeftCornerLatF = 20.
mpres@mpRightCornerLatF = 30.
mpres@mpLeftCornerLonF = 115.
mpres@mpRightCornerLonF = 125.
mpProjection = "LambertConformal"
mpres@tfDoNDCOverlay = True
; mpres@mpMinLatF = 20
; mpres@mpMaxLatF = 30
;mpres@mpMinLonF = 115
;mpres@mpMaxLonF = 125
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
;mpres@mpUSStateLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
mpres@mpGeophysicalLineThicknessF = 2.0
mpres@mpNationalLineThicknessF = 1.5
mpres@mpUSStateLineThicknessF = 1.5
mpres@mpUSStateLineColor = "grey30"
mpres@mpGeophysicalLineColor = "grey30"
mpres@mpDataSetName = "Earth..4"
mpres@mpDataBaseVersion = "MediumRes"
mpres@mpOutlineOn = True
mpres@mpOutlineSpecifiers = (/"China:states","Taiwan"/)
contour = wrf_contour(a,wks,dbz(1,:,:),opts) ; plot only lowest level
plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
end do ; END OF TIME LOOP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end
|
|