Installation instructions for Candis on UNIX.

0) Use ftp to copy the file candis.tar to your computer. Then use uncompress and tar to expand the candis directory in a convenient location on disk. (Typically, "uncompress candis.tar.Z" and "tar xvf candis.tar".) This takes approximately 3 MB of disk space, plus about the same amount of working space in addition. (If space is tight, you will probably want to delete candis.tar.) You will need more as various programs are compiled, about 8 MB on a Sun SparcStation, possibly much more on a system without shared libraries, if all programs are used.

1) Use nroff or troff with ms macros to print out documentation residing in sub-directory doc. The man directory contains manual pages, which may be printed using nroff or troff with man macros. Alternatively, the man pages may be copied to the usual place that man pages live on your system. Read in particular the tutorial in candis/doc for an introduction to the Candis system.

2) Edit include/cdfhdr.h to set the parameters VAX and ROUNDTOZERO to their proper values for your system. VAX controls the assumed order of bytes in integers -- 1 for VAXen, DECstations, and Intel 80*86s, 0 for nearly everything else. ROUNDTOZERO controls integer truncation from floating point for negative numbers -- 1 for VAXen, Sparcs, and MC68000s. ANSI should be set to 1 only if the include file "stdlib.h" is required to define things like atof. Mysterious incorrect results will occur if this include file is left out when it is needed. (If you are not certain about this, try setting ANSI to 1. If the make doesn't work, set it to zero!) BSD should be set to 1 for Berkeley-derived UNIX (except SunOS-4.X) and 0 otherwise. LINUX should be set to 1 for Linux and other POSIX systems and 0 otherwise. If both BSD and LINUX are set to zero, System V behavior is assumed.

3) Edit Makefiles in all subdirectories of interest to set BINDIR (the place you would like binaries to go) and CC (the C compiler to be used). Current defaults are /usr/local/bin and gcc, the GNU C compiler. If you don't have gcc, you will typically want to change CC to cc. Note that gcc-2.3.3 has an optimizer bug that messes up pgraf programs. Optimizing as "-O2" fixes the problem. This bug disappeared in gcc-2.4.2. Be sure to set CC to your desired compiler in the subdirectories utils and pgraf/metagens. If you are working on a system (such as Linux) which doesn't have "lex", but has the Free Software Foundation's "flex" program, comment out the lex definitions and uncomment the flex definitions in the Makefiles in mcidas, nws, and raf.

4) Create the libraries (in utils and pgraf/metagens) by typing "make libs" in the main directory before trying to compile any other programs. Then, in each subdirectory of interest, type "make" and then "make install". (You may have to be superuser to do the install.) The programs of most general interest are in "general" and "pgraf/lolevels". Other directories contain specialty programs. Certain programs require libraries and include files not included with Candis. The compilation will fail if those libraries are not present in the usual places. These include everything in unidata (netcdf library), mcdisp in mcidas, everything in sisal, and various pgraf programs (GKS, X11, mgr, and Sun pixrect). However, the make should complete the compilation of the other programs. If something else fails, you will have to dig into the offending Makefile or program. Let me ( know about it.

5) To test things, change to the sub-directory data. A sample Candis file is there in compressed ascii format. Use "uncompress example.a.Z", then "cdftrans -f < example.a > example" to change this to float format. Then try

cdfrdim time 120 < example | cdfplot w,1,c/w,1,f

(Be sure that the directory in which your executables are installed is in your current path.) After this completes, run a pgraf program appropriate to the type of graphics device on which you are working. (See the README file in pgraf/lolevels.) If this works, congratulations, Candis is installed! If you are interested in satellite images, and are a workstation running X11, uncompress and translate to float the satellite images in this directory, and then run "mcdisp i*.8". You should get alternating grey scale infrared and visible images of a nice western US cold front.