|
Hi Josh, Zero is a bit problematic for use as a bad-value, especially when
your data contains zeros. Try it this way: LET no_strat = if stratified[l=1:12@sum] eq 0 then 1 You don't need an "else" here. By default in an IF, if there is
no else it's treated as "else missing". As I've written that
command, the default missing-value of -1.e34 will be used for
missing-data. If you want to assign a particular missing-value,
then you can do that right on the LET command. LET/bad=-9999 no_strat = if
stratified[l=1:12@sum] eq 0 then 1 Also have a look in the documentation about the distinction
between IF and IFV. There can be valid values of 0 in data. Here's
a variable with one value that's 0 and another that's missing. yes? let var = {6, 2, 0, 2, , 3} yes? list IF var then 1VARIABLE : IF VAR THEN 1 SUBSET : 6 points (X) 1 / 1: 1.000 2 / 2: 1.000 3 / 3: .... 4 / 4: 1.000 5 / 5: .... 6 / 6: 1.000 yes? list IFV var then 1 VARIABLE : IFV VAR THEN 1 SUBSET : 6 points (X) 1 / 1: 1.000 2 / 2: 1.000 3 / 3: 1.000 4 / 4: 1.000 5 / 5: .... 6 / 6: 1.000 By the way, you shouldn't be able to X as a variable name. (Did Ferret really let you use that command? Or were you just simplifying for writing the question? A command with LET X = should return an error, " **ERROR: command syntax: cannot define: X") X is a reserved keyword , used to refer to the x coordinate of the grid, so it's best to use other variable names.
On 6/21/2019 8:40 AM,
JoshAB1995@xxxxxxxxxxx wrote:
--
Ansley Manke NOAA/PMEL Science Data Integration Group 7600 Sand Point Way NE 206-526-6246 |