- 积分
- 282
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-3-26
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
首先谢谢大家的帮助,新人第一次发帖如有不当请大家指出。
我在做SFW系数和32年间的5月份月平均降水的回归,使用的是regcoef函数,先使用的原始数据,得出回归系数绝对值基本小于0.1。
在论坛查看了前辈的一些帖子,将SFW系数用dim_standardize做了标准化,可以得到一个看起来还比较合适的图,并出现回归系数绝对值大于1的情况,搜索之后大部分说回归系数绝对值范围可以超出1,也有一些说存在问题的,如果这里出错麻烦大家指出。
再用student-t函数进行检验(也换betainc函数试过,结果一致),从图上看负值区域通过检验基本是正常的,但是正值的大值区域几乎没有通过95%的显著性检验。
我又尝试了一下90%显著性,正值大值区还是只有小部分通过检验,并且存在挺多回归系数绝对值小于0.1的区域通过检验,我觉得应该是存在错误,搜索之后没有找到相关解决方法,希望能得到大家的帮助,谢谢。以下附图及程序。
begin
data1 = asciiread("C:/data/1/SFW-30hPa-1950-2015-abs.txt", -1, "string")
data = data1(1:)
SFW = tofloat(str_get_cols(data, 8, 13))
year = tofloat(str_get_cols(data, 0, 3))
SFW := SFW(29:60)
SFW := dim_standardize(SFW, 0)
;printVarSummary(SFW)
;print(SFW)
data2 = addfile("C:/data/1/CPCP 197901throughApr2019/precip.mon.mean.nc", "r")
time1 = data2->time
lat = data2->lat
lon = data2->lon
YYYYMM = cd_calendar(time1, -1)
it_s = 197901
it_e = 201012
rec_s = ind(it_s.eq.YYYYMM)
rec_e = ind(it_e.eq.YYYYMM)
precip_ = data2 ->precip(time|rec_s:rec_e,lat|:,lon|:)
;printVarSummary(precip)
precip_n = reshape(precip_ , (/12,32,72,144/))
;print(precip(:,0,:,:))
x = fspan(1979, 2010, 32)
month = fspan(1, 12, 12)
precip_n!1 = "time"
precip_n&time = x
precip_n!0 = "month"
precip_n&month = month
precip_n!2 = "lat"
precip_n&lat = lat
precip_n!3 = "lon"
precip_n&lon = lon
;printVarSummary(precip_n)
precip = precip_n(4,:,:,:)
;printVarSummary(precip)
tval = new((/ 72,144 /),float)
tval!1= "lon"
tval&lon = lon
tval!0= "lat"
tval&lat = lat
nxy = new((/72,144/),integer)
nxy!1= "lon"
nxy&lon = lon
nxy!0= "lat"
nxy&lat = lat
huigui = regcoef(SFW, precip(lat|:,lon|:,time|:),tval,nxy)
huigui!0 = "lat"
huigui&lat = lat
huigui!1 = "lon"
huigui&lon = lon
;printVarSummary(huigui)
df = nxy - 2
prob = student_t(tval, df)
prob!1= "lon"
prob&lon = lon
prob!0= "lat"
prob&lat = lat
wks = gsn_open_wks("png","C:/data/5")
gsn_define_colormap(wks,"BlueWhiteOrangeRed")
res = True
res@gsnDraw = False
res@gsnFrame = False
res@gsnAddCyclic = False ;添加循环点
res@mpMaxLonF =180
res@mpMinLonF =-180
res@mpMaxLatF =90
res@mpMinLatF =-90
res@mpGridAndLimbOn = False ;绘制经纬度线
res@mpGridLatSpacingF = 10 ;纬线间隔
res@mpGridLonSpacingF = 10 ;经线间隔
res@mpGridLineDashPattern = 2 ;经纬线类型
res@mpGridLineThicknessF = 0.5 ;经纬线粗细
res@pmTickMarkDisplayMode = "Always" ;坐标上标签上添加度符号
;地图边界线
res@mpGeophysicalLineColor = "black"
res@mpGeophysicalLineDashPattern= 0
res@mpGeophysicalLineDashSegLenF= 0.2
res@mpGeophysicalLineThicknessF = 0.5 ;地图边界的粗细
res@mpOutlineOn = True
res@mpCenterLonF = 180
res@cnLinesOn = False
res@cnLineDashPattern = 16
res@cnLineThicknessF = 2
res@gsnContourNegLineDashPattern = 2
res@gsnContourPosLineDashPattern = 0
res@cnLineLabelsOn =False
res@cnLineLabelAngleF = 0.0
res@cnInfoLabelOn = True
res@cnInfoLabelOrthogonalPosF = 0.05
res@cnInfoLabelOn = False
res@gsnAddCyclic = True
res@cnFillOn = True
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnLevels = (/-0.9,-0.7,-0.5,-0.3,-0.1,0.1,0.3,0.5,0.7,0.9/)
res@cnFillColors = (/3,19,35,50,65,80,0,160,185,200,215,231,247/);12/5
;a=0.05
sres = True
sres@gsnDraw = False
sres@gsnFrame = False
sres@cnLineLabelsOn = False
sres@cnFillOn = True
sres@cnLinesOn = False ; do not draw contour lines
sres@cnInfoLabelOn = False
sres@cnLevelSelectionMode = "ExplicitLevels"
sres@cnLevels = (/0.0,0.05/)
sres@cnFillDotSizeF = (/"0.004","0.005","0.005"/)
sres@lbLabelBarOn = False
sres@gsnCenterString = ""
sres@gsnLeftString =""
sres@gsnRightString = ""
opt1 = True
opt1@gsnShadeFillType="pattern"
opt1@gsnShadeHigh = -1
opt1@gsnShadeLow = -1
opt1@gsnShadeMid = 17
plot = gsn_csm_contour_map(wks,huigui,res)
plot_=gsn_csm_contour(wks, prob, sres)
plot_ = gsn_contour_shade(plot_, 0, 0.05, opt1)
overlay(plot,plot_)
draw(plot)
frame(wks)
end
|
|