NCO Homepage
Author: Charles S. Zender
Keywords: NCO news, netCDF, netCDF operator, GCM, scientific data

## NCO News

1999/08/31: A bug involving `ncwa`, weights, and missing values has been identified and fixed. When `ncwa` was used to average variables with user-specified weights (i.e., -w wgt was used) and every value in a target hyperslab was the missing value (i.e., missing_value), then `ncwa` would erroneously set the average value of the target hyperslab to 0.0 rather than to missing_value. Thus some values which should have been missing_value in the output file were, instead, set to 0.0. No operators besides `ncwa` were affected by this bug. This bug is fixed in nco-1.1.38. A new feature has been implemented in `ncwa`. `ncwa` used to exit with an error whenever it was called without any user-specified dimensions to average, i.e., when the `-a` was not invoked. Now when `ncwa` is invoked without any user-specified dimensions, it averages over all dimensions. Thus the behavior of `-a` is now analogous to that of `-d` and of `-v`. See the User's Guide for details.

1999/08/29: NCO now builds completely with pure C source files by default. In the past, NCO used Fortran routines to perform floating point arithmetic and pure C builds could be manually enabled by specifying -DC_ONLY in the build environment. The interface between Fortran and C, however, was very difficult to maintain on the wide variety of platforms supported by NCO. Now pure C builds are the default and Fortran arithmetic must be manually enabled by specifying -DUSE_FORTRAN_ARITHMETIC in the build environment. See the User's Guide for details. The Fortran code is no longer supported and will probably be deprecated in future releases.

1999/08/05: NCAR users will be pleased to know that NCO now takes advantage of the local `msrcp` command, if it exists in a standard location on the local network. This allows all operators to retrieve files from the NCAR mass storage unit when `msrcp` is available on the local system. This change is transparent to the user, so that commands should still specify the paths to the files on the mass store with, e.g., `ncks -O -R -l ./ /ZENDER/nc/in.nc foo.nc`. See the User's Guide for more details.

1999/07/03: `ncatted` now replaces missing values of variables whose missing_value attribute is changed. When the internal floating point representation of a missing value, e.g., 1.0e36, differs between machines then netCDF files produced on those machines will have incompatible missing values. `ncatted` now changes the missing_value attribute and the missing data self-consistently. This allows the user to change the missing values in files from different machines to a single value so that the files may then be concatenated together, e.g., by `ncrcat`, without losing any information.

1999/05/09: `ncks` now alphabetizes output by default. To turn off alphabetization and return to the previous behavior (variables reported in the order they were written to disk) simply specify ``-a'` on the command line. Yes, that means the behavior of ``-a'` has been toggled.

`ncrcat` and `ncra` now support a stride in the record dimension (and only the record dimension!), e.g., `ncra -d time,1,100,12 in1.nc in2.nc ... out.nc` should now work correctly. Strides in any dimension remain available with `ncks`, of course.

`ncrcat` and `ncra` now support index-based hyperslabbing in the record dimension across files, e.g., `ncra -d time,1,100 in1.nc in2.nc ... out.nc` The User's Guide claimed this feature had already been implemented, but, due to an oversight, that was not true. Attempting to use this new feature in older versions of NCO resulted in an "index out of range" error. Thanks to John Truesdale for pointing this out.

1999/04/20: Fixed bug where `ncrcat` and `ncra` omitted the last slice of the record dimension when ``-F'` (Fortran indexing) was user-specified AND user-specified hyperslab information was provided for some dimensions BUT not for the record dimension. This bug only affected `ncrcat` and `ncra` and only under these conditions. Thanks to John Sheldon for pointing this out.

1999/04/04: By default, extracted variables appear in the same order in which they were written to the source netCDF file. However, this order is often essentially random, making it hard to locate a particular variable in a dump of many variables. To help address this, `ncks` will now alphabetize variables. Simply specify ``-a'` on the command line.

1999/01/21: An optional token has been added to NCO which eliminates all netCDF 3.x calls and thus restores compatibility of NCO with HDF files.

1998/12/02: `ncwa` has been updated again since a user discovered a bug which occurred when a weight (``-w'`) and a mask (``-m'`) were both given to `ncwa`. Unfortunately, `ncwa` sometimes produced incorrect answers in this scenario so if you ever used weights and masks at the same time you are strongly urged to upgrade your NCO and rerun the commands. This bug only affected variables averaged with both the weight and mask options enabled at the same time, no other variables would have been affected.

The ``-n'` and ``-W'` normalization options to `ncwa` have been removed, possibly permanently, but at least until their implementation is simplified and redesigned. The ``-N'` option to `ncwa` remains the same. All the new behavior is fully documented in the rewritten and expanded `ncwa` section in the NCO User's Guide.

1998/11/24: Choose whether to weight your coordinates in `ncwa` A ``-I'` switch has been added to `ncwa`. Henforth, by default, `ncwa` applies weights or masks to coordinate variables just like any other variable. Previously, `ncwa` did not weight coordinate variables at all, and always produced simple arithmetic averages of coordinate variables. Use ``ncwa -I'` to recover the old behavior (i.e., arithmetic rather than masked, weighted averages of coordinate variables). A problem where `ncwa` would refuse to average variables which did not contain any of the averaged dimensions has also been fixed.

1998/07/07: Reduce bloating! The ``-h'` switch has been enabled on all operators. Using this switch suppresses the automatic history feature in NCO. Now you can decide whether each change to a file warrants an additional line in the history attribute. The functionality of the old ``ncks -h'` switch is now invoked with ``ncks -m'` (the mnemonic is `metadata').