- 积分
- 4237
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-4-26
- 最后登录
- 1970-1-1

|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
begin
f = addfile ("/home/shuai/paper/data/hgt.mon.mean.nc","r")
u = addfile ("/home/shuai/paper/data/uwnd.mon.mean.nc","r")
lat = f->lat
lon = f->lon
p82 = f->hgt(413:415,5,:,:)
p97 = f->hgt(593:595,5,:,:)
p15 = f->hgt(809:811,5,:,:)
u82 = u->uwnd(413:415,5,:,:)
u97 = u->uwnd(593:595,5,:,:)
u15 = u->uwnd(809:811,5,:,:)
; p82 = f->hgt(425:427,5,:,:)
; p97 = f->hgt(605:607,5,:,:)
; p15 = f->hgt(821:823,5,:,:)
; u82 = u->uwnd(425:427,5,:,:)
; u97 = u->uwnd(605:607,5,:,:)
; u15 = u->uwnd(821:823,5,:,:)
m82 = dim_avg_n_Wrap(p82, 0)
m97 = dim_avg_n_Wrap(p97, 0)
m15 = dim_avg_n_Wrap(p15, 0)
um82 = dim_avg_n_Wrap(u82, 0)
um97 = dim_avg_n_Wrap(u97, 0)
um15 = dim_avg_n_Wrap(u15, 0)
h82 = m82/10
h97 = m97/10
h15 = m15/10
copy_VarMeta(m82, h82)
copy_VarMeta(m97, h97)
copy_VarMeta(m15, h15)
;==============================================
; create color plot
;=============================================
wks = gsn_open_wks ("eps", "/home/shuai/paper/plot/jixian1" ) ; send graphics to PNG file
plot = new(3,graphic)
base = new(3,graphic)
ploth = new(3,graphic)
res = True
res@gsnMaximize = True
res@gsnDraw = False ; do not draw the plot
res@gsnFrame = False ; do not advance the frame
res@gsnAddCyclic = False
res@mpOutlineOn = True
res@mpFillOn = False
res@mpMinLatF = 0. ; zoom in on a subregion
res@mpMaxLatF = 60.
res@mpMinLonF = 60.
res@mpMaxLonF = 180.
;res@mpGeophysicalLineThicknessF= 2
res@tmXTOn = False
res@tmYROn = False
res@tmXBLabelFontHeightF = 0.02
res@tmYLLabelFontHeightF = 0.02
res@cnLevelSelectionMode = "ExplicitLevels" ; Explicit contour levels
res@cnLevels = (/560,565,570,575,580,585,590/) ; One contour level to plot
res@cnLineThicknessF = 1.5 ; Thickness of contour line
res@cnLineLabelsOn = True ; do not use line labels
res@cnInfoLabelOn = False
res@cnFillOn = False ; color fill
res@cnLinesOn = True ; do not draw contour lines
res@gsnRightString = "dagpm"
;res@gsnLeftStringOrthogonalPosF = 0.01
res@gsnLeftStringFontHeightF = 0.025
res@gsnRightStringFontHeightF = 0.025
res@gsnLeftString = "1982"
plot(0) = gsn_csm_contour_map(wks,h82,res) ; create the overlay plot
res@gsnLeftString = "1997"
plot(1) = gsn_csm_contour_map(wks,h97,res)
res@gsnLeftString = "2015"
plot(2) = gsn_csm_contour_map(wks,h15,res)
;;;; 突出588线
vres = True
vres@gsnFrame = False
vres@gsnDraw = False
vres@gsnAddCyclic = False
vres@cnLevelSelectionMode = "ExplicitLevels" ; Explicit contour levels
vres@cnLevels = (/588/) ; One contour level to plot
vres@cnLineThicknessF = 2 ; Thickness of contour line
vres@cnLineColor = "black"
vres@gsnLeftString = ""
vres@gsnRightString = ""
vres@cnInfoLabelOn = False
vres@cnLineLabelsOn = True ; do not use line labels
base(0) = gsn_csm_contour(wks,h82,vres) ; create the overlay plot
base(1) = gsn_csm_contour(wks,h97,vres) ; create the overlay plot
base(2) = gsn_csm_contour(wks,h15,vres) ; create the overlay plot
overlay(plot(0), base(0))
overlay(plot(1), base(1))
overlay(plot(2), base(2))
;;;; 画副高脊线
hres = True
hres@gsnDraw = False
hres@gsnFrame = False
hres@gsnAddCyclic = False
hres@cnLevelSelectionMode = "ExplicitLevels" ; Explicit contour levels
hres@cnLevels = (/0/) ; One contour level to plot
hres@cnLineThicknessF = 2 ; Thickness of contour line
hres@cnLineColor = "red"
hres@gsnLeftString = ""
hres@gsnRightString = ""
hres@cnInfoLabelOn = False
hres@cnLineLabelsOn = False ; do not use line labels
ploth(0) = gsn_csm_contour(wks, um82({19:30},{102:180}), hres) ;; 相当于GrADS中的maskout命令 um82({19:30},{102:180}
ploth(1) = gsn_csm_contour(wks, um97({15:30},{110:180}), hres)
ploth(2) = gsn_csm_contour(wks, um15({17:30},{103:180}), hres)
overlay(plot(0), ploth(0))
overlay(plot(1), ploth(1))
overlay(plot(2), ploth(2))
resP = True
resP@gsnPanelLabelBar = False
resP@gsnFrame = False
resP@gsnPanelLabelBar = False ; add common colorbar
resP@gsnPanelFigureStrings = (/"(a)","(b)","(c)"/)
resP@gsnPanelFigureStringsFontHeightF = 0.011
resP@gsnPanelYWhiteSpacePercent = 2
resP@gsnPanelXWhiteSpacePercent = 1
resP@amResizeNotify = True
resP@gsnPanelRowSpec = True ; 指定每行绘制子图的个数
gsn_panel(wks,plot,(/2,1/),resP)
end
图形如下:
|
|