- 积分
- 900
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-8-14
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
每次都画成两幅图,后来看了气象家园的帖子,好多人说加gsnDraw,还有PreDraw,PostDraw巴拉巴拉的都不管用,后来还是在官网上找到了解决方法,利用一个
pltres@PanelPlot = True 就可以解决了的。基本上就是ncl的一个例子改的,我也不想赚金币,有类似问题的同学照猫画虎就行了。
begin
a = addfile("wrfout.nc","r")
HGT = wrf_user_getvar(a,"HGT",0)
HGT@description = "Terrain height"
HGT@units = "m"
wks = gsn_open_wks("png","wrfplot")
res = True
res@Footer = False ;去掉wrfout啰哩八嗦的脚标
res@InitTime = False
res@cnFillOn = True
gsn_define_colormap(wks,"precip3_16lev")
res@cnLabelBarEndStyle = "IncludeMinMaxLabels" ;标出最大值
res@ContourParameters = (/ 0.,2000., 250./)
contour = wrf_contour(a,wks,HGT,res)
mapres = True
pltres = True
pltres@PanelPlot = True ; 现在不画,一会儿再画
mapres@mpDataBaseVersion="MediumRes"
mapres@mpDataSetName="Earth..4"
mapres@mpGeophysicalLineColor = "Black"
mapres@mpNationalLineColor = "Black"
mapres@mpGridLineColor = "Black"
mapres@mpLimbLineColor = "Black"
mapres@mpPerimLineColor = "Black"
mapres@mpUSStateLineThicknessF = 2
mapres@mpNationalLineThicknessF = 2
mapres@mpUSStateLineColor="Black"
mapres@mpOutlineSpecifiers="China:states"
plot = wrf_map_overlays(a,wks,contour,pltres,mapres)
;---加站点
lats = (/ 48.51, 58.27, 39.43/)
lons = (/ 128.33, 100.25, 122.90/)
tstrs = (/"A","B", "C"/) ;站点名
mkres = True
txres = True
mkres@gsMarkerIndex = 16 ; 画点
txres@txFontHeightF = 0.015
txres@txJust = "CenterLeft"
mkid = gsn_add_polymarker(wks,plot,lons,lats,mkres)
txid = gsn_add_text(wks,plot," " + tstrs,lons,lats,txres)
draw(plot)
frame(wks)
end |
|