statistics for Taylor Diagrams

From: FERMEPIN Solange <solange.fermepin_at_nyahnyahspammersnyahnyah>
Date: Thu May 16 2013 - 08:50:06 MDT

Hello everybody,

I am trying to make some Taylor Diagrams. I was following the example
taylor_3.ncl while using the statistics defined in taylor_7.ncl.

I was getting ~0 correlation coeficient fot only two variables in my
timeseries and reasonable values for all the others.

I wrote again the pattern correlation by following "Taylor Diagram
Primer" document posted in the site.

I re run the script and now I get reasonable values (where before I got
~0) and exactly the same values for all the other variabales.

Does anyone have any idea why? Is there any statistical reason that I am
missing?

I am using ncl version 6.1.2. Below the relevant parts of my code:

Thanks a lot!
Solange

;;; Statistics part of the script

  ratio = new((/ncase, nvar/),float)
  cc = new((/ncase, nvar/),float)

  gcm = new((/ntim,nlat,nlon/),float)
  obs = new((/ntim,nlat,nlon/),float)
  do nc=0,ncase-1
   do nv=0,nvar-1

    gcm = all_gcm(nc,nv,:,:,:)
    obs = all_obs(nc,nv,:,:,:)

    tot_area = sum(aire)
    tot_gcm = sum(aire*gcm)
    tot_obs = sum(aire*obs)
    mean_gcm = tot_gcm/tot_area
    mean_obs = tot_obs/tot_area

    wvar_gcm = sum(aire*(gcm-mean_gcm)^2)/tot_area
    wvar_obs = sum(aire*(obs-mean_obs)^2)/tot_area

;NCL
    wcc_gcm = (sum(aire*gcm*obs)-tot_gcm*tot_obs/tot_area)/ \
 
((sum(aire*gcm^2)-tot_gcm^2/tot_area)*(sum(aire*obs^2)-tot_obs^2/tot_area))^0.5

;ME
    ;wcc_gcm = sum(aire*(gcm-mean_gcm)*(obs-mean_obs))/tot_area/ \
    ; (wvar_gcm*wvar_obs)^0.5

    ratio(nc,nv) = (wvar_gcm/wvar_obs)^0.5
    cc(nc,nv) = wcc_gcm

   end do
  end do

-- 
Solange Fermepin, PhD student
Laboratoire de Météorologie Dynamique - CNRS/IPSL
Tour 45-55, 3ème étage
4 place Jussieu
75252 Paris cedex 05
France
Tel: +33 (0) 1 44 27 52 77
E-mail: solange.fermepin@lmd.jussieu.fr
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 16 08:51:10 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT