[Thread Prev][Thread Next][Index]
answer to "on accumulate a number"
> The purpose of doing something like: repeat/t=`t1`:`t2`:`dt` (let A=A+1)
> is to output the calculation result within the repeat loop every 1 month
> by determining if mod((A-1)*dt,1month) is zero.
>
> The calculation in that loop needs the updated information every 1 hour,
> the dt.
Hi,
The above can be done by the follows:
repeat/t=`t1`:`t2`:`dt` (go test)
In test.jnl
let tmax=(t-`t1`)
let tacc=1month
if mod(tmax,tacc) = 0 then do whatever
Thanks again for Joerg and Mick's replies.
Dongxiao
>
> --------------------------------------------------------------------
> Dr. Dongxiao Zhang
> NOAA/PMEL Bld#3
> 7600 Sand Point Way NE
> Seattle, WA 98115-0070
> Phone : (206)526-4184
> --------------------------------------------------------------------
>
> On Wed, 6 Sep 2000, Dongxiao Zhang wrote:
>
> > Hi all,
> >
> > Is there a way to accumulate a number through the repeat loop?
> >
> > In Fortran, we can do it by: do i=1:10
> > A=A+1
> > enddo
> >
> > But in Ferret, repeat/t=`t1`:`t2`:`dt` (let A=A+1) is illegal.
> >
> > Any suggestions. Thanx.
> >
> > Dongxiao
> >
> > --------------------------------------------------------------------
> > Dr. Dongxiao Zhang
> > NOAA/PMEL Bld#3
> > 7600 Sand Point Way NE
> > Seattle, WA 98115-0070
> > Phone : (206)526-4184
> > --------------------------------------------------------------------
> >
> >
> >
>
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement