-
Notifications
You must be signed in to change notification settings - Fork 24
Installation Guide
This guide is intended to provide installation instructions on several operating systems. It begins with a list of dependencies required for each operating system and concludes with instructions for installing RST. The guide is organized by Linux, macOS, and Windows.
Regardless of OS type, generally, the installation process will look like this:
- Installing OS packages and optionally a package management environment
- Installing the NASA CDF library (optional)
- Installing RST
Don't see your preferred OS listed below? Open an issue and we'll help you with the installation process and update this guide!
All linux operating systems include a package management environment, so all we need to do here is install the OS packages that RST depends on.
sudo apt-get install gcc libhdf5-serial-dev libnetcdf-dev libncurses libpng12-dev libx11-dev libxext-dev netpbm
sudo apt-get install libhdf5-serial-dev libncurses-dev libnetcdf-dev libpng-dev libx11-dev libxext-dev netpbm
sudo apt-get install libhdf5-serial-dev libncurses-dev libnetcdf-dev libpng12-dev libx11-dev libxext-dev netpbm
sudo apt-get install libc6-dev libncurses5-dev libnetcdf-dev libpng16-dev libx11-dev libxext-dev
sudo zypper install gcc hdf5-devel libpng16-devel libX11-devel libXext6 libXext-devel netcdf netcdf-devel ncurses-devel zlib-devel
sudo yum install hdf5 libpng12 libX11 libXext libXext-devel netcdf netcdf-devel ncurses-devel zlib-devel netpbm
sudo yum install hdf5-devel libpng12-devel libX11-devel libXext libXext-devel netcdf netcdf-devel ncurses-devel zlib-devel
sudo dnf install hdf5-devel libpng-devel libX11-devel libXext libXext-devel netcdf netcdf-devel ncurses-devel zlib-devel
Before we can install any packages, we need to install a package management environment such as Macports, Homebrew, or Conda. Once we have one of those installed, we can install packages required by RST.
port install libhdf5 libnetcdf libcurses libpng16 libx11 netpbm (10.77.03_2+x11)
All required dependencies are now conveniently located in homebrew/core, so just the following need to ran:
libhdf5:
brew install hdf5
libnetcdf:
brew install netcdf
libcurses:
brew install ncurses
libpng:
brew install libpng
netpbm:
brew install netpbm
Additionally for X11, make sure you have XCode installed on your machine. It can be found on the Mac App store (some older OSX versions not supported).
Do you use Conda? Help us finish this documentation by opening an issue!
Have you figured out how to use RST in windows? Report this in an issue and help others!
RST has some components that enable conversion of data files into the CDF format. To use this functionality, you will need to install the the CDF (Common Data Format) library which can be downloaded from NASA. You can find the latest release at: http://cdf.gsfc.nasa.gov/
Here we provide some basic instructions/pointers to help you install the CDF library in Linux, macOS, and Windows.
Follow the installation instructions on the NASA CDF library website.
port install cdf
There is currently no formula for cdf on Homebrew, so you need to follow the installation instructions on the NASA CDF library website.
Do you use Conda? Help us finish this documentation by opening an issue!
Have you figured out how to use RST in windows? Report this in an issue and help others!
Finally, we can install RST. The following procedure works for both Linux and macOS. We currently don't have any instructions for Windows.
-
Upon obtaining RST software (with git clone or downloading a zip file), ensure the RST environment variables are properly set. In
rst/.profile.bash:OSTYPE="linux" for any linux operating system or "darwin" for macOS SYSTEM="linux" or "darwin" as appropriateIn
rst/.profile/base.bash, check to make sure these paths are appropriate:XPATH, NETCDF_PATH, CDF_PATHIf you are running macOS and run into issues with the X11 libraries, you may need to add a symbolic link.
If you have IDL, check to see that
IDL_IPATHinrst/.profile/idl.bashis correct. (Note: for users without access to IDL, modifying theIDL_IPATHenvironment variable is not required).Note macOS: If using Conda, you will need to change the following environment variables in .profile/base.bash:
NETFCDF_PATH = "/path/to/anaconda/include" CDF_PATH = "/path/to/cdf/cdf" <- where you installed the NASA CDF library -
Load the RST environment variables. For example, this is accomplished in linux by modifying the
~/.bashrcfile by adding:# bash profile for rst export RSTPATH="INSTALL LOCATION"/rst . $RSTPATH/.profile.bashwhere the INSTALL LOCATION is the path with the RST repository that has been copied to your computer. In order to load the environment variables you just setup, you'll need to close your current terminal and open a new terminal, or from the command line type:
source ~/.bashrc -
Run
make.buildfrom the command line. You may need to change directory to$RSTPATH/build/script. This runs a helper script that sets up other compiling code.If you are running macOS Sierra or later, you may have trouble for this step and step 4 if you run the commands in iTerm.app, due to a non-standard bash implimentation. These can be avoided by running the installation in a xterm terminal like XQuartz.
-
In the same directory run
make.codeto compile all of the code. This runs a script to find all of the source codes and compile them into binaries. A log of this compilation is stored in$RSTPATH/log.4a. If you don't have IDL and the IDL skip in make.code fails, you will see an error upon the inability to locate
idl_export.h. If this happens:cd $RSTPATH/codebase/superdarn/src.lib/tk tar -P -czvf idl.tar.gz idl rm -rf idl cd $RSTPATH/build/script make.code4b. If the order of make.code is executed incorrectly, you will see an error upon the inability to locate a header file (i.e.
sza.h). If this happens (usingsza.has an example):find $RSTPATH -name "sza.h" >> $RSTPATH/codebase/imagery/src.lib/sza.1.9/include/sza.h cd $RSTPATH/codebase/imagery/src.lib/sza.1.9/src make clean make cd $RSTPATH/build/script make.code -
To compile the html documentation, run
make.docfrom the command line. You may need to modify theURLBASEenvironment variable in$RSTPATH/.profile/rst.bashfor the links in the html pages to function correctly. Online documentation is available at: