[Thread Prev][Thread Next][Index]

[ferret_users] Re: fill nearest ??



Oups sorry. Always read twice the documentation...

Indeed I read in the FNR transform paragraph :
"In the case of points being equally spaced around the missing point, the mean value is used".

I was confused because in the example I was working on, interpolation has no sense. Imagine a type of photoplancton, an interpolation brings a specie that was not initially present.
I was really expecting a nearest filled even in the case of equally spaced.

Anyway the problem is there when an axis irregular is set (second part of my mail).

Patrick

Hi,

Why the filled nearest transform does not find the nearest value ?

Try:
yes? let A={4,-1E+34,6}
yes? list A,A[i=@FLN]
            X: 0.5 to 3.5
Column  1: A is {4,-1E+34,6}
Column  2: A[X=@FLN:1] is {4,-1E+34,6} (linear-filled by 1 pts on X)
            A     A
1   / 1:  4.000  4.000
2   / 2:   ....  5.000
3   / 3:  6.000  6.000

It should be 4 or 6 not 5 which is a interpolation value ?
Same thing if the variable A is set along an axis

yes? def axis/x myx1={1,2,5}
yes? let B=A[gx=myx1@asn]
yes? list B, B[x=@FNR]
            X: 0.5 to 6.5
Column  1: B is A[GX=MYX1@ASN]
Column  2: B[X=@FNR:1] is A[GX=MYX1@ASN] (nearest-filled by 1 pts on X)
            B     B
1   / 1:  4.000  4.000
2   / 2:   ....  5.000
5   / 3:  6.000  6.000

I think there is a problem and I suspect that FNR and FLN act the same way.
Can this be confirmed ?

Tested with ferret v6.61

Patrick




--
LSCE/IPSL, Laboratoire CEA-CNRS-UVSQ
Data Analysis and Visualization Engineer
IPSL Global Climate Modelling Group
mailto:Patrick.Brockmann@xxxxxx
01.69.08.32.24 --> LSCE (Orme des merisiers 712, Bureau 11)
http://www.ipsl.jussieu.fr/~brocksce/
--



[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement