[Thread Prev][Thread Next][Index]

# Re: [ferret_users] "let" converts "d" to "k"?

```Hi Olivier,

Many thanks!

I found we can just use "... if k eq ..." in stead of "... if DUMMY_PR1
eq ..." to reduce waiting time. So that we can also omit the first
sentence and just use "let/quiet DUMMY_PR1 = if k eq 1 then PR1" to
start.

We then just need to specify k when using the variable PR or DUMMY_PR*,
since ferret seems to think k is unlimited for them.

Cheers,
Tony

On Wed, 2009-06-10 at 11:15 +0200, Olivier Marti wrote:
> Maybe you could try something like :
>
> let/quiet DUMMY_PR1 = PR1*0+K[K=1:6]  ! Creates K dimensions, and
> fills array
> let/quiet DUMMY_PR2 = if DUMMY_PR1 eq 1 then PR1 else DUMMY_PR1
> let/quiet DUMMY_PR3 = if DUMMY_PR1 eq 2 then PR2 else DUMMY_PR2
>
> .....
>
> let/quiet PR        = if DUMMY_PR1 eq 6 then PR6 else DUMMY_PR6
>
>
>
>
>
>
> Le 10 juin 09 à 09:46, Jian Ma a écrit :
>
> > Hi All,
> >
> > Is there any method to combine several variables with same i,j,l
> > dimensions to one variable aligned along k axis with Ferret?
> >
> > For example, I have:
> >
> > name     title                  I         J         K         L
> > PR1      precipitation_flux   1:256     1:128     ...       1:1200
> > PR2      precipitation_flux   1:256     1:128     ...       1:1200
> > PR3      precipitation_flux   1:256     1:128     ...       1:1200
> > PR4      precipitation_flux   1:256     1:128     ...       1:1200
> > PR5      precipitation_flux   1:256     1:128     ...       1:1200
> > PR6      precipitation_flux   1:256     1:128     ...       1:1200
> >
> > And I want to create a new variable to have all these data, like:
> >
> > name     title                  I         J         K         L
> > PR       precipitation_flux   1:256     1:128      1:6      1:1200
> >
> > Thanks,
> > Tony
> >
>

```

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement