Updated 2012-06-04 02:06:16 by RLE

Summary edit

 What: nap
 Where: http://tcl-nap.sourceforge.net/ 
 Description: Nap is a Tcl extension providing an n-dimensional array processor.
     Binaries are available for Linux/386, Linux/IA64, SPARC/SunOS, Windows/386.
     MacOS X is supported via Fink.
     Currently at version 6.2.
 Updated: October 2006
 Author: Harvey Davies
 Contact: See web site

ES This is an amazingly powerful package that really deserves more attention than it's getting.

2010-03-08 Although there is no recent release, the CVS repository is updated.

Release Notes edit

HLD 2005-01-28 Release NAP version 4.0.3

NAP (a.k.a. Tcl-nap) stands for N-Dimensional Array Processor. This is based on a loadable extension of Tcl written in C. NAP provides the essence of array-processing languages such as APL, J, IDL and Matlab and allows large quantities of binary data to be processed efficiently.

The NAP home page is http://tcl-nap.sourceforge.net/ This contains a link labelled 'Files for downloading', which can be used to access source files and starpack installers for Windows, Linux (both 386 and IA64) and Solaris.

The main documentation of NAP has been greatly revised and is at http://tcl-nap.sourceforge.net/contents.html

A revised version of my talk on NAP at the 9th Annual Tcl/Tk Conference, 2002 is at http://tcl-nap.sourceforge.net/nap.pdf

Installation is now much simpler than earlier versions. Starpack binary installers are provided (see above). The Windows installer includes the ezprint utility (providing access to printers), but there is no longer any other dependence on other packages such as BLT and Michael I. Schwartz's printer. NAP now provides the functionality previously provided by our (now obsolete) separate packages convert_date, inform and land_flag.

There has been some development (and bug fixing) of the C code over the last year or so but this code is now quite stable. However a great deal of work has been done on the NAP library written in Tcl. This includes GUIs for browsing various types of files (e.g. netCDF, HDF) and plotting graphs and images.

AM So, with the starpacks and all that, NAP has become ready for use? That is good news. (I will have to find some time to try out this new version)

HLD 2005-08-11 Release NAP version 5.0.5

Version 5 is a major release featuring:
 - New parsing process involving parse-tree
 - Removal of restrictions on unary operators "@", "@@" and "@@@"
 - Better error handling
 - Support for OPeNDAP (aka DODS) (currently only for 386 Linux)
 - Bug fixes
 - Resolution of differences between Peter Turner's and my versions of netCDF/HDF GUIs

The starpack installers for Windows, Linux (both 386 and IA64) and Solaris can be accessed using the link labelled 'Files for downloading' on the NAP home page: http://tcl-nap.sourceforge.net/

Click on '5.0.5' to access:
 1. 'Release Notes' -- Details of changes summarised above
 2. 'Changes' -- Excruciating details of same

HLD 2006-10-05 Release NAP version 6.2

Version 6 is a major release featuring:

  • Rewritten user guide. This is available at http://tcl-nap.sourceforge.net/nap_users_guide.pdf
  • Memory leaks (some serious) fixed
  • New unary sort operators '<=' and '>='
  • Relaxed rules for array constants
  • Again allow indirect full indexing (problem introduced by v. 5)
  • Allow functions with no arguments
  • Interface to the cartographic projection package PROJ.4
  • Interface to GSHHS Shorelines data
  • Bug fixes and enhancements to Tcl library, including plot_nao

The starpack installers for Windows, Linux (both 386 and IA64) and Solaris can be accessed using the link labelled Files for downloading on the NAP home page http://tcl-nap.sourceforge.net/

Click on 'Notes' to access:

  • Release Notes -- Details of changes summarised above
  • Changes -- Excruciating details of same

See Also edit

Another array related extension is CAPS.

Uses edit

AM Here is a simple application of NAP: Analysing geographical data with NAP

NB and another: Analyzing Remote Sensing Data with NAP

JBR 2012-02-16 - Trying to build NAP.

NAP is a very interesting project that I've toyed with using for a long time but its tangled up with HDF and NetCDF which I have no use for. This morning I tried to build it but failed:
#   proj4

     wget http://download.osgeo.org/proj/proj-4.7.0.tar.gz
     gzip -d < proj-4.7.0.tar.gz | tar xvf -
     cd proj-4.7.0
     ./configure --prefix=/home/john
     make
     make install

 #   HDF
 #
 #  I originally downloaded the source for HDF5 - This is NOT want you want.  The
 #  link to the HDF v4 source files is buried on the HDF web site and required a 
 #  little direct poking of the web server to find.
 #
     wget http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/hdf-4.2.7.tar.gz
     ./configure --prefix=/home/john
     make
     make install

 #   netCDF

     wget http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.1.3.tar.gz
     gzip -d < netcdf-4.1.3.tar.gz | tar xvf -
     cd netcdf-4.1.3
     ./configure --prefix=/home/john --disable-netcdf-4
     make
     make install


 #   tcl-nap

     cvs -d:pserver:[email protected]:/cvsroot/tcl-nap login
     cvs -z3 -d:pserver:[email protected]:/cvsroot/tcl-nap co -P tcl-nap

     cd tcl-nap/unix
     ./configure --prefix=/home/john
     make

The final make failes with :
".0\" -I`echo /home/john/pkg/tcl-nap/generic` -I`echo /home/john/include` -I`echo /home/john/include` -I`echo /home/john/include` -I`echo /home/john/include` -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES  -fPIC  `echo /home/john/pkg/tcl-nap/generic/nap_get.c`
/home/john/pkg/tcl-nap/generic/nap_get.c:534: error: static declaration of ‘Nap_GetNetcdf_meta’ follows non-static declaration
/home/john/pkg/tcl-nap/generic/nap_get.c:284: error: previous implicit declaration of ‘Nap_GetNetcdf_meta’ was here
/home/john/pkg/tcl-nap/generic/nap_get.c:615: error: static declaration of ‘Nap_GetNetcdf’ follows non-static declaration
/home/john/pkg/tcl-nap/generic/nap_get.c:426: error: previous implicit declaration of ‘Nap_GetNetcdf’ was here

Any help would be appreciated. If NAP was re-packaged with the file formats as configure options that would be ideal (but I understand that the world is not an ideal place).

Thanks.