- 积分
- 42
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-3-4
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2020-4-13 14:34:55
|
显示全部楼层
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
fu = addfile("2003082122.nc","r")
fv = addfile("2003082122.nc","r")
U = fu->u(10,6,:,:)
V = fv->v(10,6,:,:)
U1 =fu->u(10,6,:,:)
V1 =fv->v(10,6,:,:)
U2=short2flt(U1)
V2=short2flt(V1)
Wind = sqrt(U2*U2+V2*V2)
wks = gsn_open_wks("png","vector20")
res = True
res@gsnDraw = False
res@gsnFrame = False
res@gsnLeftString = ""
res@gsnRightString = ""
mpres = res
;mpres@gsnAddCyclic = False
mpres@mpFillOn = True
mpres@mpOutlineOn =True
mpres@pmTickMarkDisplayMode = "Always"
mpres@mpDataBaseVersion ="MediumRes"
mpres@mpMinLatF = 37
mpres@mpMaxLatF= 47
mpres@mpMinLonF = -75
mpres@mpMaxLonF = -65
vcres = res
;vcres@gsnAddCyclic = False
vcres@vcGlyphStyle = "CurlyVector"
vcres@vcRefLengthF = 0.045
vcres@vcRefMagintudeF = 1
vcres@vcRefAnnoOn = False
;vcres@vcWindBarbLineThicknessF = 2
;vcres@vcWindBarbColor = "black"
vcres@vcMinMagnitudeF = 0
vcres@vcMinDistanceF = 0.05
;vcres@vcWindBarbTickLengthF = 0.05
res@tiMainString = "wind"
res1=res
res1@cnFillOn = True
res1@cnLinesOn = False
res1@cnFillPalette ="BlueRed"
res1@cnLevelSelectionMode ="ManualLevels"
res1@cnMinLevelValF ="0"
res1@cnMaxLevelValF ="10"
res1@cnLevelSpacingF ="0.25"
res1@gsnStringFontHeightF =0.015
res1@gsnLeftString = "(a)2003-08-22 06:00:00"
res1@lbOrientation ="vertical"
res1@pmLabelBarOrthogonalPosF =-0.03
res1@lbBoxMinorExtentF =0.15
res1@lbLabelFontHeightF=0.01
res1@lbLabelFontColor ="black"
res1@lbLabelFontThicknessF =1.5
res1@lbLabelStride =1
;res1@cnFillOnDrawOrder ="PreDraw"
mapplot = gsn_csm_map(wks,mpres)
plot1 = gsn_csm_contour(wks, Wind, res1)
plot = gsn_csm_vector(wks,U,V,vcres)
overlay(mapplot,plot1)
overlay(mapplot,plot)
draw(mapplot)
frame(wks)
print("All Done.")
end |
|