- 积分
- 210
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-1-30
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请教下
想用NCL画区域图 30-50N 100-125E的区域的图
用NCL画mdbz的时候设置了绘图区域后
res@mpMinLatF = 10
res@mpMaxLatF = 30
res@mpMinLonF = 130
; res@mpMaxLonF = 150
图形与经纬度不符了 感觉就地图变量 变量没有变 怎么破啊???
正常应该这样的
file:///E:\Photoshop_CS2_官方简体中文原版\Tencent\QQ\Users\657510711\Image\DES$)D0ER}KCDK7FPAM1_YL.jpg file:///E:\Photoshop_CS2_官方简体中文原版\Tencent\QQ\Users\657510711\Image\DES$)D0ER}KCDK7FPAM1_YL.jpg
结果设置了绘图区域后变这样了[img]file:///E:\Photoshop_CS2_官方简体中文原版\Tencent\QQ\Users\657510711\Image\8ES7B3O[$MM$WI4QG{HKYYK.jpg[/img]
付脚本如下:
; Example 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("./wrfout_d01_2012-07-20_12:00:00.ctl.nc","r")
; We generate plots, but what kind do we prefer?
; type = "x11"
type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"mdbz")
gsn_define_colormap(wks,"WhViBlGrYeOrReWh")
; gsn_define_colormap(wks,"Rainbow")
; Set some basic resources
res = True
res@MainTitle = "REAL-TIME WRF"
res@mpDataBaseVersion="MediumRes"
res@mpDataSetName="Earth..4"
res@mpOutlineSpecifiers=(/"China","Fujian","Guandong","Jiangxi","Zhejiang"/)
res@mpUSStateLineThicknessF = 2
res@mpUSStateLineColor="Black"
res@mpOceanFillColor = 1 ; array index in color map
res@mpLandFillColor = 17 ; for land, ocean, and inland h20
res@mpInlandWaterFillColor = 9
res@mpOutlineOn = True ; turn on map outlines
; res@mpGeophysicalLineColor = "Gray21" ; map outline color
res@mpLimitMode = "LatLon" ; select subregion
res@mpMinLatF = 30
res@mpMaxLatF = 50
res@mpMinLonF = 100
res@mpMaxLonF = 125
pltres = res
mpres = res
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Which times and how many time steps are in the data set?
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do it = 47,ntimes-1 ; TIME LOOP
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
mdbz = wrf_user_getvar(a,(/"mdbz","1","1"/),it)
dbz = wrf_user_getvar(a,(/"dbz","1","1"/),it)
opts = res
opts@cnFillOn = True
opts@ContourParameters = (/ 5., 75., 5./)
; contour = wrf_contour(a,wks,dbz(15,:,:),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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end
|
|