- 积分
- 6467
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-11-6
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请教一下大家,我用wrf最大网格区域的资料画图,想画底图出现问题,wrf的domain图应该是图一,但是用wrf_overlays画了底图后就变成图二了,经度完全错乱了,这是怎么回事啊?附上代码
begin
f=addfile("e://chanchu_54km.nc","r")
u=wrf_user_getvar(f,"ua",0)
v=wrf_user_getvar(f,"va",0)
p=wrf_user_getvar(f,"pressure",0) ;hpa
u_700=wrf_interp_3d_z(u,p,700)
v_700=wrf_interp_3d_z(v,p,700)
wks=gsn_open_wks("eps","domain") ;画图语句
res=True
res@gsnDraw=False
res@gsnFrame=False
res@gsnMaximize=True
res@gsnLeftString="" ;去掉左上角标记
res@gsnRightString=""
res@tmYLLabelFontHeightF=0.011
res@tmXBLabelFontHeightF=0.011
res@vpWidthF=0.34
res@vpHeightF=0.25
res@tmXTOn=False
res@tmYROn=False
res@tmYLMode="Explicit";
res@tmYLValues=(/15,35,57,79/)
res@tmYLLabels=(/"EQ","10N","20N","30N"/)
res@tmXBMode="Explicit"
res@tmXBValues=(/17,37,58,78,99,120/)
res@tmXBLabels=(/"100E","110E","120E","130E","140E","150E"/)
res1=res
res1@vcRefMagnitudeF=20
res1@vcRefLengthF=0.02
res1@vcRefAnnoFontHeightF=0.007
res1@vcLineArrowThicknessF=0.8
res1@vcMinDistanceF=0.015 ;矢量箭头疏密
res1@vcRefAnnoOrthogonalPosF=-0.07
res1@vcRefAnnoParallelPosF=1.02
res1@vcRefAnnoPerimOn = False ;去掉参考矢量外框
res1@vcRefAnnoString2 = " "
mpres=True
mpres@mpGeophysicalLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
mpres@mpGeophysicalLineThicknessF = 2.0
mpres@mpUSStateLineThicknessF = 2.0
mpres@ZoomIn = True ; Tell wrf_map_resources we want to zoom in.
mpres@Xstart = 0 ; Set these four special WRF resources
mpres@Xend = 132 ; required for zooming.
mpres@Ystart = 0
mpres@Yend = 98
pltres=True
pltres@NoTitles=True
pltres@NoHeaderFooter=True
pltres@InitTime=False
pres=True
pres@gsLineThicknessF=3
pres@gsLineColor="Black"
pres1=True
pres1@gsLineThicknessF=3
pres1@gsLineDashPattern=2
mstring = "p"
fontnum = 37
xoffset = 0.0
yoffset = 0.0
ratio = 1.0
size = 1.0
angle = 0.0
new_index=NhlNewMarker(wks, mstring, fontnum, xoffset, yoffset, ratio, size, angle)
pres2=True
pres2@gsMarkerSizeF=0.02
pres2@gsMarkerColor="transparent"
pres2@gsMarkerThicknessF=4.0
pres2@gsMarkerIndex=new_index
pres2@tfPolyDrawOrder="PostDraw"
tres=True
tres@txFontHeightF=0.02
tres@txFontColor="Black"
x1=(/34,81,81,34,34/)
x2=(/42,68,68,42,42/)
x3=(/55,64,64,55,55/)
x4=(/51,60,60,51,51/)
x5=(/55,48,51/)
y1=(/28,28,84,84,28/)
y2=(/37,37,75,75,37/)
y3=(/38,38,47,47,38/)
y4=(/65,65,74,74,65/)
y5=(/47,49,65/)
plot=gsn_csm_vector(wks,u_700,v_700,res1)
plot1=wrf_map_overlays(f,wks,plot,pltres,mpres)
plot11=gsn_add_polyline(wks,plot,x1,y1,pres)
plot12=gsn_add_polyline(wks,plot,x2,y2,pres)
plot13=gsn_add_polyline(wks,plot,x3,y3,pres)
plot14=gsn_add_polyline(wks,plot,x4,y4,pres)
plot15=gsn_add_polyline(wks,plot,x5,y5,pres1)
plot21=gsn_add_text(wks,plot,"A",2,95,tres)
plot22=gsn_add_text(wks,plot,"B",36,81,tres)
plot23=gsn_add_text(wks,plot,"C",44,72,tres)
plot24=gsn_add_text(wks,plot,"D1",51,45,tres)
plot25=gsn_add_text(wks,plot,"D2",54,63,tres)
plot3=gsn_add_polymarker(wks,plot,80,33,pres2)
draw(plot)
frame(wks)
end
|
-
-
|