Announce nap 3.1.0
- NAP (N-Dimensional Array Processor)is a loadable extension
of Tcl that provides a convenient, powerful and efficient
facility for processing data in the form of n-dimensional
arrays. NAP provides the essence of array-processing
languages such as APL, J, IDL and Matlab.
Special facilities are provided for data based on
n-dimensional grids, where the dimensions correspond to
continuous spatial coordinates and values are defined using
multidimensional linear interpolation. There are interfaces
to the HDF and netCDF file formats commonly used for such
data, especially in Earth sciences such as oceanography and
A revised version of my talk on NAP at the 9th Annual
Tcl/Tk Conference, 2002 is at
The main documentation of NAP is at
The NAP home page is
This contains a link labelled 'Files for downloading',
which can be used to access both source and binary files.
Nap version 3.1.0 is compatible with Tcl 8.4 and BLT 2.4z.
Compatibilty issues (related to BLT) are discussed further in
The following details changes since the previous version (3.0.5):
The 'laminate' ('///') operator now produces a different (more sensible)
result if the ranks of the operands differ. The rank of the result is now
one greater than the greater of the operand ranks. Laminate ('//') now
handles any lower rank operand by reshaping it to the shape of the other
operand. Some bugs in laminate & catenate ('//') have been fixed.
Function 'invert_grid' now handles any missing values (not just NaN) and
only overwrites interpolated values if the new value is based on a smaller
rectangle than the old one.
Function 'psum': Bug fixed.
The 'tally' (unary '#') operator now allows a boxed argument, which produces
an n-dimensional contingency (cross-classification) table containing joint
The cast functions (e.g. 'f32', 'i8') no longer create a new NAO if the
argument already has the required data-type.
Constants can now have a '+' sign.
Octal constants are no longer supported. Thus '012' is now treated as 12
rather then 10. Octal constants were seldom if ever used and were
incompatible with much existing data.
Floating-point constants can now end with 'p' or 'e'. The missing exponent
defaults to 1. So '1p' is equivalent to '1p1' (which represents 'pi').
Byte-swapping is now supported by the command 'nap_get', the new OOC method
'swap' & various library procedures.
Several hdf/netcdf bugs have been fixed. The 'hdf' and 'netcdf'
sub-commands of 'nap_get' now provide an option for 'raw' input in which
the attributes scale_factor, add_offset, valid_min, valid_max & valid_range
The HTML documentation has been revised and most pages now have a table of
Library: New functions magnify_nearest, magnify_interp, magnify_generic,
area_on_globe. Extensive improvements to plot_nao.
Harvey Davies, CSIRO Atmospheric Research,
Private Bag No. 1, Aspendale 3195
Phone: +61 3 9239 4556
Fax: +61 3 9239 4444
[[Send Tcl/Tk announcements to tcl-announce@...
Announcements archived at http://groups.yahoo.com/group/tcl_announce/
Send administrivia to tcl-announce-request@...
Tcl/Tk at http://tcl.tk/ ]]