# How do I deal with variables without dimension

```Hi ferret users,

I have daily mean wind velocity maps for several
months and I am working on calculating the
autocorrelation averaged on the whole grid, for
different lags in order to plot the mean
autocorrelation as a function of the lag. To do so, I
have written a script which computes the mean
autocorrelation for a specific lag. That script named
autocorrel.jnl works fine :

USE "../obs_era_uv.ctrl.nc"
let
p=UMEAN[d=1,x=20.00E:107.50E,y=22.50S:22.50N,z=200,T="01-AUG-1990":"31-jul-1992"@shf:0]
let
q=UMEAN[d=1,x=20.00E:107.50E,y=22.50S:22.50N,z=200,T="01-AUG-1990":"31-jul-1992"@shf:\$1]
go variance
let
R_xmean=CORREL[y=22.50S:22.50N,x=20.00E:107.50E@AVE]
let R=R_xmean[y=22.50S:22.50N@AVE]

Then I have another script which makes a loop over all
the lags I need and calls the previous script. Then
it's supposed to write the autocorrelation in a netcdf
file. Here is the script :

repeat/i=1:\$1 (go autocorrel
`i`;save/file=output_autocorrel.nc/append `i`,R)

My problem is that I only get the autocorrelation of
the last lag written down : it seems my script writes
over the previous output data. I guess it is because
the variable R has no time dimension (and even no
dimension at all).

So my question is : How can you add a dimension to a
variable. Especially as I only have 1 value of
autocorrelation each step, it's not a list.

If you have any other way to get an output file with
the autocorrelation and its corresponding lag, I would