Introduction
Running and compiling sfit's core code and processing environment involves installation of several software compilers. This page steps you through the installation for various operating systems.
You will need the following software:
Fortran
Linux
We will assume you are running Ubuntu or some Debian derived linux. If you are using Ubuntu, most likely the GNU fortran compiler is installed already. To check this, at a terminal you can type:
dpkg --list | grep compiler
If you don't see gfortran listed then you can download the GNU fortran compiler by typing in the following in a terminal:
sudo apt-get install gfortran
Mac OS X
You can download the .dmg file for the GNU fortran compiler from the following link:
Windows
We highly suggest you install Cygwin which contains the set of GCC compilers. Cygwin can be found here:
C
Linux
If you are using Ubuntu, most likely the GNU fortran compiler is installed already. To check this, at a terminal you can type:
dpkg --list | grep compiler
If you don't see gcc listed then you can download the GNU fortran compiler by typing in the following in a terminal:
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential
Mac OS X
Make sure you have Xcode installed on your computer. You can download Xcode for mac from the following location:
You need to manually install command line tools for Xcode. This can be done from:
Xcode menu > Preferences > Downloads
Alternatively, there is a separate installation package available via:
Command Line Tools
Windows
We highly suggest you install Cygwin which contains the set of GCC compilers. Cygwin can be found here:
Make
Linux
We will assume you are running Ubuntu or some Debian derived linux. If you are using Ubuntu, most likely the GNU make installed already. To check this, at a terminal you can type:
make -v
If you get an error follow the instructions above for installing GCC
Mac OS X
GNU make should be installed when you install the command line tools in Xcode
Windows
GNU Make should be installed if you installed cygwin or MinGW
Python
The package has been tested with python >=2.7. However, Python 2.7 reached the end of its life on January 1st, 2020 and it is not maintained. Python3 is preferred.
Linux
To check if python is installed and what is the default version, type:
python -V
In addition you will need standard python libraries:
os, sys, numpy, matplotlib, Tkinter, datetime, time, math, csv, itertools, collections, re,
scipy, pyhdf, cycler, h5py, abc, getopt, glob, logging, shutil, fileinput, subprocess, netCDF4
The installation of python3 and these libraries are not covered here but as an example you can install them like this:
sudo apt-get install python-numpy python-scipy python-matplotlib
Python Deployment
It is recommended to add the PE directory to your PYTHONPATH and PATH environment variables. For example, add the following path to your shell,
i.e., a program designed to start other programs (.bashrc, .bash_profile, .profile) e.g., open your .bash_profile
vi ~/.bash_profile
and insert the following, for example,
export PATH=$PATH:/usr/local/lib/pythonX.Y/site-packages/Layer1 export PYTHONPATH=$PYTHONPATH:/usr/local/lib/pythonX.Y/site-packages/Layer1
use the above for all folders.
Additionally, the main python scripts on each folder use the shebang (top line in any script for standalone executable without typing python):
#!/usr/bin/python3
you can either modify the line with your prefered python version or type your python version in the command line, for example,
/usr/bin/python3 sfit4Layer1.py -?
Depending on the installation, often, especially when using the --home option it is necessary to change permissions to the directory. In this case, you might use the command below under the directory, e.g., under /dir/lib/python
sudo chmod -R 755 *