爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 13269|回复: 5

关于海冰和海平面气压场回归zho遇到的问题

[复制链接]

新浪微博达人勋

发表于 2020-10-23 21:06:16 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
  1. begin
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9月海冰密集度sic(time,lat,lon)
  3. f = addfile("ice.nc","r")
  4. it_s = 197909
  5. it_e = 201009
  6. time = f->time
  7. yyyy = cd_calendar(time, -1)
  8. rec_s = ind(it_s.eq.yyyy)
  9. rec_e = ind(it_e.eq.yyyy)
  10. sic = f->sic(rec_s:rec_e:12,{66:90},:)               
  11. sic!1 = "lat"
  12. sic!2 = "lon"
  13. ;printVarSummary(sic)

  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;定义的冬季西伯利亚高压指数 slp(time)
  15. s = addfile("slp.mon.mean.nc","r")
  16. ti = s ->time
  17. yyyymm = cd_calendar(ti,-1)
  18. it_q = 197901
  19. it_w = 201012
  20. rec_q = ind(it_q.eq.yyyymm)
  21. rec_w = ind(it_w.eq.yyyymm)
  22. slp = s->slp(rec_q:rec_w,{40:60},{80:120})
  23. slp_DJF = month_to_season(slp, "DJF")
  24. slp_avg = dim_avg_n_Wrap(slp_DJF,(/1,2/))

  25. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;进行回归

  26. rc = regCoef(slp_avg, sic({lat|:},{lon|:},{time|:}))
  27. copy_VarMeta(sic(0,:,:), rc)
  28. print(rc)

  29. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;t检验
  30. tval = onedtond(rc@tval , dimsizes(rc))
  31. df   = onedtond(rc@nptxy,dimsizes(rc))-2
  32. b = tval
  33. b = 0.5
  34. prob = betainc(df/(df+tval^2), df/2.0, b)
  35. prob!0   = "lat"   
  36. prob!1   = "lon"
  37. prob&lat = sic&lat   
  38. prob&lon = sic&lon
  39. prob@long_name="probability"
  40. ;printVarSummary(prob)



  41. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;画图:回归系数

  42.    wks = gsn_open_wks("png","xiangguan")
  43.    gsn_define_colormap(wks,"BlueRedGray")

  44.    res                       = True
  45.    res@gsnPolar            = "NH"
  46.    res@gsnDraw               = False
  47.    res@gsnFrame              = False   
  48.    res@gsnMaximize           = True             ; make large
  49.    res@gsnAddCyclic          = False
  50.    
  51.    res@cnFillOn              = True             ; turn on color
  52.    res@cnLinesOn             = False            ; turn off contour lines
  53.    res@cnLineLabelsOn        = False            ; turn off contour linelabels
  54.    res@cnLevelSelectionMode  = "ManualLevels"   ; set manual contour levels
  55.    res@cnMinLevelValF        = -0.2              ; set min contourlevel
  56.    res@cnMaxLevelValF        =  0.2             ; set max contourlevel
  57.    res@cnLevelSpacingF       =  0.05            ; set contourinterval
  58.   

  59.     res@mpMinLatF  =   60.
  60.     res@mpMaxLatF  =   90.
  61.     res@mpCenterLonF = 90
  62.     res@mpFillOn                    = False    ; turn off map fill   

  63.    res@tiMainString    = ""
  64.    res@tiMainString    = ""
  65.    res@gsnRightString  = ""
  66.    base = gsn_csm_contour_map_polar(wks,rc,res)

  67. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;检验区域打点
  68.    res2 = True
  69.    res2@gsnDraw = False;
  70.    res2@gsnFrame =False;
  71.    
  72.    res2@cnFillOn = True
  73.    res2@cnLinesOn = False;
  74.    res2@cnLineLabelsOn = False
  75.    res2@cnInfoLabelOn = False;
  76.    res2@lbLabelBarOn = False;
  77.    res2@cnMonoFillPattern = False
  78.    res2@cnLevelSelectionMode ="ExplicitLevels"
  79.    res2@cnLevels = (/0.05/);
  80.    res2@cnFillPatterns = (/7,-1/);
  81.    res2@cnFillColors = (/1,-1/);
  82.    res2@gsnLeftString = ""
  83.    res2@tiMainString    = ""
  84.    res2@gsnRightString  = ""
  85.    
  86.    plot = gsn_csm_contour(wks,prob,res2)

  87.    overlay(base, plot)
  88.    draw(base)
  89.    frame(wks)
  90.   


  91. end
复制代码
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2020-10-23 21:08:42 | 显示全部楼层
不知道问题出在哪里了?

例图

例图

程序出图

程序出图
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-10-24 23:28:02 | 显示全部楼层
问题已经解决了,是数据处理的问题
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-12-9 17:49:08 | 显示全部楼层
楼主想问问,你数据处理哪里有问题呢
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2021-1-6 16:22:09 | 显示全部楼层
dh5002 发表于 2020-12-9 17:49
楼主想问问,你数据处理哪里有问题呢

关于季节选取的问题
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2022-9-30 09:13:49 | 显示全部楼层
楼主我最近也在研究北极海冰,都是做相关的时候总是出错,可能与海冰的缺测数据处理有关系,楼主可以指导一下海冰的缺测数据如何处理吗?我做的是冬季的海冰。万分感谢!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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