Skip to content

Installation Guide

Angeline Burrell edited this page Apr 22, 2019 · 8 revisions

Introduction

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:

  1. Installing OS packages and optionally a package management environment
  2. Installing the NASA CDF library (optional)
  3. 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!

1. Installing OS Packages and Package Management Environment

Linux

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.

Debian 8.7

sudo apt-get install gcc libhdf5-serial-dev libnetcdf-dev libncurses libpng12-dev libx11-dev libxext-dev netpbm

Ubuntu 18.04

sudo apt-get install libhdf5-serial-dev libncurses-dev libnetcdf-dev libpng-dev libx11-dev libxext-dev netpbm

Ubuntu 16.04

sudo apt-get install libhdf5-serial-dev libncurses-dev libnetcdf-dev libpng12-dev libx11-dev libxext-dev netpbm

Mint 18.1

sudo apt-get install libc6-dev libncurses5-dev libnetcdf-dev libpng16-dev libx11-dev libxext-dev

OpenSUSE 42.2

sudo zypper install gcc hdf5-devel libpng16-devel libX11-devel libXext6 libXext-devel netcdf netcdf-devel ncurses-devel zlib-devel

CentOS 6

sudo yum install hdf5 libpng12 libX11 libXext libXext-devel netcdf netcdf-devel ncurses-devel zlib-devel netpbm

CentOS 7

sudo yum install hdf5-devel libpng12-devel libX11-devel libXext libXext-devel netcdf netcdf-devel ncurses-devel zlib-devel

Fedora 29

sudo dnf install hdf5-devel libpng-devel libX11-devel libXext libXext-devel netcdf netcdf-devel ncurses-devel zlib-devel

macOS

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.

Macports

macOS 10.12.4

port install libhdf5 libnetcdf libcurses libpng16 libx11 netpbm (10.77.03_2+x11)

Homebrew

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).

Conda

Do you use Conda? Help us finish this documentation by opening an issue!

Windows

Have you figured out how to use RST in windows? Report this in an issue and help others!

2. Installing NASA CDF Library (optional)

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.

Linux

Follow the installation instructions on the NASA CDF library website.

macOS

Macports

macOS 10.12.4

port install cdf

Homebrew

There is currently no formula for cdf on Homebrew, so you need to follow the installation instructions on the NASA CDF library website.

Conda

Do you use Conda? Help us finish this documentation by opening an issue!

Windows

Have you figured out how to use RST in windows? Report this in an issue and help others!

3. Installing RST

Finally, we can install RST. The following procedure works for both Linux and macOS. We currently don't have any instructions for Windows.

  1. 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 appropriate
    

    In rst/.profile/base.bash, check to make sure these paths are appropriate:

    XPATH, NETCDF_PATH, CDF_PATH

    If 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_IPATH in rst/.profile/idl.bash is correct. (Note: for users without access to IDL, modifying the IDL_IPATH environment 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
    
  2. Load the RST environment variables. For example, this is accomplished in linux by modifying the ~/.bashrc file by adding:

     # bash profile for rst
     export RSTPATH="INSTALL LOCATION"/rst
     . $RSTPATH/.profile.bash
    

    where 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
    
  3. Run make.build from 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.

  4. In the same directory run make.code to 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.code
    

    4b. 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 (using sza.h as 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
    
  5. To compile the html documentation, run make.doc from the command line. You may need to modify the URLBASE environment variable in $RSTPATH/.profile/rst.bash for the links in the html pages to function correctly. Online documentation is available at:

    https://superdarn.github.io/rst/index.html

Clone this wiki locally