爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6450|回复: 0

[作图] 求滑动相关系数

[复制链接]
发表于 2019-9-7 11:33:10 | 显示全部楼层 |阅读模式

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

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

x
1.1001000年冬季风指数与ENSO指数的滑动平均。
  
                                                                     
  
     
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/contrib/run_cor.ncl"
  
begin
  
f=addfile("/cygdrive/G/cntl/b.e11.B1850C5CN.f19_g16.0850cntl.001.cam.h0.TS.185001-200512.nc","r")
  
f2=addfile("/cygdrive/G/cntl/cntl.001.cam.h0.V.185001-200512.nc","r")
  
sst =f->TS(:,{-5:5},{190:240})
  
vv =f2->V(:,{850},{20:40},{100:140})
  
year =ispan(1850,2005,1)
  
year@units ="yr"
  
year1 =ispan(1850,1985,1)
  
year1@units ="yr"
  
vv =-1*vv
  
siw =month_to_season(sst,"DJF")
  
v =month_to_season(vv,"DJF")
  
sss =wgt_areaave(siw,1.0,1.0,1)
  
vvvv =wgt_areaave(v,1.0,1.0,1)
  
cor11 =run_cor(sss,vvvv,year,21)
  
;**************************************
  
labels =(/"cor11"/)
  
wks =  gsn_open_wks("png","/cygdrive/G/cntl/gsn_xy")     
  
res = True
  
res@gsnYRefLine =0.433
  
res@gsnYRefLine =-0.433
  
res@gsnYRefLineColor ="red"
  
res@xyLineColor       = "black"   ; use xyLineColors if multiple lines
  
res@gsnMaximize = True
  
res@tiMainString  = "EAWWMI(v850) AND NINO3.4"
  
res@tiYAxisString = "cor"
  
res@tiXAxisString = "Time"
  
plot1= gsn_csm_xy(wks,year1,cor11,res)
  
end
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/contrib/run_cor.ncl"
  
begin
  
f=addfile("/cygdrive/G/cntl/b.e11.B1850C5CN.f19_g16.0850cntl.001.cam.h0.TS.085001-184912.nc","r")
  
f2=addfile("/cygdrive/G/cntl/cntl.001.cam.h0.V.085001-184912.850hPa.nc","r")
  
sst =f->TS(:,{-5:5},{190:240})
  
vv =f2->V(:,{850},{20:40},{100:140})
  
year =ispan(850,1849,1)
  
year@units ="yr"
  
year1 =ispan(850,1829,1)
  
year1@units ="yr"
  
vv =-1*vv
  
siw =month_to_season(sst,"DJF")
  
v =month_to_season(vv,"DJF")
  
sss =wgt_areaave(siw,1.0,1.0,1)
  
vvvv =wgt_areaave(v,1.0,1.0,1)
  
cor11 =run_cor(sss,vvvv,year,21)
  
;**************************************
  
labels =(/"cor11"/)
  
wks =  gsn_open_wks("png","/cygdrive/G/cntl/gsn_xy")     
  
res = True
  
res@gsnYRefLine =0.433
  
res@gsnYRefLine =-0.433
  
res@gsnYRefLineColor ="red"
  
res@xyLineColor       = "black"   ;  use xyLineColors if multiple lines
  
res@gsnMaximize = True
  
res@tiMainString  = "EAWWMI(v850) AND NINO3.4"
  
res@tiYAxisString = "cor"
  
res@tiXAxisString = "Time"
  
plot1= gsn_csm_xy(wks,year1,cor11,res)
  
end
100850hPa经向风表示的冬季风指数与ENSO指数之间的滑动相关系数
1000850hPa经向风表示的冬季风指数与ENSO指数之间的滑动相关系数
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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