- 积分
- 76
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-3-8
- 最后登录
- 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/cnmap/cnmap.ncl"
begin
a = addfile("/home/shaobo/zhaozx/DATA/ERA5/ERA5.mon.pressure.u.197901-201912.nc","r")
b = addfile("/home/shaobo/zhaozx/DATA/ERA5/ERA5.mon.pressure.v.197901-201912.nc","r")
c= addfile("/home/shaobo/zhaozx/DATA/ERA5/ERA5.mon.pressure.z.197901-201912.nc","r")
va = short2flt(b ->v(2:482:12,{500},:,:))
vb = short2flt(b ->v(3:483:12,{500},:,:))
vc = short2flt(b ->v(4:484:12,{500},:,:))
ua = short2flt(a ->u(2:482:12,{500},:,:))
ub = short2flt(a ->u(3:483:12,{500},:,:))
uc = short2flt(a ->u(4:484:12,{500},:,:))
za = short2flt(c ->z(2:482:12,{500},:,:))
zb = short2flt(c ->z(3:483:12,{500},:,:))
zc = short2flt(c ->z(4:484:12,{500},:,:))
vd = array_append_record(va,vb,0)
ve = array_append_record(vd,vc,0)
ud = array_append_record(ua,ub,0)
ue = array_append_record(ud,uc,0)
zd = array_append_record(za,zb,0)
ze = array_append_record(zd,zc,0)
vf = dim_avg_n_Wrap(ve,0)
uf = dim_avg_n_Wrap(ue,0)
zf = dim_avg_n_Wrap(ze,0)
zf = zf / 100
lat = b->latitude
lon =b ->longitude
lat@units ="degrees_north"
lon@units ="degrees_east"
wks = gsn_open_wks("pdf","shiyansan")
gsn_define_colormap(wks,"BlAqGrYeOrRe")
res = True
res@gsnMaximize = True
res@gsnDraw = False
res@gsnFrame = False
res@gsnAddCyclic = False
res@mpFillOn = True
; res@mpOutlineOn = False ; Use outlines from shapefile
; res@cnFillDrawOrder = "PreDraw"
; res@mpDataBaseVersion = "MediumRes"
; res@mpDataSetName = "Earth..4"
; res@mpAreaMaskingOn = True
; res@mpMaskAreaSpecifiers = (/"China","Taiwan","Disputed area between India and China","India:Arunachal Pradesh"/)
res@mpLandFillColor = "white"
res@mpInlandWaterFillColor = "white"
res@mpOceanFillColor = "white"
; res@mpOutlineBoundarySets = "NoBoundaries"
cnres = True
cnres@china = True ;draw china map or not
cnres@river = True ;draw changjiang&huanghe or not
cnres@province = True ;draw province boundary or not
cnres@nanhai = False ;draw nanhai or not
cnres@diqu =False ; draw diqujie or not
res@tmYLLabelFontHeightF=0.015
res@tmXBLabelFontHeightF=0.015
res@gsnLeftStringFontHeightF=0.02
res@gsnRightStringFontHeightF=0.02
res@tiMainFontHeightF =0.025
res@gsnCenterString =""
res@gsnLeftString =""
res@gsnRightString =""
res@tiMainString =""
res@cnFillOn = True
res@cnLinesOn = False
res@mpMinLatF = 32
res@mpMaxLatF = 40
res@mpMinLonF = 90
res@mpMaxLonF = 108
res@cnLevelSelectionMode = "ManualLevels"
res@cnMinLevelValF = 532
res@cnMaxLevelValF = 580
res@cnLevelSpacingF = 2
res@cnLineThicknessF = 1.5
; res@lbOrientation ="vertical"
res@pmLabelBarWidthF = 0.45 ; Resize legend width
res@pmLabelBarHeightF = 0.05 ; and height
res@pmLabelBarOrthogonalPosF = 0.12 ; Move legend up
; res@pmLabelBarParallelPosF = 0.3 ; and to the right.
res@lbLabelAlignment ="InteriorEdges"
; res@pmTickMarkDisplayMode ="Always"
; res@lbTitleString ="m"
res@lbLabelFontHeightF = 0.012
res@gsnSpreadColors =True
; res@gsnSpreadColorStart =11
; res@gsnSpreadColorEnd =2
windRes = True
windRes@vcRefMagnitudeF = 10. ; make vectors larger
windRes@vcRefLengthF = 0.050 ; reference vector
windRes@vcGlyphStyle = "CurlyVector" ; turn on curly vectors
windRes@vcMinDistanceF = 0.022 ; thin the vectors
windRes@vcRefAnnoOrthogonalPosF = 0 ; move ref vector up
windRes@vcRefAnnoString2 = "m/s" ; unit string 设置向量单位
;windRes@gsnLeftString = "Rotational Wind"
;windRes@gsnDraw = False
windRes@gsnLeftString = ""
windRes@gsnRightString = ""
plot = gsn_csm_contour_map(wks,zf,res)
wind = gsn_csm_vector(wks, uf , vf , windRes)
chinamap = add_china_map(wks,plot,cnres)
overlay(plot,wind)
draw(plot)
frame(wks)
end
|
|