How to get pcvar_varimax when using eofunc_varimax?

From: §d©y¬L <yichaowu0527_at_nyahnyahspammersnyahnyah>
Date: Tue, 4 Sep 2007 11:11:55 +0800

      Hi,

      I used eofunc_varimax to do a rotated EOF analysis but the variance returned were alwasy the same. I noticed that in your reply to other people who asked the same question in April, you indicated that the new version will solve this problem. So I downloaded the latest version (ncl-4.3.1.Linux_i686_gcc3) and replaced the old NCL library with the new one (all files in the directory lib/ncarg and "libnclapi.a" are updated). However, neither eofunc_varimax nor eof_varimax returnes the correct pcvar_varimax. Is this because I updated the library only but not the entire NCL package? Or is there somthing
      else missing?

      Below is my code and the responses. Thanks.

      Yi-chao Wu

      ------------------------------------------------------------------------------------------
         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

         f=addfile("strm85.nc","r")
         str85=f->str85

        printVarSummary(str85)

        st85=str85(latitude|:,longitude|:,time|:) ;indian

        time=ispan(1958,2005,1)
        lat1=st85&latitude
        lon1=st85&longitude

        neval =3
        ev_cor = eofunc(st85,neval,1)
        ev_ts = eofcor_ts(st85,ev_cor)
        printVarSummary(ev_cor)
        print(ev_cor_at_pcvar)
        ev_rot = eofunc_varimax(ev_cor,1)
        ev_rot_ts = eofcor_ts(st85,ev_rot)
       ; eof_varimax_reorder ( ev_rot ) ; reorder the information
       ; printVarSummary(ev_rot)

        ev_cor!1="lat"
        ev_cor!2="lon"

        ev_cor&lat=lat1
        ev_cor&lon=lon1

        ev_rot!0="Rotated EOF"
        ev_rot!1="lat"
        ev_rot!2="lon"

        ev_rot&lat=lat1
        ev_rot&lon=lon1

        printVarSummary(ev_rot)
        print(ev_rot_at_pcvar_varimax(0))
        print(ev_rot_at_pcvar_varimax(1))
        print(ev_rot_at_pcvar_varimax(2))

      ------------------------------------------------------------------------------------------------

       Copyright (C) 1995-2006 - All Rights Reserved
       University Corporation for Atmospheric Research
       NCAR Command Language Version 4.2.0.a034
       The use of this software is governed by a License Agreement.
       See http://www.ncl.ucar.edu/ for more details.

      Variable: str85
      Type: float
      Total Size: 205632 bytes
                  51408 values
      Number of Dimensions: 3
      Dimensions and sizes: [time | 48] x [latitude | 21] x [longitude | 51]
      Coordinates:
                  time: [ 0.. 47]
                  latitude: [-12.5..37.5]
                  longitude: [ 95.. 220]
      Number Of Attributes: 9
        comments : Unknown1 variable comment
        long_name : stream function (850 mb)
        units :
        grid_name : grid-1
        grid_type : linear
        level_description : Earth surface
        time_statistic : instantaneous
        missing_value : -9.99e+33
        _FillValue : -9.99e+33

      Variable: ev_cor
      Type: float
      Total Size: 12852 bytes
                  3213 values
      Number of Dimensions: 3
      Dimensions and sizes: [3] x [21] x [51]
      Coordinates:
      Number Of Attributes: 5
        _FillValue : -9.99e+33
        method : transpose
        matrix : covariance
        pcvar : <aRRAY>
        eval : <aRRAY>
      (0) 61.65483
      (1) 11.9065
      (2) 8.448109

      Variable: ev_rot
      Type: float
      Total Size: 12852 bytes
                  3213 values
      Number of Dimensions: 3
      Dimensions and sizes: [Rotated EOF | 3] x [lat | 21] x [lon | 51]
      Coordinates:
                  lat: [-12.5..37.5]
                  lon: [ 95.. 220]
      Number Of Attributes: 1
        pcvar_varimax : <aRRAY>
      (0) 0.09337068
      (0) 0.09337068
      (0) 0.09337068
     

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 03 2007 - 21:11:55 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 05 2007 - 07:49:00 MDT