- 积分
- 5997
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-3-7
- 最后登录
- 1970-1-1
|
发表于 2022-11-15 18:48:52
|
显示全部楼层
- begin
- start_year = 1979
- end_year = 2019
- f1 = addfile ("precip.mon.mean.nc", "r")
- time = cd_calendar( f1->time, 0 )
- year = time(:,0)
- pre = f1->precip
- idx = ind( year.ge.start_year.and.year.le.end_year)
- pre_runave = runave_n_Wrap ( pre(idx,:,:), 3, 0, 1 )
- nino34_raw = asciiread ( "Nino3.4Index_1948-2020", (/73, 13/), "float" )
- nino34 = nino34_raw ( 31:71, 1:: ) ;71
- nino34 = nino34 - conform( nino34, dim_avg_n_Wrap ( nino34, 0 ), 1 )
- nino34_1d = ndtooned( nino34 )
- nino34_1d = runave ( nino34_1d, 3, 0 )
- cormap = esccr ( nino34_1d, pre_runave(lat|:, lon|:, time|:), 6 )
- printVarSummary(cormap)
- cormap@long_name = "Correlation Map"
- copy_VarCoords( pre(0,:,:), cormap(:,:,0) )
- printVarSummary(cormap)
- prob = 1. - rtest( cormap, 12*41, 0 )
-
-
- copy_VarCoords( pre(0,:,:), prob(:,:,0) )
- wks = gsn_open_wks ( "pdf", "Fig_NCLseries2" )
- gsn_define_colormap( wks, "BlueWhiteOrangeRed" )
- plot1 = new(3, graphic)
- plot2 = new(3, graphic)
- res = True
- res@gsnAddCyclic = True
- res@gsnFrame = False
- res@gsnDraw = False
- res@cnLinesOn = False
- res@cnLineLabelsOn = False
- res@cnInfoLabelOn = False
- res@cnFillOn = True
- res@mpCenterLonF = 180.
- res@gsnLeftStringFuncCode = ":"
- res@gsnRightString = "1979-2019"
- res@vpHeightF = 0.4
- res@vpWidthF = 0.75
- res@cnLevelSelectionMode = "ExplicitLevels"
- res@cnLevels = fspan(-0.6, 0.6, 25) ;(/980, 984, 988, /) ;fspan(1,10,10)
- res@lbLabelBarOn = False
- res@mpMaxLatF = 50
- res@mpMinLatF = -50
- res@gsnLeftString = "(a) GPCP lag cor with Nino 3.4 SST [lag=0]"
- plot1(0) = gsn_csm_contour_map_ce ( wks, cormap(:,:,0), res)
- res@gsnLeftString = "(b) GPCP lag cor with Nino 3.4 SST [lag=3]"
- plot1(1) = gsn_csm_contour_map_ce ( wks, cormap(:,:,3), res)
- res@gsnLeftString = "(c) GPCP lag cor with Nino 3.4 SST [lag=6]"
- plot1(2) = gsn_csm_contour_map_ce ( wks, cormap(:,:,6), res)
- lres = True
- lres@gsnAddCyclic = True
- lres@gsnLeftString = ""
- lres@gsnRightString = ""
- lres@gsnDraw = False
- lres@gsnFrame = False
- lres@cnInfoLabelOn = False
- lres@cnLinesOn = False
- lres@cnLineLabelsOn = False
- lres@cnFillOn = True
- lres@cnFillColors = (/"black"/)
- lres@cnMonoFillPattern = False ; Use multiple fill patterns
- lres@cnFillPatterns = (/-1,17/)
- lres@cnFillDotSizeF = 0.002
- lres@cnLevelSelectionMode = "ExplicitLevels"
- lres@cnLevels = (/0.95/)
- lres@lbLabelBarOn = False
-
- plot2(0) = gsn_csm_contour ( wks, prob(:,:,0), lres)
- plot2(1) = gsn_csm_contour ( wks, prob(:,:,1), lres)
- plot2(2) = gsn_csm_contour ( wks, prob(:,:,2), lres)
- overlay( plot1(0), plot2(0) )
- overlay( plot1(1), plot2(1) )
- overlay( plot1(2), plot2(2) )
- resP = True
- resP@gsnPanelLabelBar = True
- resP@pmLabelBarWidthF = 0.85
- resP@pmLabelBarHeightF= 0.04
- resP@lbLabelFontHeightF = 0.015
- ;resP@pmLabelBarOrthogonalPosF = 0.12
- gsn_panel ( wks, plot1, (/3,1/), resP )
- end
复制代码 |
|