- 积分
- 195
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-3-10
- 最后登录
- 1970-1-1
|
发表于 2020-3-22 10:59:43
|
显示全部楼层
楼主求助,我按照这个来编写了一段程序,但是都会有警告
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/csm/diagnostics_cam.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/cnmap.ncl"
begin
;================read
f1= addfile("d:/changshui/1800.pressure.nc","r")
f2= addfile("d:/changshui/1800uv.nc","r")
f3= addfile("d:/changshui/1800.2m.t.nc","r")
sp=short2flt(f1->sp(28,:,:))
sp1=sp
sp1=sp/100
t2m=short2flt(f3->t2m(28,:,:))
t2m_1=t2m
t2m_1=t2m-273.15
u10=short2flt(f2->u10(28,:,:))
v10=short2flt(f2->v10(28,:,:))
;printVarSummary(t2m)
time=f1->time
tim= cd_calendar(time,-1)
;print(tim)
;printVarSummary(hgt)
;exit
;printMinMax (t2m, False)
;=================================================================plot
wks = gsn_open_wks("eps","dimian")
res0 = True
res0@tiMainString = " dimian"
;res0@gsnLeftString = "sp"
res0@gsnRightString = "Wind"
res0@gsnDraw =False
res0@gsnFrame =False
res0@mpFillOn = False
res0@mpOutlineOn = True
res0@mpMinLonF = 80
res0@mpMaxLonF = 119.8
res0@mpMinLatF =10
res0@mpMaxLatF = 44.75
res0@gsnAddCyclic =False
res0@cnLineThicknessF =3
;res0@cnFillOn = True
res0@cnLevelSelectionMode = "ManualLevels"
;res0@cnLineLabelInterval = 1
res0@cnLevelSpacingF =20
res0@china = True ;draw china map or not
res0@river = True ;draw changjiang&huanghe or not
res0@province = True ;draw province boundary or not
;res0@nanhai = True ;draw nanhai or not
res0@diqu = False ; draw diqujie or no
plot=gsn_csm_contour_map_ce(wks,sp1,res0)
;===============================================================res
res = True ; plot mods desired
res@gsnDraw =False
res@gsnFrame =False
res@vcRefMagnitudeF = 6.5 ; define vector ref mag
res@vcRefLengthF = 0.035 ; define length of vec
res@vcRefAnnoOrthogonalPosF = -1.2
res@vcRefAnnoArrowLineColor = "purple" ; change ref vector color
res@vcRefAnnoArrowUseVecColor = False ; don't use vec color for ref
res@vcMinDistanceF = 0.03 ; thin vectors
res@vcLineArrowColor = "purple" ; change vector color
res@vcLineArrowThicknessF =2.0 ; change vector thickness
res@vcLineArrowHeadMaxSizeF=0.01
res@vcRefAnnoString2On =True
res@vcRefAnnoString2 ="m/s"
res@gsnLeftString = ""
res@gsnRightString = ""
plot1=gsn_csm_vector(wks,u10,v10,res)
overlay(plot,plot1)
res2 =True
res2@gsnDraw =False
res2@gsnFrame =False
res2@cnFillOn =True
res2@cnLineThicknessF =1.5
res2@gsnRightString ="~F35~J~F~C"
res2@cnLevelSelectionMode = "ManualLevels"
res2@cnLevelSpacingF = 4
res2@cnFillColor ="red"
plot2=gsn_csm_contour(wks, t2m_1, res2)
overlay(plot, plot2)
draw(plot) ; This will draw everything
frame(wks)
end
我也不知道怎么回事,求助大佬!我这个风速风向图也出不来了,不知道为啥 |
|