- 积分
- 10121
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-3-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
用站点资料画相关系数分布图 t检验的时候出了问题 报错:
附程序如下:
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/cnmap/cnmap.ncl"
;************************************************
begin
;************************************************
; variable and file handling
;************************************************
;************************************************
; read station data
;************************************************
tem = asciiread("8002aw.txt",(/678,23/),"float")
info = asciiread("sta678ll.txt",(/678,3/),"float")
tem!0 = "sta"
tem&sta = ispan(1,678,1)
tem!1 = "year"
tem&year =ispan(1980,2002,1)
lon= info(:,1)
lat = info(:,2)
;print(tem)
;************************************************
; calculate corr of ENSO index&fog days
;************************************************
enso= asciiread("8002enso.txt",23,"float")
ccr2 = escorc(enso,tem)
;printVarSummary(tem)
printVarSummary(ccr2)
;print(ccr2)
;asciiwrite("ccr2.txt",ccr2)
;t检验
t1= new(678,"float")
t1 = ccr2* sqrt((23.-2.)/(1-ccr2^2))
;t1!0 = "lon"
;t1!1 = "lat"
;t1&lon = lon
;t1&lat = lat
t1@_FillValue = 1e+20
olon = new(66,"float");
olat = new(40,"float");
tem1 = new((/40,66/),"float")
tem2 = new((/40,66/),"float")
do i=0,65
olon(i) =72+i
end do
do l=0,39
olat(l) = 17+l
end do
olon!0 = "lon"
olon@long_name = "lon"
olon@units = "degrees-east"
olon&lon = olon
olat!0 = "lat"
olat@long_name = "lat"
olat@units = "degrees_north"
olat&lat = olat
ccr2@_FillValue = 9.96921e+36
rscan = (/10,5,3/) ;连续的有效半径大小,最大为10,依次递减
tem1 = obj_anal_ic_Wrap(lon,lat,ccr2,olon,olat,rscan, False) ;Creanm插值
;************************************************
; plot
;************************************************
wks = gsn_open_wks("png","tem")
gsn_define_colormap(wks,"BlueWhiteOrangeRed")
;t检验-阴影
tem2 = obj_anal_ic_Wrap(lon,lat,t1,olon,olat,rscan, False)
res2 = True
res2@cnFillOn = True
res2@cnLinesOn = False
res2@gsnDraw = False ; do not draw
res2@gsnFrame = False ; do not advance frame
res2@gsnMaximize = True
res2@lbLabelBarOn= False
res2@cnLineLabelsOn = False
res2@mpCenterLonF = 175.
res2@mpMinLonF = 0.
res2@mpMaxLonF = 350.
res2@mpMinLatF = -60.
res2@mpMaxLatF = 60.
res2@cnLevelSelectionMode = "ExplicitLevels"
;res2@cnLevels = (/-2.750,-2.042,2.042,2.750/)
res2@cnFillColors =(/2,66,0,189,253/)
plot = gsn_csm_contour_map(wks,t1,res2)
res2@mpFillDrawOrder= "PostDraw"
res = True
res@gsnDraw = False
res@gsnFrame = False
res@gsnMaximize = True
res@cnFillOn = True
res@gsnAddCyclic = False
res@mpMinLatF = 17
res@mpMaxLatF = 57
res@mpMinLonF = 72
res@mpMaxLonF = 138
res@mpFillOn = True
res@mpOutlineOn = False ; Use outlines from shapefile
res@cnFillDrawOrder = "PreDraw" ;
res@cnLineDrawOrder = "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 = True ;draw nanhai or not
cnres@diqu = False ; draw diqujie or no
plot = gsn_csm_contour_map(wks,tem1,res)
chinamap = add_china_map(wks,plot,cnres)
draw(plot)
frame(wks)
end
求大家帮看一下哪里的问题 谢谢大家!!
|
|