# Re: [ferret_users] seting time-constant value to a map

```Hi,
I suppose I was not clear in my question.
```
The aim of my question is to test the consequence of monthly rainfall seasonality on the outputs of
```a hydrological model.

So I need  2 datasets:
- one with seasonality, ie12 different values
```
- one without seasonality, ie 12 identical values, each value being equal to the time average
```of the 12 values, so as the sum is the same in the 2 cases.

Consequently, if var1 is the seasonal dataset and is described as
var1(i, j, 1) = val1
var1(i, j, 2) = val2
....
var1(j, j, 12)= val12

the 2nd dataset will be:
var2(i, j, 1) = var1(i, j, l=@ave)
var2(i, j, 2) = var1(i, j, l=@ave)
...
var2(i, j, 12) = var1(i, j, l=@ave)
```
So, for a given (i, j), all the L values of var2 will be identical and equal to the L average.
```
Then my question is:
how computing var2 from var1 ?

Sincerly

Francois Delclaux

```
```Hi Francois,
To average over all of L, you can define a variable

yes? let var2 = var1[L=@ave]

Then var2 will depend only on X and Y.

```
I'm not sure if that is what you wanted. You can specify limits on the average, for instance var1[L=1:3@ave], or use a transformation, say a smoother. Make sure your X axis is defined as a MODULO axis, so that time wraps around from December to January. Then for instance you might define
```
yes? let var3 = var1[L=@SBX:3]

```
which would replace each value with the average of the times at L-1, L, and L+1.
```Or you could do an indefinite integral

yes? let var4 = var1[L=@IIN]

Ansley

DELCLAUX Francois wrote:
```
```Hi Ferret Users,

```
I have a 3D file with variable var1(I, J, L). This a monthly seasonal file where L varies from 1 to 12.
```
```
Now I would like to have time contant value for each value of L i.e. a new variable var2 as follows:
```var2(I, J, L) = var1(I, J, L@AVE) for L varying from 1 to 12.

What's the best procedure for getting var2  ?

Thanks

```
```
```
```

--
```
Francois DELCLAUX ------------------------------------------------------------
```UMR HydroSciences Montpellier
Universite Montpellier II - Place Eugene Bataillon
Case courrier MSE
```
34095 Montpellier Cedex 5 FRANCE http://www.hydrosciences.fr/ mailto: delclaux@xxxxxxxxxxxxxxxxxxx
```Tel : (33) (0)4 67 14 90 11      Fax : (33) (0)4 67 14 47 74
------------------------------------------------------------

```