- 积分
- 1831
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-5-6
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
将风云awx资料处理成nc,想叠加到再分析要素场上,俩个单独出图没问题,但是叠加时无论怎样设置,卫星资料总是覆盖在再分析资料上,且地图范围无法设置。
分开的两张图。
合并后的图。麻烦大家帮我看一下,谢谢!(红色为加入的卫星资料叠加语句,单独画是没问题的)
下面放上脚本
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
in=addfile("/home/zssapr/IOP10/reanalysis/fnl_20140724_18_00.grib1.nc","r")
in2=addfile("/home/zssapr/IOP10/fy-vapor/tbb071106.nc","r")
;---Now get the 850hPa level
nl = 20
H=in->HGT_3_ISBL(nl,:,:)
T=in->TMP_3_ISBL(nl,:,:)
U=in->U_GRD_3_ISBL(nl,:,:)
V=in->V_GRD_3_ISBL(nl,:,:)
ter=in->HGT_3_SFC(:,:)
TF = 1.8*T+32. ; Convert temperature to Fahrenheit
U = U*1.94386 ; Convert wind into knots
V = V*1.94386
;qMask = (mask(pw,ter.gt.z,False))
;*******in2 variables
tbb = in2->tb
;---Change the metadata
H@description = " geopotential height"
T@description = " Temperature"
U@description = " U-wind"
V@description = " V-wind"
H@units = "gpm"
T@units = "degF"
U@units = "kts"
V@units = "kts"
wks = gsn_open_wks("ps","synoptic")
;---Set common resources for all plots
res = True
res@gsnFrame = False
res@gsnDraw = False
res@gsnLeftString = ""
res@gsnRightString = ""
res@pmTickMarkDisplayMode = "Always"
;---geopotential height contour plot
levels = ispan(1200,1600,20)
slp_res = res
slp_res@cnLineColor = "black"
slp_res@cnLevelSelectionMode = "ExplicitLevels"
slp_res@cnLevels = levels
slp_res@cnLineLabelBackgroundColor = -1 ; transparent
slp_res@cnLineThicknessF = 3.5
slp_res@cnLineLabelsOn =True
slp_res@cnHighLabelsOn = True
slp_res@cnLowLabelsOn = True
slp_res@cnHighLabelBackgroundColor = -1
slp_res@cnLowLabelBackgroundColor = -1
slp_res@cnLineDrawOrder = "Postdraw"
contour_h = gsn_csm_contour(wks,H,slp_res)
;---Wind vector plot
vec_res = res
vec_res@vcMinDistanceF = 0.02
vec_res@vcRefLengthF = 0.02
vec_res@vcMinFracLengthF = 0.2
vec_res@vcGlyphStyle = "WindBarb"
vec_res@vcRefAnnoOn = False
vec_res@vcVectorDrawOrder ="Postdraw"
vector = gsn_csm_vector(wks,U,V,vec_res)
;---ter contour plot
ter = mask(ter, ter.lt.2500,False)
ter_res =res
ter_res@cnFillOn =True
ter_res@cnMonoFillColor =True
ter_res@cnFillColor ="black"
ter_res@cnSmoothingOn = True
ter_res@cnSmoothingDistanceF =2
ter_res@cnSmoothingTensionF = -0.2
;ter_res@trGridType = "TriangularMesh"
;tersmooth=smth9(ter, 0.50, 0.25, False)
contour_ter =gsn_csm_contour(wks,ter,ter_res)
;-----tbb plot------------
gsn_define_colormap( wks ,"gsdtol")
tbbMask=mask(tbb, tbb.lt.150,False)
tbbMask!0="lat"
tbbMask!1="lon"
tbbMask&lat = fspan(-60, 60, 1201)
tbbMask&lon =fspan(45,165,1201)
tbbMask&lat@units="degrees_north"
tbbMask&lon@units="degrees_east"
tbb_res =True
tbb_res@cnFillOn=True
tbb_res@gsnAddCyclic = False
tbb_res@gsnSpreadColors = True
tbb_res@gsnSpreadColorStart = 25
tbb_res@gsnSpreadColorEnd = 32
tbb_res@cnFillDrawOrder = "draw"
tbb_res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
tbb_res@cnMinLevelValF = 150. ; set min contour level
tbb_res@cnMaxLevelValF = 240. ; set max contour level
tbb_res@cnLevelSpacingF = 10.
tbb_res@cnInfoLabelOn = False
tbb_res@cnLineLabelsOn = False
tbb_res@cnLinesOn =False
vapor=gsn_csm_contour(wks,tbbMask,tbb_res)
; Control appearance of map.
mpres = res
mpres@mpProjection ="CylindricalEquidistant"
mpres@mpLabelsOn = True
mpres@mpPerimOn = True
mpres@mpGridAndLimbOn = True
mpres@mpFillOn = True
mpres@mpOutlineOn = True
mpres@mpOutlineDrawOrder = "PostDraw"
mpres@mpFillDrawOrder = "Predraw"
mpres@mpOceanFillColor = "lightskyblue1"
mpres@mpLandFillColor = "gray"
mpres@mpDataBaseVersion = "MediumRes"
mpres@mpDataSetName = "Earth..4"
mpres@mpOutlineSpecifiers = (/"China","Taiwan"/) ;China:states
mpres@mpInlandWaterFillColor = "white"
mpres@mpOceanFillColor = "white"
;
; Zoom in on area that is roughly China.
;
mpres@mpLimitMode = "LatLon"
mpres@mpMinLatF = 15.
mpres@mpMaxLatF = 55.
mpres@mpMinLonF = 70.
mpres@mpMaxLonF = 140.
mpres@mpCenterLonF = 120.0
mpres@mpCenterLatF = 40.0
mpres@mpGridAndLimbDrawOrder = "Predraw"
mpid = gsn_csm_map(wks,mpres)
; Overlay contour, streamline, and vector plots on the map plot.
overlay(mpid,contour_h)
overlay(mpid,vector)
overlay(mpid,contour_ter)
overlay(mpid,vapor)
maximize_output(wks,True)
end
|
|