[Thread Prev][Thread Next][Index]

Re: [ferret_users] List command problem

Hi Nicolas,
That does seem to have been a bug in Ferret v6.3. 
        FERRET v6.3 
        Linux(g77) 2.4.21-32 - 09/28/09
        30-Sep-15 09:23    

yes?  let ns = 10
yes?  say `ns-(ns/100),prec=0`
but not in more-recent versions:
        FERRET v6.93 
        Linux 2.6.18-398.el5PAE 32-bit - 11/13/14
        30-Sep-15 09:24    

yes? let ns = 10
yes? say `ns-(ns/100),prec=0`

On 9/30/2015 12:45 AM, Nicolas Freychet wrote:

Yes sorry I was only using the "list" command when I was trying to understand the computation problem. The problem comes from the `ns-(ns/100),prec=0` part, not the LIST command. And indeed I was trying to compute the 99 percentile from a serie of precipitation.

I think the version install on my server is 6.3. I should change it to see if it solves the problem.

But it is still strange to get a "*" as a result of `ns-(ns/100),prec=0` when ns=10. May be a bug from the 6.3 version.

2015-09-30 15:34 GMT+08:00 Marco van Hulten <marco.van-hulten@xxxxxxxxxxxx>:
Le 2015-09-30 Nicolas a écrit:
> Here is a problem I got when using the "list" command.

You are not using the LIST command in your example.

> I first define a number "ns", then use it to make some computation.
> let ns=`hsort[i=@ngd]`
> !-> DEFINE VARIABLE ns = 10
> let pctl99 = hval[i=`ns-(ns/100),prec=0`]
> !-> DEFINE VARIABLE pctl99 = hval[i=*]
> The "*" result from the `ns-(ns/100),prec=0` computation is really
> strange. It only accure when ns=10.

What is the content of hsort?

I cannot reproduce your problem:

yes? let aa = {0,10,20,,40,50,60,70,80,90,100}
yes? save/file=test.nc/clobber aa
 LISTing to file test.nc
yes? can var/all
yes? use test.nc
yes? sh data
     currently SET data sets:
    1> ./test.nc  (default)
 name     title                             I         J         K         L         M         N
 AA       {0,10,20,,40,50,60,70,80,90,100  1:11      ...       ...       ...       ...       ...

yes? let ns=`aa[i=@ngd]`
yes? let pctl99 = hval[i=`ns-(ns/100),prec=0`]
 !-> DEFINE VARIABLE pctl99 = hval[i=10]

I am using Ferret 6.9.

If needed, you can use the INT() function.


Laboratoire des Sciences du Climat et l'Environnement (LSCE)
Tel: +33 1 6908 3876
Www: http://www.lsce.ipsl.fr/Pisp/marco.van-hulten/

Consider liberating your papers and data -- https://creativecommons.org/

Nicolas Freychet
Postdoc Reseach Fellow at RCEC
Academia Sinica

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement