[Thread Prev][Thread Next][Index]

Re: Quick question



hi Marcelo,

There are many solutions to this. One is

     DEFINE SYMBOL len `My_var[i=1,j=1],return=lsize`
     let t=Another_var*(( ($len) - 2 )^0.5)

see http://ferret.wrc.noaa.gov/Ferret/Documentation/Users_Guide/v50/chapter3.html#RETURN size shape

for more details

    - steve

============================

Marcelo Barreiro wrote:

> Hi all,
>
> Suppose I have an XYT variable and want to know the length in time of
> the variable and then use the result to define another variable.
>
> If I use
>
> let N=My_var[l=@NGD]
>
> then I will get an XY variable. Because all the points have the same
> number of points in time I used
>
> let N=My_var[l=@NGD,x=@MAX,y=@MAX]
>
> and I got the length N. OK. But when I try to use N to define another
> variable, like
>
> let t=Another_var*((N-2)^0.5)
>
> it send an error message:
>
> **ERROR: all data have same value: data are all flagged as bad
>
> How can I then find the length of a variable and use it to define another
> variable?
>
> Thanks!
>
> Marcelo
>
> ================================================
> Marcelo Barreiro
> Dept. of Oceanography, Physical Section
> College of Geosciences and Maritime Studies
> Texas A&M University
> College Station, TX 77843-3146
> Phone: (409) 845-3238
> Email: marcelo@ocean.tamu.edu
> URL: http://www-ocean.tamu.edu/~marcelo/
> ================================================

--
Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement