[Thread Prev][Thread Next][Index]

[ferret_users] defining a variable in a loop



Hi everybody,

I would like to define a variable according a direction in a loop, but I
can't manage to do that.

I do :

repeat/range=1:47/name=jj \
(let i_pt=pt_lon[d=2,i=`jj`]; \
let j_pt=pt_lat[d=2,i=`jj`]; \
let T_model=votemper[d=1,i=`i_pt`,j=`j_pt`,l=8]; \
let S_model=vosaline[d=1,i=`i_pt`,j=`j_pt`,l=8])

Of course, my variables "S_model" and "T_model" are overwritten at each
step, whereas I would like those variables to be defined in the
i-direction with i being increased in the loop.

I would like to do :

repeat/range=1:47/name=jj \
(let i_pt=pt_lon[d=2,i=`jj`]; \
let j_pt=pt_lat[d=2,i=`jj`]; \
let/i=`jj` T_model=votemper[d=1,i=`i_pt`,j=`j_pt`,l=8]; \
let/i=`jj` S_model=vosaline[d=1,i=`i_pt`,j=`j_pt`,l=8])

So that T_model and S_model would have 47 components in the i-direction.
But that doesn't seem to be allowed. How can I do ?

Thanks,

Angélique Melet




[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement