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

/ NCAR / CGD / CMS / CCM3 / | [ CCM3 ] [ Processor ] [ LSM ] [ CSM ]

# Welcome to the NCO Homepage

  What is NCO?
  NCO News
  Download NCO software
  NCO User's Guide
  README
  ChangeLog
  Version Info
  Using NCO at NCAR
  Known Problems

## What is NCO?

The netCDF Operators, or NCO, is a suite of programs known as operators. Each operator is a standalone, command line program which is executed at the UNIX (or NT) shell-level like, e.g., `ls` or `mkdir`. The operators take netCDF file(s) as input, perform an operation (e.g., averaging, hyperslabbing, or renaming), and produce a netCDF file as output. The operators are primarily designed to aid manipulation and analysis of scientific data, and the NCO User's Guide illustrates their use with examples from the field of climate modeling and analysis.

The operators are as general as netCDF itself: there are no restrictions on the contents of the netCDF file(s) used as input. The internal routines of NCO are completely dynamic which means that NCO imposes no limit on the number of dimensions, sizes of variables, files etc. NCO is designed to be used both interactively and with large batch jobs. There are plenty of command line (i.e., runtime) options, but the defaults settings are often sufficient for everyday needs.

NCO also works on HDF files. See the NCO User's Guide for details.

NCO has probably already been built and tested on your operating system (AIX, IRIX, Linux, SunOS, Solaris, Tru64, UNICOS, and Windows NT). The current set of operators is given below. For a thorough description of each operator, please read the NCO User's Guide.

`ncatted` | netCDF Attribute Editor
`ncdiff` | netCDF Differencer
`ncea` | netCDF Ensemble Averager
`ncecat` | netCDF Ensemble Concatenator
`ncflint` | netCDF File Interpolator
`ncks` | netCDF Kitchen Sink
`ncra` | netCDF Record Averager
`ncrcat` | netCDF Record Concatenator
`ncrename` | netCDF Renamer
`ncwa` | netCDF Weighted Averager

## NCO News

1999/12/14: Added feature to `ncatted` so that C-language escape sequences may be used in editing character attributes. Text formatting of attributes now supports `\n`, `\t`, and most other `printf`-style sequences. See the User's Guide for details.

1999/12/06: Fixed bug in `ncatted` so that character-valued attributes (strings) may contain commas, and be of zero length. Formerly `ncatted` would drop all text after the first comma.

1999/10/04: The build configuration has been simplified and made more robust. Now typing `make test` will invoke a self-test where NCO attempts to download a small (~65 kb) file on which to perform a battery of NCO tests. If the equations output by the `make test` command are numerically accurate, then you can have high confidence that NCO is installed and working correctly.

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. The feature was added in response to problems users were having of comparing files produced on different machines. 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.

Older NCO news

## Download the complete NCO software source distribution.

The distribution includes the complete NCO documentation (User's Guide) in Postscript, HTML, DVI, TeXinfo, and Info formats. These formats are included in the source distribution in the files ``nco.ps'`, ``nco.html'`, ``nco.dvi'`, ``nco.texi'`, and ``nco.info*'`, respectively. (430 Kb compressed tar-file)

## Browse the online NCO User's Guide

## Download the gzipped Postscript NCO User's Guide

The User's Guide contains all the documentation for NCO. It explains the most efficient strategies for using the operators and includes numerous specific examples. The online and Postscript versions of the User's Guide are in the source distribution in the files ``doc/nco.html'` and ``doc/nco.ps'`, respectively.

## See the `README` file.

``README'` describes the platforms and software requirements for a successful NCO installation. More information on installation is contained in the online NCO User's Guide.

## See the `ChangeLog` file.

``ChangeLog'` contains the most up-to-date information on the latest NCO improvements. There is no need to install minor, unannounced upgrades to NCO unless a problem you are having with NCO is listed in ``ChangeLog'` as having been fixed in the latest revision.

## Current release of NCO is

You easily can tell whether you have the most recent version, and whether you should upgrade by reading the `ChangeLog`.

## Using NCO at NCAR

NCO is built at UC Irvine and distributed from NCAR. User's of UCI and NCAR machines should take advantage of pre-built, up-to-date NCO executables. The NCO executables are maintained in many different locations at NCAR:

  ACD dust.acd.ucar.edu (Linux 2.2.5): /gs/zender/bin/LINUX
  ACD garcia.acd.ucar.edu (Compaq Tru64): /usr/local/bin
  CGD network (Solaris 2.6): /contrib/bin
  CGD/SCD Dataproc (IRIX 6.5): /contrib/bin
  SCD Blackforest (AIX 4.0): /home/blackforest/zender/bin/AIX
  SCD Ouray (UNICOS 10.0.0): /home/ouray0/zender/bin/CRAY
  SCD Ute and Utefe (IRIX 6.5): /home/ute/zender/bin/SGIMP64
and at two locations at UCI:
  ESS dust.ps.uci.edu (Linux 2.2.5): /home/zender/bin/LINUX
  ESS krein.math.uci.edu (IRIX 6.5): /home/zender/zender/bin/SGIMP64

## Known Problems with NCO and/or netCDF:

# NCO problems on SGI machines?

The netCDF 3.3.x distribution suffers from unpredictable behavior on SGI machines (possibly related to NFS-mounted partitions). As a result, NCO operators, especially `ncwa`, may core dump unless you upgrade to the new netCDF3.4.x distribution. NCAR machines have all been upgraded to netCDF3.4+. All users of NCO on SGI64 machines at other institutions are urged to upgrade to netCDF3.4.x which is available from URL ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.Z.

NCO may not build correctly on SGI machines unless the latest version of GNU make (version 3.78.1) is installed.

# NCO on the Cray T90

NCO should be compiled with the `-DC_ONLY` flag on the Cray T90 to avoid C-Fortran interface problems; otherwise incorrect answers may result. As of NCO 1.1.38, this is the default.

/ NCAR / CGD / CMS / CCM3 / | [ CCM3 ] [ Processor ] [ LSM ] [ CSM ]

Address questions and comments about NCO to Charlie Zender,