Version 5.0.0 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:
Version 5.0.0 contains mostly ncremap
features and fixes.
You can probably skip this release unless you use ncremap
.
ncremap
has crucial fixes for applying and exporting the mask field,
if any. It also provides new flags to control the application of
_FillValue
attributes in empty destination cells, and to accommodate
map-files that ignore or violate proper treatment of masked grids.
ncks auxiliary coordinates (-X) support wrapped longitude regions.
New Features
-
The
ncremap
regridder now creates a "title" global attribute in the the output file if the input file did not already have a title. This title attribute is described and supported by the NUG and CF. Moreover, the Panoply file catalog uses it to describe open files.
http://nco.sf.net/nco.html#ncremap -
ncremap
now accepts a--no_prm
(--no_permute
) flag that causes the regridder to skip the default permutation of dimensions before regridding (notably MPAS) datasets known to store data with most-rapidly varying dimensions that are not horizontal.ncremap
normally ensures that input fields are stored in the shape expected by regridder weights (horizontal dimensions last) by permuting the dimensions withncpdq
. However, permutation consumes time and generates an extra intermediate file. Avoid this time penalty by using the--no_prm
flag if the input fields are known to have trailing horizontal dimensions.ncremap --no_prm -P mpas -v sic -m map.nc in.nc out.nc
http://nco.sf.net/nco.html#no_prm
http://nco.sf.net/nco.html#ncremap -
ncremap
now accepts a--add_fll
(--add_fill_value
) flag that causes the regridder to add a_FillValue
attribute to fields with empty destination cells. Empty destination cells are those that have no non-zero weights from the source grids. Should a field (e.g., air temperature) without a_FillValue
be mapped to such a grid, the empty destination values are normally set to 0.0, since no source grid cells contribute. However, 0.0 is a valid value for many geophysical fields. Use this switch to ensure that empty destination gridcells are always set to_FillValue
. The default_FillValue
will be used in the output file for input fields that lack a_FillValue
. This flag has no effect on input fields that already have a_FillValue
.ncremap --add_fll -v FLNS -m map.nc in.nc out.nc
http://nco.sf.net/nco.html#add_fll
http://nco.sf.net/nco.html#ncremap -
ncremap
now accepts a--msk_apl
(--mask_apply
) flag that causes the regridder to applymsk_out
(i.e.,mask_b
) to variables after regridding. Some weight generators (e.g., Tempest) ignore masks and thus produce non-zero weights for masked destination cells, and/or from masked source cells. This flag causes regridded files produced with such map-files to adhere to the destination mask rules (though source mask rules may still be violated). This feature is especially useful in placing missing values (aka,_FillValue
) in destination cells that should be empty, so that regridded files have distributions of_FillValues
identical with output from other weight-generators such as ESMF and NCO.ncremap --msk_apl -v FLNS -m map.nc in.nc out.nc
http://nco.sf.net/nco.html#msk_apl
http://nco.sf.net/nco.html#ncremap -
ncremap
now includes the coordinatesxgrid
,ygrid
in its internal database so that it can automatically recognize and infer grids from NOAA SSM/I, AMSR-E, and SMMR Climate Data Record (CDR) datasets. Thanks to Mat Maltrud of LANL for prompting this.ncremap -d ~/ssmi_cdr_raw.nc -g ${DATA}/grids/ssmi_304x448.nc
http://nco.sf.net/nco.html#ncremap
Additional details are available in the ChangeLog.