Version 5.1.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:
Version 5.1.5 polishes the new vertical interpolation capabilities introduced in 5.1.3 and 5.1.4, improves the safety NCZarr operations, and fixes minor ncremap bugs. This release can be skipped if these regridding and NCZarr features are not useful to you.
New Features
-
ncremap
now behaves more sensibly when vertically interpolating MPAS-Ocean files/fields. Previously, users had to explicitly add the multidimensional auxiliary depth coordinate (oftentimeMonthly_avg_zMid
) to the subsetted list of variables whenever the subset list option (-v var1,var2...
) was used. This is because most MPAS datasets do not adhere to the CF "coordinates" convention, and NCO has no way of knowing which auxiliary coordinates contain the depth field. Nowncremap
uses the-P mpasocean
option to trigger a search for thezMid
coordinate in the input file. If found,ncremap
automatically adds it to the subset as appropriate.ncremap -P mpas --vrt_out=vrt.nc --map=map.nc in.nc out.nc
http://nco.sf.net/nco.html#ncremap
http://nco.sf.net/nco.html#vrt_out -
ncremap
has a--ps_rtn
(--retain_surface_pressure
) switch to facilitate "round-trip" vertical interpolation such as hybrid->pressure->hybrid. By defaultncremap
excludes the surface pressure field from the output after hybrid->pressure interpolation. The--ps_rtn
switch (which takes no argument) instructs the regridder to retain the surface pressure field afterhybrid->pressure
interpolation. This field is then available for subsequent interpolation back to a hybrid vertical coordinate.ncremap --ps_rtn --ps_nm=ps --vrt_out=ncep.nc in.nc out_ncep.nc ncremap --ps_rtn -v T,Q,U,PS --vrt_out=ncep.nc in.nc out_ncep.nc ncremap --vrt_out=hybrid.nc out_ncep.nc out_hybrid.nc
http://nco.sf.net/nco.html#ps_rtn -
NCO is now more careful about overwriting existing directories
and files with NCZarr stores. Previously NCO would overwrite any
directory or file that the netCDF library could successfully open.
However, netCDF library versions 4.8.0->4.9.1 "succeed" in opening
non-NCZarr stores. Hence additional precautions are necessary to
avoid unintentionally overwriting non-NCZarr paths with NCZarr
stores. For example,
ncks in_zarr4.nc file://${HOME}/ncz_dnd/foo#mode=nczarr,file
now overwrites "foo" only if it is already an NCZarr store. Previously foo would be overwritten if it already existed yet was not a valid NCZarr store. -
NCO improves handling of output from the DOE EAMxx model
in two ways. First, NCO now treats this model output as
CF-compliant. This causes NCO to implement special conventions such as
carrying multi-dimensional auxiliary coordinate variables when
subsetting. Second,
ncremap
automatically permutes EAMxx datasets that have been interpolated to pressure levels to have the correct dimension ordering (horizontal dimension as most-rapidly-varying) prior to horizontal regridding.
Additional details are available in the ChangeLog.