Also, it used to work fine in 4.2...
Henry, not sure I understand. Shouldn't everything still work even if miss defaults to 9.9692099683868690e+36? See the extended version of the script(options_test.nc.cdl). When the script reaches this line: if (Nofx<0 || Nofx==miss) Nofx=0; Nofx is equal to 5 and miss is 9.9692099683868690e+36. However, Nofx==miss return true and, as a result, Nofx gets assigned 0. Why is that?
Never mind. Nofx being equal to 0 is a different bug it seems - on line 17, NCO seems to think Nofx (5) is equal to the fill value (9.96920996839e+36). I think I've seen this before, but don't remember details. 4.2.1.1 does not seem to have these problems.
It also seems that although renaming variables lets the code to go through, the results of the computation are still incorrect. The attached is a full version of the code. At the end of the script, Nofx and Nofy are both 0, wich is incorrect (they should be equal 5).
You are alwasy welcome, Charlie :)
ncap2 does not like certain variable names
Thanks Charlie!
Sorry, yes, I meant C logic, wich indeed is pretty much identical to C++ (I'm by...