Version 4.6.5 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:
4.6.5 contains a potpurri of new features. Setting chunk cache size
with --cnk_csh
can accelerate aggregation of netCDF4 files.
Climatology and regridder users may appreciate the cleaned-up
output offered by the ncremap --vrb_lvl
switch and more intelligent
grid inferral. Everyone who has tried to convert "time since..."
values to calendar dates will like the new ncks --cal
switch that does
the UDUnits conversion for you. There are also helpful bugfixes for
ncap2
attribute propagation in corner cases, and corrected error codes
for bad command line arguments.
New Features
-
ncks
allows setting chunk cache-size with--cnk_csh
with all applicable operators. This sets the cache size for all variables. Users have demonstrated that increasing cache size can dramatically speed-up chunking operations on large datasets. This setting only works on netCDF4 files.ncrcat --cnk_csh=1000000000 --cnk_plc=g3d --cnk_dmn=time,365 \ --cnk_dmn=lat,1800 --cnk_dmn=lon,3600 in*.nc4 out.nc4
http://nco.sf.net/nco.html#cnk_csh
Thanks to Hugo Oliveira for encouraging this feature -
ncks
now prints the human-legible calendar string corresponding to values with UDUnits date units (time since basetime, e.g., "days since 2000-01-01") and CF calendar attribute, if any. Enact this with the--calendar
option when printing. Usingdbg_lvl >= 1
in CDL mode prints both the value and calendar string (one in comments):ncks -D 1 --cdl --cal -v tm_365 ~/nco/data/in.nc tm_365 = "2013-03-01"; // double value: 59 ncks -D 1 --cdl -v tm_365 ~/nco/data/in.nc tm_365 = 59; // calendar format: "2013-03-01"
This option is similar to thencdump -t
option. Does this work how you'd like? Let us know.
http://nco.sf.net/nco.html#cal -
ncap2
now seamlessly edits character arrays. Suppose you have a string stored as an old school character array (not a netCDF4 string) with a fixed dimension size.ncap2
now supports altering the string value without having to manually pad the RHS to the exact dimension size of the LHS:ncap2 -s 'date_sng="2016-05-11_06:00:00"' in.nc out.nc ncap2 -s 'date_sng="automatic padding"' in.nc out.nc
The exact same syntax has always worked on netCDF4 strings. This new feature frees users from needing to know the ugly details of netCDF3 string storage.
http://nco.sf.net/nco.html#ncap2 -
ncremap
supports a verbosity level option,--vrb_lvl
. Verbosity level is now independent of debug level,dbg_lvl
, so users can customize how muchncremap
information to print. Defaultvrb_lvl=2
and supported levels range from 0 (no output) to 4 (most verbose). The verbosity of the underlying remapping, which invokesncks
, is still controlled bydbg_lvl
notvrb_lvl
.ncremap --vrb_lvl=1 -i in.nc -m map.nc -o out.nc
http://nco.sf.net/nco.html#ncremap
Thanks to Milena Veneziani for requesting. -
ncremap
andncclimo
now support a version option,--version
. This option prints the operator version and configuration. It's a painless way to tell, e.g., ifncremap
knows where yourESMF_RegridWeightGen
executable is, and where these scripts look for NCO and what version of netCDF is linked to:ncremap --version ncclimo --version
http://nco.sf.net/nco.html#ncremap
http://nco.sf.net/nco.html#ncclimo -
ncremap
andncks
now parse more unknown grids than before. The front-end ofncremap
's grid-inferenence routine has been refactored to rely on less user-provided information about dimension names. Now it obtains more information than before by examining the grid coordinates. As a result, grids from data files with strange dimension names are likelier to be parsed.
Additional details are available in the ChangeLog.
good
Posted by Na ZHAO on March 21, 2017 at 03:00 PM MDT #