Maximum Covariance Analysis

From: <leonardo.silva_at_nyahnyahspammersnyahnyah>
Date: Fri Nov 27 2009 - 09:06:57 MST

Hi all,

I'm a new ncl user and I would like to construct an Atlantic
Meridional Mode (AMM) Index like done by ERSL
( I have to
apply a Maximum Covariance Analysis to a SST field (left field) and
the zonal and meridional 10m wind (right field) through a Singular
Value Decomposition (SVD). I have to extract the first left (SST) and
right (winds) maps resulting from singular value decomposition of the
covariance matrix. The AMM time series is calculated via projecting
SST or the 10m wind field. onto the spatial structure resulting from
the MCA.

I tried to construct that thing using the scrpt below:

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"

   latS = -21.
   latN = 32.
   lonL = -74.
   lonR = 15.

   nsvd = 2
   ncolf1 = 1316
   ncolf2 = 1316

   homlft = new((/nsvd,ncolf1/),float)
   hetlft = new((/nsvd,ncolf1/),float)
   homrgt = new((/nsvd,ncolf2/),float)
   hetrgt = new((/nsvd,ncolf2/),float)

   f1 = addfile ("", "w")
   tsm = f1->tsurf
   f1!0 = "time"
   f2 = addfile ("", "w")
   u = f2->u10
   tempsup = tsm( time|:, lat|:, lon|: )
   uwnd = u( time|:, lat|:, lon|: )

   covar = svdcov(tempsup(time|:, tsurf|:),uwnd(time|:,

   asciiwrite("mca.dat", covar(0,:))

and I got it like answer:

ncl 28> covar = svdcov(tempsup(time|:, tsurf|:),uwnd(time|:,
fatal:Number of subscripts do not match number of dimensions of
variable,(2) Subscripts used, (3) Subscripts expected
fatal:Execute: Error occurred at or near line 28

I have more one question:

How can I put the wind (u+v) components onto a one variable? Have I to
sum the u and files?



ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Fri Nov 27 09:07:08 2009

This archive was generated by hypermail 2.1.8 : Sun Nov 29 2009 - 20:52:58 MST