Version 4.6.8 of the netCDF Operators (NCO) has been released. NCO is an Open Source package that consists of a dozen standalone, command-line programs that take netCDF files as input, then operate (e.g., derive new data, average, print, hyperslab, manipulate metadata) and output the results to screen or files in text, binary, or netCDF formats.
The NCO project is coordinated by Professor Charlie Zender of the Department of Earth System Science, University of California, Irvine. More information about the project, along with binary and source downloads, are available on the SourceForge project page .
From the release message:
Many new features in 4.6.8 are, as usual, related to climatologies and regridding.
ncclimo can now be given an explicit list of seasons to compute
instead of, or in addition to, MAM,JJA,SON,DJF.
ncremap has improved mask and format handling. There are also
a collection of minor bugfixes and improvements, including JSON tweaks, ISO8601
printing, and GCC7 and netCDF 4.5.x compatibility.
This release includes an important ncwa fix that prevents incorrect answers
when hyperslabs are used with masks and/or weights. Upgrade if you use
PLEASE READ THIS IF YOU USE NCKS TO PRINT DATA:
ncks default printing will change to CDL in summer 2017. For
ncks has, by default, dumped the text representation of a file
in (what we call) "traditional" mode, which best facilitates meticulous data
examination in line-by-line format.
ncdump produces CDL format that is more useful for most NCO
ncdump has always printed clean CDL and for many years there
was little point in defaulting
ncks printed output to CDL. However,
ncks CDL mode now rivals
ncdump in many ways. In particular,
ncks --cln now prints times as human-readable calendar dates,
ncdump feature that I used which
ncks lacked. Hence in summer 2017
ncks default printed output will change to CDL. Then one will
"ncks" instead of
"ncks --cdl". We just added a new
"--trd" option to print traditional output. Use
--trd in your scripts and their behavior will not change. Otherwise
your printing scripts will start to print CDL this summer. You have been
ncap2now fully implements NCO chunking maps and policies. Previously
ncap2preserved existing chunking in variables, but could not be told to do anythin different. Now all command-line chunking behavior supported by NCO works in
ncap2 --cnk_plc=unchunk -S cnk.nco in.nc4 out.nc4http://nco.sf.net/nco.html#cnk
ncksCDL printing supports finer-grained control of date formats, including an ISO 8601 "T" option. Previously
ncksprinted UDUnits-compliant times as dates when invoked with the
--caloptions. A third option,
--dt_fmt, now exposes finer control of the format with short, regular, and ISO8601 options:
ncks -H -m -v time_bnds -C --cdl --dt_fmt=1 ~/nco/data/in.nc ncks -H -m -v time_bnds -C --cdl --dt_fmt=2 ~/nco/data/in.nc ncks -H -m -v time_bnds -C --cdl --dt_fmt=3 ~/nco/data/in.nc dt_fmt: Output: 0,1 1964-03-13 09:08:16 (Default, short format) 2 1964-03-13 09:08:16.000000 (regular format) 3 1964-03-13T09:08:16.000000 (ISO8601 "T" format)Note that --dt_fmt automatically implies --cal.
Some data are best evaluated with custom-defined seasons, e.g., JFM instead of DJF,
or two-month seasons such as FM or ON.
ncclimonow supports up to eleven (and counting) seasons, although by default it only computes MAM, JJA, SON, and DJF. As of NCO 4.6.8, use the
seasonsoption to specify additional or alternate seasons:
ncclimo --seasons=jfm,jas,ann -s 1980 -e 1983 -i drc_in -o drc_outUse "
–seasons=none" to completely turn-off seasonal and annual-mean climatologies:
ncclimo --seasons=none -s 1980 -e 1983 -i drc_in -o drc_outhttp://nco.sf.net/nco.html#ncclimo
--msk_dstoptions now accept the value 'none' to prevent the regridder from interpreting any variable as a mask in files from which source or destination grids are inferred.
ncremap -i ~/ed.nc --msk_src=none -d ~/ed.nc -o ~/foo.nc ncremap -i ~/ed.nc -d ~/ed.nc --msk_dst=none -o ~/foo.nchttp://nco.sf.net/nco.html#ncremap
ncremapnow accepts standard NCO arguments for output file type. The
-7flags, or their long-option equivalents
netcdf4_classic(or some synonyms) causes the output files created by
ncremap, e.g., the regridded files and the grid files, to have the requested format. The ERWG and TempestRemap weight-generators support only a subset of these formats.
ncremap -7 -i ~/deepthroat.nc -d ~/wapo.nc -o ~/foo.nchttp://nco.sf.net/nco.html#fl_fmt_ncremap
Additional details are available in the ChangeLog.