[Thread Prev][Thread Next][Index]
Re: list discarding missing values
J-M Epitalon wrote:
Hello,
I have a 1-D variable. I would like to list values only when satisfying
a conditional expression.
Actually, the condition applies to an associated variable that has the
same dimension.
I know how to mak my variable according to the condition but I don't
know how to list only unmasked values.
Could anyone, please, give me a hint ?
Hi Jean-Marie,
Look at the compressi function.
Here is an example:
yes? use levitus_climatology
List a vector
yes? list temp[i=23,k=1]
Remap on a choosen axis
yes? let vector1=xsequence(temp[i=23,k=1])
yes? list vector1
Compress vector
yes? let vector2=compressi(vector)
yes? list vector2
Find number of good point
yes? list vector2[i=@ngd]
Define a new variable with only unmaked values
yes? def sym maxindexvector=`vector[i=@ngd]`
yes? let vector3=vector2[i=1:($maxindexvector)]
yes? list vector3
Patrick
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement