I'm calculating the annual mean of a monthly SST dataset with the following syntax using the duration feature:
ncra -O -F --mro --dmn time,1,,12,12 infile.nc outfileAVG.nc
However, some of the missing values of my dataset seem to be changed in the averaging.
When I examine the outfile, some of the values of "_," from the infile appear as "Infinityf" in the outfile.
This problem does not seem to occur when I do a simple "ncra" on the whole input file without the duration feature.
This is how _FillValue is defined in the input file:
float sst(time, latitude, longitude) ;
sst:_FillValue = -1.e+30f ;
Any ideas what is going on?
I'm running nco 4.3.8 and netcdf 4.3.0 on MacOS 10.9.
I've posted links to the files here:
(infile.nc is a selection from the HadSST3 dataset):
Hmm. I see what you mean from the output file that you posted.
However, I am unable to reproduce the results in Linux from the input file you posted. Under Linux, with the just-released 4.3.9, I get a normal output file with not Infinity's. This is likely a bug. Thank you for reporting it. Will post more when I know more.
I now understand what causes the problematic behavior you encountered. I think the bug was introduced in NCO 4.3.6 in September. I'm still thinking how best to fix it. In the meantime, I think this workaround may work for your case: add the switch --flt to the command. Please let me know if this does not work. Will post more when I've committed a fix.
OK, I just committed a tentative fix to this problem. Would appreciate any feedback on whether it works for you. Thanks!
Thank you Charlie! The averaging works properly with the switch --flt. I'll let you know how the committed version works when I update NCO.
Log in to post a comment.