a regression question

```
Hi Ferret Users,

I'm trying to regress a dataset onto a seperate time series.  The time
series has 17 levels with each level having 14610 time points.  I've
normalized the time series so that it has 0 mean and variance of 1.  I
only want to regress the djf data onto the djf time series.  I couldn't
really think of a good way to do this so here's a sample of the .jnl file
that I'm using to just do the 1000mb surface:

set memory/size=100
use aoindex.cdf
use hgtanom.1958.nc
let tempa58=hgtanom[d=2,z=1000,t=1-jan-1958:28-feb-1958]*ao[d=1,z=1000,gt=`hgtanom[d=2],return=GRID`@asn]
let testa58=tempa58[t=1-jan-1958:28-feb-1958@sum]
save/file=hgtanomtemp.1000.nc/clobber testa58
cancel data/all
cancel variables/all
use aoindex.cdf
use hgtanom.1958.nc
let
tempb58=hgtanom[d=2,z=1000,t=1-dec-1958:31-dec-1958]*ao[d=1,z=1000,gt=`hgtanom[d=2],return=GRID`@asn]
let testb58=tempb58[t=1-dec-1958:31-dec-1958@sum]
use hgtanomtemp.1000.nc
let test58=testa58+testb58
save/file=hgtanomtemp.1000.nc/clobber test58
cancel variables/all
cancel data/all
use aoindex.cdf
use hgtanom.1959.nc
let
tempa59=hgtanom[d=2,z=1000,t=1-jan-1959:28-feb-1959]*ao[d=1,z=1000,gt=`hgtanom[d=2],return=GRID`@asn]
let testa59=tempa59[t=1-jan-1959:28-feb-1959@sum]
let tempb59=hgtanom[d=2,z=1000,t=1-dec-1959:31-dec-1959]*ao[d=1,z=1000,gt=`hgtanom[d=2],return=GRID`@asn]
let testb59=tempb59[t=1-dec-1959:31-dec-1959@sum]
use hgtanomtemp.1000.nc
let test59=testa59+testb59+test58[d=3]
save/file=hgtanomtemp.1000.nc/clobber test59
.....

and it continues to the end of the time series.

The problem with this is...it's seems to give the wrong answer.  After
plotting the final results and comparing them with the pattern I should
have gotten, they really don't match up.  More importantly, I picked a
point in space and did the regression in excel and it's very different
than the result returned by my ferret routine (-1.5 returned by ferret, 45
returned by excel).  This says to me that something is buggy in my ferret
better way to do this that doesn't rely on temp variables but I couldn't
find a clean way around them because a) no recursions in the variables and
b) I needed to open up more than 30 different files at a time that were
not continuous in time.

Thanks for the help,

Brent

--
Brent A. McDaniel

Dept of Earth and Atmospheric Sciences
Georgia Institute of Technology
Atlanta, Ga.  USA

```

Dept of Commerce / NOAA / OAR / PMEL / TMAP