爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 21260|回复: 1

[其他] 相关分析做显著性检验

[复制链接]

新浪微博达人勋

发表于 2021-4-14 11:03:16 | 显示全部楼层 |阅读模式
5金钱
相关分析做显著性检验,想要给正相关通过显著性检验的地方和负相关通过显著性检验的地方分别填不同的颜色,改怎么实现?(新手小白求代码!)

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2021-4-14 12:04:24 | 显示全部楼层
;=====================相关系数检验==============================
sst1   = month_to_season(sst, "JJA")
sstt   = sst1({latitude|:},{longitude|:},time|:)
ccr1   = escorc(eof_ts(0,:),sstt)
prob1 = new(dimsizes(sst11(0,:,:)),"float")
Nr1   = dimsizes(eof_ts(0,:))
prob1 = rtest(ccr1(:,:), Nr1, 0)
prob1 = 1-prob1
prob1!0="latitude"
prob1!1="longitude"
prob1&latitude  = sst11&latitude
prob1&longitude = sst11&longitude
prob1= where(prob1.ne.0,prob1,prob1@_FillValue)
  res2                      = True
  res2@gsnDraw              = False
  res2@gsnFrame             = False
  res2@cnFillOn             = True
  res2@cnLinesOn            = False
  res2@cnLineLabelsOn       = False
  res2@cnInfoLabelOn        = False
  res2@lbLabelBarOn         = False
  res2@cnMonoFillPattern    = False
  res2@cnLevelSelectionMode = "ExplicitLevels"
  res2@cnLevels             = (/0.95,1/)
  res2@cnFillPatterns       = (/-1,17,-1/)
  res2@cnFillColors         = (/-1,1,-1/)
  res2@gsnLeftString        = ""
  res2@gsnRightString       = ""
  res2@cnInfoLabelOn        = False  
plot1(0) = gsn_csm_contour(wks,prob1,res2)
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表