- 积分
- 224
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-9-10
- 最后登录
- 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"
begin
year=ispan(1988, 2001, 1)
it_s=198801
it_e=200112
;read data
f_omega=addfile("D:\NCL\cygwin\cygdrive\dachuang\vor.mon.mean.nc", "r")
;time
time=f_omega->time
YYYYMM=cd_calendar(time, -1)
rec_s=ind(it_s.eq.YYYYMM)
rec_e=ind(it_e.eq.YYYYMM)
omega=f_omega->vor(rec_s:rec_e,1,:,:)
;海温10 11 12 三月平均
omega_OND=month_to_season(omega, "OND")*1000000.
copy_VarMeta(omega(0,:,:),omega_OND(0,:,:))
omega_OND!0="year"
omega_OND&year=year
;每年距平值
;sst_ano1=dim_rmvmean_n_Wrap(sst_OND(0:15,:,:), 0)
;sst_ano2=dim_rmvmean_n_Wrap(sst_OND(16:31,:,:), 0)
;sst_ano3=sst_ano2-sst_ano1
;每年的平均值
omega_ave1=dim_avg_n_Wrap(omega_OND(0:6,:,:), 0)
omega_ave2=dim_avg_n_Wrap(omega_OND(7:13,:,:), 0)
omega_ave3=dim_avg_n_Wrap(omega_OND, 0)
omega_ave4=omega_ave1-omega_ave3
copy_VarMeta(omega(0,:,:),omega_ave4)
omega_ave5=omega_ave2-omega_ave3
copy_VarMeta(omega(0,:,:),omega_ave5)
omega_ave6=omega_ave5-omega_ave4
copy_VarMeta(omega(0,:,:),omega_ave6)
;数据区域平均及标准化
;ensoi=wgt_areaave_Wrap(sst_OND(:,{-5,5},{190,240}), 1.,1.,0)
;ensoi=dim_standardize(ensoi, 1)
;plot
wks=gsn_open_wks("eps", "vor2")
gsn_define_colormap(wks, "rainbow+gray")
plot=new(3, "graphic")
res=True
res@gsnAddCyclic=True
res@gsnDraw=False
res@gsnFrame=False
res@gsnLeftString=""
res@gsnLeftStringOrthogonalPosF=-0.005
res@gsnRightString=""
;地图及经纬度设置
res@mpFillOn=True
res@mpCenterLonF=180
res@mpGeophysicalLineThicknessF=0.5
res@pmTickMarkDisplayMode="Always"
res@mpGridAndLimbOn=True
res@mpGridLonSpacingF=15
res@mpGridLineDashPattern=2
res@mpGridLineThicknessF=0.5
res@mpMinLatF=-40
res@mpMaxLatF=40
res@mpMinLonF=50
res@mpMaxLonF=230
;等值线设置
res@cnLinesOn=True
res@cnLineColor="black"
res@cnLineThicknessF=0.3
res@cnLineLabelsOn=True
cnSmoothingOn=True
;等值线标数值
;res@cnLevelSelectionMode="ExplicitLevels"
;res@cnLevels=(/-12.,-8.,-4.,0.,4.,8.,12.,16.,20.,24.,28./)
;res@cnExplicitLabelBarLabelsOn=True
;res@lbLabelStrings=(/"-12","-8","-4","0","4","8","12","16","20","24","28"/)
;填色等值线
res@cnFillOn=True
;res@cnFillPalette="GMT_gray"
;res@gsnCenterString="RH"
;res@gsnCenterStringFontHeightF=0.03
plot(0)=gsn_csm_contour_map(wks, omega_ave4, res)
plot(1)=gsn_csm_contour_map(wks, omega_ave5, res)
plot(2)=gsn_csm_contour_map(wks, omega_ave6, res)
;plot=ColorNegDashZeroPosContour(plot,"blue","white","red")
;绘制组图
resP=True
resP@txString="Vorticity"
resP@txFontHeightF=0.03
resP@gsnPanelFigureStrings=(/"1988-1994","1995-2001","contrast"/)
resP@gsnPanelFigureStringsFontHeightF=0.015
resP@amJust="TopLeft"
resP@gsnPanelRowSpec=True
gsn_panel(wks, plot, (/2,1/), resP)
end
|
|