Installation

You can access this package via Jupyter notebooks, Docker containers, or traditional github/pypi package installation. If you are using Windows, you must use dockers. I believe you can also use a linux emulator and follow instructions for linux.

Jupyter Notebooks

Install Instructions

Docker Container

Install Instructions

Local Python Install for Linux/MacOS

YOU SHOULD BE RUNNING python version 3.8, 3.9 or 3.10. Absolutely versions >= 3.11 will not work. This has to do with our using the fortran reading features in the numpy library. That feature is being deprecated and we are aware that long-term, we need to find a solution for it. It could be that we will simply compile the existing code for the users and call the fortran module using subprocess.

For installation with github/pypi, the setup requires a few system dependencies: gcc and gfortran. To check please type:

apt-get install -y gcc

and

apt-get install -y gfortran

in your terminal (or yum install -y gcc-gfortran).

If you are using a MacOS then you will need to install xcode. First, in your terminal, check first to see if you already have it:

xcode-select -p

If it is installed, it should return a path. If it is not installed then run

xcode-select –install

This should install gcc. You can check if you have gcc by typing

gcc –version

You can check to see if you have gfortran by typing

gfortran –version

If you do not have gfortran, then you can use homebrew to install (brew install gfortran).

Environment Variables

You should define three environment variables:

  • EXE = where various executables will live. These are mostly related to manipulating RINEX files.

  • REFL_CODE = where the reflection code inputs (SNR files and instructions) and outputs (RH) will be stored (see below). Both snr files and results will be saved here in year subdirectories.

  • ORBITS = where the GPS/GNSS orbits will be stored. They will be listed under directories by year and sp3 or nav depending on the orbit format. If you prefer, ORBITS and REFL_CODE can be pointing to the same directory.

If you are running in a bash environment, you should save these environment variables in the .bashrc file that is run whenever you log on.

If you don’t define these environment variables, the code should assume your local working directory (where you installed the code) is where you want everything to be (to be honest, I have not tested this in a while). The orbits, SNR files, and periodogram results are stored in directories in year, followed by type, i.e. snr, results, sp3, nav, and then by station name.

Direct Python Install

If you are using the version from gitHub:

  • You may want to install the python3-venv package apt-get install python3-venv

  • apt-get install git

  • git clone https://github.com/kristinemlarson/gnssrefl

  • cd into that directory, set up a virtual environment, a la python3 -m venv env make sure you are running the correction of python, as discussed at the top of the page You can have two versions of python on your machine. To have it run 3.9 instead of 3.11 (for example), type python3.9 -m venv env

  • activate your virtual environment source env/bin/activate

  • pip install wheel (we are working to remove this step)

  • pip install .

  • from what I understand, you should be able to use pip3 instead of pip

  • so please read below or type installexe -h

PyPi Install

  • make a directory, cd into that directory, set up a virtual environment, a la python3 -m venv env Make sure you are running the correct version of python as discussed at the top of the page

  • activate the virtual environment, source env/bin/activate

  • pip install wheel (we are working to remove this step)

  • pip install gnssrefl

  • from what I understand, you should be able to use pip3 instead of pip

  • Please read below or type installexe -h

Non-Python Code

installexe should download and install two key utilities used in the GNSS community: CRX2RNX and gfzrnx. It currently works for linux, macos and mac-newchip options. If you are using docker or Jupyter notebooks you do not need to run this.

We no longer encourage people to use teqc as it is not supported by EarthScope/UNAVCO. We try to install it in case you would like to use it on old files.

Homework 0: Test installation.

For some of the shortcourses, we compiled a Homework 0 that walks a new user through a few simple tests for validating successful gnssrefl installation.