爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 19342|回复: 31

HADISST 海温数据 EOF分解 北太平洋,奇葩图

[复制链接]

新浪微博达人勋

发表于 2014-3-10 00:39:00 | 显示全部楼层 |阅读模式

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

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

x
最近两天在用  ncl  对北太平洋 PDO 进行 EOF 分解 ,
几乎相同的程序,对 ERSST资料和 HADISST资料进行 EOF 分解,结果差别很大,

我的处理 方法是,先去个趋势,然后做个距平,最后进行EOF分解
下面是 ERSST 的 资料结果,正常
pdo_eof_页面_1.png pdo_eof_页面_2.png

除了 数据读取的头脚本不一样,其他计算和画图脚本完全一样,如下是 HADISST的 结果
数据来自 http://www.metoffice.gov.uk/hadobs/hadisst/data/download.html
QQ图片20140310003537.jpg

pdo_eof_页面_1.png pdo_eof_页面_2.png

HADISST的 时间系数也比较怪,都 10**30 次方了????
求解释:
如下是 ncl脚本比较多 我就单独占个 沙发吧



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

新浪微博达人勋

发表于 2014-3-10 16:14:36 | 显示全部楼层
HadISST的数据我没用过,你给问下你师兄了。我刚用ERSST得到的PDO模态是这个样子的。
PDO_mode.png
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2014-3-10 00:40:14 | 显示全部楼层
;************************************************
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/skewt_func.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/wind_rose.ncl"
;************************************************
begin
;*************  set up  some parameter        *********   
  lonL   = 100
  lonR   = 280

  latB   = -10
  latT   = 60

  yrStrt = 1950
  yrLast = 2013
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  neof = 8
;************  open files and  read the data ***********  
  f     = addfile("../HadISST_sst.nc","r")
  time   = f->time                   ; days since 0000-09-01 00:00:00
  YYYY   = cd_calendar(time,-1)/100                 ; entire file
  iYYYY  = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;  sst  = f->sst(iYYYY,{latT:latB},:)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  g_sst  = f->sst(iYYYY,:,:)
  g1_sst = lonPivot(g_sst,0.5)
  sst    = g1_sst(:,{latB:latT},{lonL:lonR})
;*************  deal with the data     *****

  sst    = where(abs(sst).gt.500,sst@_FillValue,sst)

  printVarSummary(sst)
  printMinMax(sst,True)
  
  f_sst   = sst

  printVarSummary(f_sst)
  printMinMax(f_sst,True)

  ntime   = dimsizes(sst&time)
  ny      = dimsizes(sst&latitude)
  nx      = dimsizes(sst&longitude)
;******************************************************


  copy_VarCoords(sst,f_sst)
;  printVarSummary(f_sst)

;  y_sst = dtrend_msg_n(f_sst&time,f_sst,True,False,0)
;  copy_VarCoords(sst,y_sst)

  y_sst = dtrend_leftdim(f_sst,False)
;  printVarSummary(y_sst)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   temp   = y_sst
   nt     = ntime/12
   print(nt)
   month  = 12
   temp_mon  = new((/month,nt,ny,nx/),float)
   temp_d    = new((/ntime,ny,nx/),float)

   do imon=0,month-1
      temp_mon(imon,:,:,:) =  dim_rmvmean_n_Wrap(temp(imon:ntime-1:12,:,:),0)
   end do

   do it=0,nt-1
   do imon=0,month-1
      temp_d(it*12+imon,:,:)  =  temp_mon(imon,it,:,:)
   end do
   end do
      copy_VarCoords(temp,temp_d)


;~~~~~~~~~~~~~~~~~~~~~~~~~~~
  x    = temp_d
  printVarSummary(x)

;*******************************************
;  EOF
;*******************************************
  X = x(latitude|:,longitude|:,time|:)              ; Space x Time

  optEof = True
  eof    = eofunc_Wrap( X, neof, optEof)
  eof_ts = eofunc_ts_Wrap( X, eof, False)

  printVarSummary(eof)
  printVarSummary(eof_ts)

  yyyymm = cd_calendar(eof_ts&time,-2)/100
  year   = yyyymm/100


;*******************************************
;  plots
;*******************************************
  wks = gsn_open_wks("pdf","pdo_eof")
  gsn_define_colormap(wks,"posneg_1")     ; choose colormap
;
; This will not be necessary in V6.1.0 and later. Named colors can
; be used without having to first add them to the color map.
;
  dum = NhlNewColor(wks,0.7,0.7,0.7)      ; add gray to color table

  plot = new(neof,graphic)                ; create graphic array
                                          ; only needed if paneling
  res                      = True
  res@gsnDraw              = False        ; don't draw yet
  res@gsnFrame             = False        ; don't advance frame yet
  res@gsnSpreadColors      = True         ; spread out color table
  res@gsnSpreadColorEnd    = -2           ; don't use added gray
  res@gsnAddCyclic         = False        ; data not cyclic


  res@mpCenterLonF         = 190.         ; defailt is 0 [GM]
  res@mpMinLatF            = min(x&latitude)
  res@mpMaxLatF            = max(x&latitude)
  res@mpMinLonF            = min(x&longitude)
  res@mpMaxLonF            = max(x&longitude)
  res@mpFillDrawOrder      = "PostDraw"

  res@cnFillOn             = True         ; turn on color fill
  res@cnLinesOn            = True         ; True is default
  res@lbLabelBarOn         = False        ; turn off individual lb's
                                          ; set symmetric plot min/max
  symMinMaxPlt(eof, 16, False, res); contributed.ncl

; panel plot only resources
  resP                     = True         ; modify the panel plot
  resP@gsnMaximize         = True         ; large format
  resP@gsnPanelLabelBar    = True         ; add common colorbar
  resP@lbLabelAutoStride   = True         ; auto stride on labels


  resP@txString            = "Kaplan_sst (Pierce)"
  do n=0,neof-1
     res@gsnLeftString  = "EOF "+(n+1)
     res@gsnRightString = sprintf("%5.1f",eof@pcvar(n)) +"%"
     plot(n) = gsn_csm_contour_map_ce(wks,eof(n,:,:),res)
  end do
  gsn_panel(wks,plot(0:3),(/2,2/),resP)     ; draw all 'neof' as one plot

;*******************************************
; time series (principal component) plot
;*******************************************
  eof_ts@long_name = "Amplitude"

  rts           = True
  rts@gsnDraw   = False       ; don't draw yet
  rts@gsnFrame  = False       ; don't advance frame yet
;rts@gsnScale  = True        ; force text scaling

; these four resources allow the user to stretch the plot size, and
; decide exactly where on the page to draw it.

  rts@vpHeightF = 0.40        ; Changes the aspect ratio
  rts@vpWidthF  = 0.85
  rts@vpXF      = 0.10        ; change start locations
  rts@vpYF      = 0.75        ; the plot

  rts@gsnYRefLine           = 0.              ; reference line
  rts@gsnAboveYRefLineColor = "red"           ; above ref line fill red
  rts@gsnBelowYRefLineColor = "blue"          ; below ref line fill blue

; panel plot only resources
  rtsP                     = True             ; modify the panel plot
  rtsP@gsnMaximize         = True             ; large format

;  year = cd_calendar(eof_ts&time,1)


  resP@txString            = "KAplan_sst: Pierce"
  do n=0,neof-1
     rts@gsnLeftString  = "EOF "+(n+1)
     rts@gsnRightString = sprintf("%5.1f",eof@pcvar(n)) +"%"
     plot(n) = gsn_csm_xy (wks,year,eof_ts(n,:),rts)
  end do
  gsn_panel(wks,plot(0:3),(/2,2/),rtsP)        ; draw all 'neof' as one plot

end


                                       




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

新浪微博达人勋

发表于 2014-3-10 09:44:21 | 显示全部楼层
检查你HadISST原始SST数据是否是正确的,另外,PDO是对20N以北做EOF分解,你的区域是不是大了?你用ERSST分解的EOF1也不太像是PDO啊,PC1看不出来是decadal oscillation
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-3-10 10:01:52 | 显示全部楼层


                               
登录/注册后可看大图

http://jisao.washington.edu/pdo/
上面是  google 的 pdo 差不多呀
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-3-10 10:10:44 | 显示全部楼层
guizi 发表于 2014-3-10 10:01
http://jisao.washington.edu/pdo/
上面是  google 的 pdo 差不多呀

pdo_warm_cool3.jpg
google 的

如下是 脚本读取的 ERRSST和 HADISST的 相对应 的 海温图,也就是说数据读取的结果,是正确的......??????

HADIsst_页面_001.png    hadisst    ERSSt_页面_001.png ERSST


HADIsst_页面_038.png hadisst ERSSt_页面_038.png ERSST
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-3-10 10:15:17 | 显示全部楼层
guizi 发表于 2014-3-10 10:01
http://jisao.washington.edu/pdo/
上面是  google 的 pdo 差不多呀

但是你的PC1也不像是年代际振荡啊
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-3-10 10:51:50 | 显示全部楼层
Aires 发表于 2014-3-10 10:15
但是你的PC1也不像是年代际振荡啊

画图的时候 平滑一下,是不是就可以了,时间系数不是很像,模态很像, 可是 hadisst 很奇葩呀
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-3-10 11:08:20 | 显示全部楼层
guizi 发表于 2014-3-10 10:51
画图的时候 平滑一下,是不是就可以了,时间系数不是很像,模态很像, 可是 hadisst 很奇葩呀

你再检查一下你程序,或者用20度以北去做做看,我一会给你看下我用ERSST做的结果。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-3-10 11:28:21 | 显示全部楼层
Aires 发表于 2014-3-10 11:08
你再检查一下你程序,或者用20度以北去做做看,我一会给你看下我用ERSST做的结果。

ERSST是 正常的 ,hadisst 有点不正常呢,我刚刚问了师兄,那个 ERSST的结果,第一模态叫 类enso模态,第二模态叫 北太平洋模态,第三模态才是 pdo,因为我去的范围比较大,

hadisst的 资料比较 难搞,结果莫名其妙,

我看hadisst的 数据,里面是不是有海冰数据呢,我打印最大最小值的时候,有-1000 的值,但是缺测是 1×10**30 方,然后我用了 sst    = where(abs(sst).gt.500,sst@_FillValue,sst)  但是结果图,没变
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-3-10 11:28:57 | 显示全部楼层
Aires 发表于 2014-3-10 11:08
你再检查一下你程序,或者用20度以北去做做看,我一会给你看下我用ERSST做的结果。

http://www.metoffice.gov.uk/hadobs/hadisst/data/download.html

nc 格式的那个,,210m的
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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