Feb 4: Spatal analyss of data felds Mappng rregularly sampled data onto a regular grd Many analyss technques for geophyscal data requre the data be located at regular ntervals n space and/or tme. hs s so for spectral analyss, dgtal flterng and wavelet analyss. Other technques, such as calculatng emprcal orthogonal functons from a set of spatally dstrbuted data observed at the same tmes (though not necessarly at regular ntervals,.e. Δ t constant) often requre that gaps n the data be flled. hs s true, for example, n the case of satellte observatons where clouds partally obscure the feld of vew, or are subject to data drop out from nstrument or algorthm falngs. In oceanography and meteorology, clmatologes (e.g. seasonal or monthly means) are typcally computed from a complaton of observatons made at rregular locatons and tmes, frequently wth a samplng dstrbuton that can lead to regonal or temporal bases f care s not taen to recognze and address these n the mappng procedure. hese next few lectures wll address technques for producng regularly grdded maps from rregularly sampled data. hese technques have characterstcs of both smoothng and flterng (removng tme/space scales) and nterpolaton (spannng gaps n observatons). We begn by revewng some bascs of matrx and vector algebra, drawng on the Basc Machnery descrbed n Chapter 3 of Wunsch (996). [Wunsch, C., he Ocean Crculaton Inverse Problem, Cambrdge Unversty Press, 44 pp., 996.] Matrx and vector algebra, least squares fttng va the normal equatons opcs covered: Revew of lnear algebra conventons, defntons and rules Weghted least squares Conventonal least squares va the normal equatons Least squares soluton to data desgn matrx equaton John s old notes (scanned) for lnear algebra lecture Lnear algebra defntons: Matrx of M by values: { j} A = a,, M, j Vector of values and ts transpose
q q q = q q = [ q q q ] Inner product he nner, or dot product, of two vectors s ab=ab cosθ where θ s the angle (n -dmensonal space) between the two vectors. If θ = 0 then the vectors are parallel. If θ = π / then the vectors are orthogonal. In more general terms, ab= = = ab from whch t follows that both vectors must be of length (.e. they are conformng) n order to compute the summaton. Bass set Suppose we had vectors e, each of dmenson (length). If t s possble to represent any arbtrary -dmensonal vector, f, as a weghted sum of the vectors, e f = αe = then the e are a called a spannng set, (or more commonly a bass set) because they are suffcent to span the entre -dmensons. o have ths property, the e must be ndependent, meanng that no sngle one of the e can be represented as a weghted sum of the others excludng tself.
he coeffcents α of the expanson can be found by solvng a set of smultaneous equatons descrbng the projecton of f onto each of the e. = αee = ef hs s easly solved n the case that the e are mutually orthogonal and normal (have unt length), n whch case we call them orthonormal. Egenvectors and egenvalues Matrx multplcaton can be thought of as a transformaton of vector x nto vector y Ax = y If vector v has the property that the transformaton leaves ts drecton unchanged, then v s sad to be an egenvector of matrx A. Av = λv If A s square of dmenson, there are egenvectors and they are orthogonal, each wth a correspondng egenvalue λ n : Av = λ v n n n A matrx composed of the egenvectors, say Q, satsfes - A=QΛQ If A s symmetrc, t wll have real egenvalues and orthonormal egenvectors that form a bass set. Orthonormal vectors Orthonormal vectors satsfy the property: ee = δ where δ s the Kronecer delta: δ = f =, (normal) and δ = 0 f (orthogonal).
hen = αδ = α = ef s the projecton of f onto bass vector e and we have easly solved for the coeffcents α. Matrx multplcaton Matrx multplcaton s C P = A B th row of A tmes j th column of B j p pj p= whch requres the dmensons be conformable Mx ~ MxP Px (he requrement that matrx operatons be conformable s your frend n Matlab.) We wrte C=BA Matrx operaton rules: AB BA multplcaton s not commutatve ABC = (AB)C = A(BC) multplcaton s assocatve ( ) AB = B A the expanson of transpose product trace( A ) = a s sum of dagonal elements = A symmetrc matrx has the property A=A so the product product of all rows of the matrx wth themselves. A A s the dot he dentty matrx s symmetrc: 0 0 I = 0 0 so each element Ij = δj 0 0 he nverse of a matrx A s denoted A and defned such that A A = I It follows that
( ) - - - AB = B A orm or length he length or norm of a vector can be defned n many ways, but the conventonal l norm s defned ( ) / f f = f f = = he Cartesan dstance between two vectors s ( x x ) ( y y ) a-b = ( a-b) ( a-b ) = + a b a b / Sometmes the dstance between two vectors s weghted n = ( ) / c = cw c = c Wc where n order to be useful the weghtng matrx would usually be symmetrc and postve defnte. Dfferentaton Consder a scalar, J, (a sngle number, not a vector) that s the product J = rq= qr (so the vectors must be conformable) Dfferentatng ths scalar wth respect to the vector q produces a vector gradent as the result qr = rq = r ( ) ( ) much le the dfferentaton usng the product rule for any two varables r and q.
( rq) = r For a quadratc form where the scalar J may be wrtten: J = qaq (ths requres the matrx A be x) we get J = ( + A A ) q much le the dfferentaton of a quadratc product Aq ( Aq ) = Aq Most spatal analyss of data that entals fttng or smoothng data to ft some statstcal or dynamcal model, nvolves some form of weghted least squares fttng. Least squares fttng In smple least squares fttng of a set of observatons to a lnear functon, or lnear regresson, what s assumed s that a set of observatons y can be descrbed by a model y() t = θ () t + n() t = a+ bt+ n() t Here, n(t) s the measurement nose and s the source of the msft between the observatons and the model. We can wrte ths as a matrx equaton: where Ex + n = y t n y a E= x= n= = b y t M n M y M
Havng zero error would be exceptonal, so n general the parameters a and b wll represent a best possble ft of the model to the observatons. We have many more data ponts that the parameters a and b, so the probel s sad to be over determned. Frequently, the measure of best ft s the parameter choce that mnmzes the mean squared msft of model and data. M = ( ) ( ) ( ) ( ) ( ) mn J = n = nn= Ex-y Ex - y = Ex Ex - y Ex - Ex y + y y Each of these terms s a scalar, so each s ts own transpose. So, ( ) ( ) y Ex = y Ex = Ex y Ex y xey so we have Also, ( ) = J = xeex-xey + y y o mnmze, we dfferentate wth respect to x and set to zero, antcpatng a mnmum. hs leads to the set of normal equatons J = ( EEx- ) Ey = 0 x ( EEx- ) = Ey Assumng the nverse of the normal equatons matrx exsts, the soluton s ( ) - x= E E E y o assumptons have been made about the statstcal probablty densty functons of the errors n. Let s gve some consderaton to how the estmated parameters of the model ft, a and b denoted by x are affected by the random elements of the observatons. Assume the estmated values are unbased, then the true x = x (expected values).
he uncertanty n the estmated values s descrbed by ther varance about the true mean. true true P = x-x x-x true ( EE) E x nn EEE ( ) = - - In the specal case that we have uncorrelated errors, observatons are nown wth an uncertanty ± σ n nn = σ n I,.e. all the So the uncertanty n the parameter estmates s P = σ n ( EE ) and the uncertanty n the estmated derved from these parameters s - y est =Ex est y -y =n P = (n - n)(n - n) - = σ (I - E(E E) E ) n est est (see Wunsch secton 3.3 for detals). You should, at the very least, examne the resduals of the model ft compared to the data to see s they are randomly dstrbuted.