$Header$ -*-text-*-

The netCDF Operators NCO version 4.8.1 art b'rn

http://nco.sf.net (Homepage, Mailing lists, Help)
http://github.com/nco (Source Code, Issues, Releases, Developers)

What's new?

Version 4.8.1 primarily contains enhancements to the vertical
interpolation feature of ncremap, ncclimo, and ncks. Two extrapolation
options are now supported (nearest neighbor and missing value), and
the entire procedure now works with the ECMWF IFS hybrid sigma
pressure grid as input. Other changes include better support for
north-to-south (n2s) Gaussian grid inferral and output, and ncclimo
updates and improvements for finer-grained MPI parallelism.
See below for full details.

Work on NCO 4.8.2 has commenced and will expose more powerful options
for vertical interpolation and, hopefully, the debut of the NCO
weight-generator for regridding.

Work on NCO 5.0.0 has commenced "under the hood". The key leap in that 
release will be support for netCDF4 user-defined types. Printing of
netCDF4 user-defined types ENUM and VLEN is ready now (though
unsupported) with the --udt flag. 5.0.0 will contain the finished
version of that, and progress on native weight generation by ncremap.

Enjoy,
Charlie

NEW FEATURES (full details always in ChangeLog):

A. ncremap/ncks now always creates/infers north-to-south grids with
   polygons in counter-clockwise (CCW) orientation. Formerly, polygons in
   south-to-north grids had CCW orientation while those in north-to-south
   grids had CW orientation. 
   ncremap -G latlon=1280,2560#lat_typ=gss#lat_drc=n2s -g $HOME/grd_n2s.nc
   ncremap -d ecmwf_ifs.nc -g grd_n2s.nc
   http://nco.sf.net/nco.html#n2s
   http://nco.sf.net/nco.html#ncremap

B. ncremap now vertically interpolates data from ECMWF IFS hybrid
   vertical grid format to CAM/E3SM hybrid format and to pure-pressure
   format. ECMWF archives and serves IFS data in a hybrid
   sigma-pressure grid format significantly different from CAM/E3SM.
   ECMWF supplies lnsp (log surface pressure) not PS (surface
   pressure). There are numerous other metadata differences.
   NCO now automatically takes care of these.
   ncremap --vrt=vrt_hyb_L72.nc ecmwf_ifs_f640L137.nc out.nc
   http://nco.sf.net/nco.html#vrt_fl
   http://nco.sf.net/nco.html#ncremap

C. ncks, ncremap, and ncclimo now support two different extrapolation
   algorithms for vertical regridding. The original and default
   extrapolation algorithm uses the nearest valid neighbor.
   This is now explicitly selectable with --vrt_xtr=nrs_ngh.
   The second supported algorithm extrapolates to missing values.
   This is now explicitly selectable with --vrt_xtr=mss_val.
   ncremap --vrt=vrt.nc --vrt_xtr=mss_val in.nc out.nc
   ncremap --vrt=vrt.nc --vrt_xtr=nrg_ngh in.nc out.nc
   ncclimo --vrt=vrt.nc --vrt_xtr=mss_val -i drc_raw -O drc_rgr
   ncks --vrt=vrt.nc --rgr vrt_xtr=mss_val in.nc out.nc
   http://nco.sf.net/nco.html#vrt_xtr
   http://nco.sf.net/nco.html#ncremap

D. The former ncremap ESMF extrapolation options xtr_nsp, xtr_typ, and 
   xtr_xpn have been renamed xtr_nsp, xtr_typ, and esmf_xpn,
   respectively. This was done to make them easier to find and to
   segregate regridder-specific from regridder-generic options.
   http://nco.sf.net/nco.html#esmf_typ
   http://nco.sf.net/nco.html#ncremap

E. ncremap accepts a new option, --msh_fl=msh.nc, to specify the name
   of the intersection mesh-file. This option only works with the
   TempestRemap and NCO weight-generators. (The NCO weight-generator
   is still in development and is not yet supported. Interested beta
   testers can access it with --alg_typ=nco).

F. ncremap MWF mode now only generates TempestRemap maps when one or
   both input grids are Exodus-format (and end with a .g suffix).
   This was done to keep ERWG and TR map-generation from being
   interdependent in case a grid-pair breaks one or the other. 

BUG FIXES:

A. ncremap now infers north-to-south Gaussian grids correctly.
   Previously such grids, like ECMWF IFS grids, failed to converge
   in the Newton-Raphson iteration for latitude interfaces.
   ncremap -d ecmwf_ifs.nc -g grd_n2s.nc
   The solution is to upgrade to 4.8.1, and the workaround is to use
   ncpdq to reorder the grids from n2s to s2n.
   Thanks to Wuyin Lin of BNL for highlighting this issue.
   http://nco.sf.net/nco.html#n2s
   http://nco.sf.net/nco.html#gss

B. North-to-south grids are now output in counterclockwise order.
   Previously s2n and n2s grids were output in CCW and CW order,
   respectively. Now all grids are CCW.
   Thanks to Wuyin Lin of BNL for highlighting this issue.
   http://nco.sf.net/nco.html#n2s

C. ncap2 correctly overwrites output-files in single-file mode.
   4.8.0 introduced the single-file feature where ncap2 does
   not need two file arguments, but instead can construct the
   output file purely from scratch. In the case where an output
   file of the same name already existed, ncap2 would fail to
   overwrite it when given the -O argument:
   ncap2 -O -s 'one=1' ~/foo.nc # now works
   ncap2    -s 'one=1' ~/foo.nc # always worked
   http://nco.sf.net/nco.html#ncap2

Full release statement at http://nco.sf.net/ANNOUNCE

KNOWN PROBLEMS DUE TO NCO:

   This section of ANNOUNCE reports and reminds users of the
   existence and severity of known, not yet fixed, problems. 
   These problems occur with NCO 4.8.0 built/tested under
   MacOS 10.14.1 with netCDF 4.6.1 on HDF5 1.10.2 and with
   Linux with netCDF 4.6.2-development (20180515) on HDF5 1.8.19.

A. NOT YET FIXED (NCO problem)
   Correctly read arrays of NC_STRING with embedded delimiters in ncatted arguments

   Demonstration:
   ncatted -D 5 -O -a new_string_att,att_var,c,sng,"list","of","str,ings" ~/nco/data/in_4.nc ~/foo.nc
   ncks -m -C -v att_var ~/foo.nc

   20130724: Verified problem still exists
   TODO nco1102
   Cause: NCO parsing of ncatted arguments is not sophisticated
   enough to handle arrays of NC_STRINGS with embedded delimiters.

B. NOT YET FIXED (NCO problem?)
   ncra/ncrcat (not ncks) hyperslabbing can fail on variables with multiple record dimensions

   Demonstration:
   ncrcat -O -d time,0 ~/nco/data/mrd.nc ~/foo.nc

   20140826: Verified problem still exists
   20140619: Problem reported by rmla
   Cause: Unsure. Maybe ncra.c loop structure not amenable to MRD?
   Workaround: Convert to fixed dimensions then hyperslab

KNOWN PROBLEMS DUE TO BASE LIBRARIES/PROTOCOLS:

A. NOT YET FIXED (netCDF4 or HDF5 problem?)
   Specifying strided hyperslab on large netCDF4 datasets leads
   to slowdown or failure with recent netCDF versions.

   Demonstration with NCO <= 4.4.5:
   time ncks -O -d time,0,,12 ~/ET_2000-01_2001-12.nc ~/foo.nc
   Demonstration with NCL:
   time ncl < ~/nco/data/ncl.ncl   
   20140718: Problem reported by Parker Norton
   20140826: Verified problem still exists
   20140930: Finish NCO workaround for problem
   20190201: Possibly this problem was fixed in netCDF 4.6.2 by https://github.com/Unidata/netcdf-c/pull/1001
   Cause: Slow algorithm in nc_var_gets()?
   Workaround #1: Use NCO 4.4.6 or later (avoids nc_var_gets())
   Workaround #2: Convert file to netCDF3 first, then use stride
   Workaround #3: Compile NCO with netCDF >= 4.6.2

B. NOT YET FIXED (netCDF4 library bug)
   Simultaneously renaming multiple dimensions in netCDF4 file can corrupt output

   Demonstration:
   ncrename -O -d lev,z -d lat,y -d lon,x ~/nco/data/in_grp.nc ~/foo.nc # Completes but produces unreadable file foo.nc
   ncks -v one ~/foo.nc

   20150922: Confirmed problem reported by Isabelle Dast, reported to Unidata
   20150924: Unidata confirmed problem
   20160212: Verified problem still exists in netCDF library
   20160512: Ditto
   20161028: Verified problem still exists with netCDF 4.4.1
   20170323: Verified problem still exists with netCDF 4.4.2-development
   20170323: https://github.com/Unidata/netcdf-c/issues/381
   20171102: Verified problem still exists with netCDF 4.5.1-development
   20171107: https://github.com/Unidata/netcdf-c/issues/597
   20190202: Progress has recently been made in netCDF 4.6.3-development
   More details: http://nco.sf.net/nco.html#ncrename_crd

C. NOT YET FIXED (would require DAP protocol change?)
   Unable to retrieve contents of variables including period '.' in name
   Periods are legal characters in netCDF variable names.
   Metadata are returned successfully, data are not.
   DAP non-transparency: Works locally, fails through DAP server.

   Demonstration:
   ncks -O -C -D 3 -v var_nm.dot -p http://thredds-test.ucar.edu/thredds/dodsC/testdods in.nc # Fails to find variable

   20130724: Verified problem still exists. 
   Stopped testing because inclusion of var_nm.dot broke all test scripts.
   NB: Hard to fix since DAP interprets '.' as structure delimiter in HTTP query string.

   Bug tracking: https://www.unidata.ucar.edu/jira/browse/NCF-47

D. NOT YET FIXED (would require DAP protocol change)
   Correctly read scalar characters over DAP.
   DAP non-transparency: Works locally, fails through DAP server.
   Problem, IMHO, is with DAP definition/protocol

   Demonstration:
   ncks -O -D 1 -H -C -m --md5_dgs -v md5_a -p http://thredds-test.ucar.edu/thredds/dodsC/testdods in.nc

   20120801: Verified problem still exists
   Bug report not filed
   Cause: DAP translates scalar characters into 64-element (this
   dimension is user-configurable, but still...), NUL-terminated
   strings so MD5 agreement fails 

"Sticky" reminders:

A. Reminder that NCO works on most HDF4 and HDF5 datasets, e.g., 
   HDF4: AMSR MERRA MODIS ...
   HDF5: GLAS ICESat Mabel SBUV ...
   HDF-EOS5: AURA HIRDLS OMI ...

B. Pre-built executables for many OS's at:
   http://nco.sf.net#bnr

