significance in correlation plots

From: Noelia otero <noeli1680_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 10 2014 - 09:46:39 MDT

Hi,

I was trying to plot the correlations and adding a contour effect in the
95% significant areas. I follow some examples but I am not confident with
my result. This why I would like to know if I am in the right way to do
that:

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"

begin

        a =
addfile("/home/nof/pruebas/ensem_means/pr_Amon_CanCM4_historical_ensmean_t42_westA_meanJAS.nc","r")
        b =
addfile("/home/nof/pruebas/WAMI_CEOF/WAMI_Amon_CanCM4_historical_ensmean.nc","r")


        pr =a->pr
        wami =b->WAMI(:,0,0,0)
        lat = a->lat
        lon = a->lonlat@units="degrees_north"

        correl=escorc(wami,pr(lat|:,lon|:,time|:))
        correl!0="lat"
        correl!1="lon"
        correl&lat=lat
        correl&lon=lon

        ;***significant values
        sig = 0.05
        um = rtest(correl(lat|:,lon|:),45,0)
        um!0="lat"
        um!1="lon"
        um&lat=lat
        um&lon=lon

        wks = gsn_open_wks("pdf","example")

        res = True
        res@gsnAddCyclic = False
        res@cnFillOn = True
        res@cnLinesOn = True
        res@mpMinLong = min(correl&lon)
        res@mpMinLatF = min(correl&lat)
        res@mpMaxLonF = max(correl&lon)
        res@mpMaxLatF = max(correl&lat)
        ;plotting first
        plot = gsn_csm_contour_map_ce(wks,correl,res)

        res2 = True ; res2 probability plots
        res2@gsnAddCyclic = False

        res2@gsnDraw = False ; Do not draw plot
        res2@gsnFrame = False ; Do not advance frome

        res2@cnLevelSelectionMode = "ManualLevels" ; set manual contour
levels
        res2@cnMinLevelValF = 0.00 ; set min contour level
        res2@cnMaxLevelValF = 1.05 ; set max contour level
        res2@cnLevelSpacingF = 0.05 ; set contour spacing

        res2@cnInfoLabelOn = False ; turn off info label

        res2@cnLinesOn = False ; do not draw contour
lines
        res2@cnLineLabelsOn = False ; do not draw contour labels

        res2@cnFillScaleF = 0.6 ; add extra density
        map_ce(wks,correl,res)
        plot2 = gsn_csm_contour(wks,um, res2) ;
        plot2 = ShadeLtContour(plot2, 0.05, 2) ; plotting significant
areas

        overlay (plot, plot2)

        draw (plot)
        frame(wks)


end

My doubts come from plot2 = ShadeLtContour(plot2, 0.05, 2) , would it be
OK to show the 95% significance?? because I did the same plot in grads
(just defining a threshold based on t-student), but the plots looks like a
little bit different..

Thanks in advance!

Cheers

Received on Thu Jul 10 03:46:45 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:47 MDT