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]`
!-> DEFINE VARIABLE ns=10
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.
Marco
--
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/