C EOF code from Billy Kessler, PMEL. For cases where time series do not C have any gaps. Implemented 7/2001 Ansley Manke C C At end are routines count_eof and pack_eof written with Dai McClurg C to count the good timeseries and pack the X,Y,T array into an neof by T C array. C C C Ansley Manke Change dimension statements for arguments to be (*) or C (NX,*), etc. The work arrays in the calling functions C have extra space to accomodate I = 1,N... BB(I+1) in C QRSYM, for example. C C Declare all variables. C C Aug 2001 move to fer/efi directory, EPFs to be statically linked to Ferret. C Change INCLUDE statements to remove directory spec. C C c Date: Thu, 18 Jan 2001 16:44:10 -0800 (PST) c From: kessler@pmel.noaa.gov (Billy Kessler) c Subject: more EOF code (reverse time and space) c c The attached code (one file) contains the following subroutines: c c First set are three different front ends that call the c routines at bottom that do the work: c c EOFIN ! for usual EOFs (more times than locations) c EOFIN2 ! EOFs when there are more locations than times c EOFIN3C ! routine that allows weighting the data (probably c get rid of this one for ferret) c c These are the black-box routines that do the actual work c c FRACVAR ! find percent variance at each point c QRSYM ! call all the other routines in turn c HOUSEH ! Householder tridiagonalization of matrix c QRSTD ! find eigenvalues of tridiagonal matrix c TRIDIN ! find eigenvectors of tridiagonal matrix c BACKS ! does something c c * Actually, either EOFIN or EOFIN2 produces exactly the same c result (but see note 1). These two routines don't care about c zero eigenvalues, so there is really no restriction at all on c their use. However, EOFIN2 will be faster if there are more c locations than times. So a possible choice for this whole mess c would be just to use EOFIN for all cases (except for gappy time c series). That might be the most straightforward thing to do, c even if it is not the most elegant code. c c Notes: c c Note 1: The eigenvalues out of EOFIN2 differ from those of EOFIN c by the factor (NT/NX). THis is due to the fact that there are NT c non-zero eigenvalues produced by EOFIN2 (since it assumes that NT