Tutorials

Under construction

Installing COMPS

Step (1) Pre-requisite


COMPS uses a few commonly used tools/libraries:
LibraryPurpose
SCons Tool used to compile COMPS
Boost (v1.49) Boost provides many useful statistical functions
NetCDF (v3.6) Read/write NetCDF files. Note both libnetcdf and libnetcdf_c++ are needed.
grib_api Read GRIB input files
ncursesAlternate user interface
pythonUsed to visualize forecasts and verification

Required: will not compile without these
Optional: will run, but some features disabled

Setup on Ubuntu

sudo apt-get install scons
sudo apt-get install libnetcdf-dev
sudo apt-get install netcdf-bin
sudo apt-get install libboost_filesystem-dev
sudo apt-get install libboost_system-dev
sudo apt-get install ncurses-dev
# If you plan on reading GRIB files:
sudo apt-get install grib_api-dev
# If you plan on visualizing the results (a good idea!):
sudo apt-get install python-numpy
sudo apt-get install python-scipy
sudo apt-get install python-matplotlib

Setup on Mac OSX (Macports)

These instructions assumes you use macport as the package manager
sudo port install scons
sudo port install netcdf
sudo port install netcdf-cxx
sudo port install boost
# If you plan on reading GRIB files:
sudo port install grib_api
# If you plan on visualizing the results (a good idea!):
# Note that python is often already installed on Macs
sudo port install python
sudo port install py-numpy
sudo port install py-scipy
sudo port install py-matplotlib

Step (2) Download


Download the latest code in zip format and unzip the contents:

Download

Alternatively, fetch the latest version from the git-repository placing it in the comps directory:

git clone git://github.com/wfrt/Comps.git comps

Step (3) Installation


COMPS uses the compilation tool scons. But first initSchemes.csh must be run in order to auto-generate code that COMPS uses to enable scheme selection. Run the following commands in the top directory to compile:
csh ./initSchemes.csh
scons

If the compilation is successful, the main program comps.exe will be created, along with two helper programs info.exe, convert.exe.

Missing libraries

If scons cannot find a required library, it will abandon the compilation. This can happen if the library is not found in one of the expected locations (/usr/lib/, /usr/local/lib, etc...). If you have installed the libraries in a unusual location create a file called local.scons in the comps root directory and add the following contents in it (replacing the appropriate paths):
Import('env')
env.Append(LIBPATH  = ['/path/to/lib1/', '/path/to/lib2/'])
env.Append(CPPPATH  = ['/path/to/include1/', '/path/to/include2/'])