# Maximum Covariance Analysis

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
(http://www.esrl.noaa.gov/psd/data/timeseries/monthly/AMM/). 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:

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)

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

covar = svdcov(tempsup(time|:, tsurf|:),uwnd(time|:,
tsurf|:),nsvd,homlft,hetlft,homrgt,hetrgt)

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

and I got it like answer:

ncl 28> covar = svdcov(tempsup(time|:, tsurf|:),uwnd(time|:,
tsurf|:),nsvd,homlft,hetlft,homrgt,hetrgt)
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 v.nc files?

Regards

Leonardo

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
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