Skip to content

Setting up InSAR code on macOS using Conda / MacPorts

Notifications You must be signed in to change notification settings

yunjunz/macOS_setup

 
 

Repository files navigation

Setting up an macOS machine for InSAR data processing

This repository contains instructions to install ISCE2, ARIA-tools, MintPy and PyAPS for InSAR data processing using Conda or MacPorts.

Before you start

Useful packages:

Install the developer tools on macOS:

  • Install XCode from App store
  • Install command line tools within XCode and agree to the terms of license.
xcode-select --install -s /Applications/Xcode.app/Contents/Developer/ 
sudo xcodebuild -license 
  • Install XQuartz, then restart the terminal

via conda

Follow instructions here.

via MacPorts

  1. Setup environment variables by sourcing the config.rc file, e.g. in ~/.bash_profile file.

  2. Run the following to download the source code:

mkdir -p ~/tools/utils; cd ~/tools
git clone https://github.com/isce-framework/isce2.git
git clone https://github.com/aria-tools/ARIA-tools.git
git clone https://github.com/insarlab/MintPy.git
git clone https://github.com/yunjunz/pyaps3.git $PYAPS_HOME/pyaps3
git clone https://github.com/yunjunz/macOS_Setup.git ./utils/macOS_Setup
  1. Install macports. Add the following at the bottom of your ~/.bash_profile file:
# MacPorts Installer addition on 2017-09-02_at_01:27:12: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:${PATH}
export MANPATH=/opt/local/share/man:${MANPATH}
# Finished adapting your PATH environment variable for use with MacPorts.

#For py37-pyhdf in macports
export INCLUDE_DIRS=/opt/local/include
export LIBRARY_DIRS=/opt/local/lib

Update the port tree. If your network prevent the use of rsync or svn via http of port tree, try Portfile Sync via a Snapshot Tarball.

sudo port selfupdate
  1. Run the following to install dependencies:
sudo port install $(cat ~/tools/utils/macOS_setup/ports.txt)

Notes on pygrib

pygrib is required by PyAPS but not currently supported in MacPorts with python37 yet, thus need to be installed manually from source.

Download the latest released version:

cd ~/tools/utils
wget https://github.com/jswhit/pygrib/archive/v2.0.4rel.tar.gz
tar -xvf v2.0.4rel.tar.gz; cd pygrib-2.0.4rel
mv setup.cfg.template setup.cfg

Uncomment and set grib_api installation location as: grib_api_dir = /opt/local.

Install pygrib using pip from MacPorts.

sudo -H /opt/loca/bin/pip install .

About

Setting up InSAR code on macOS using Conda / MacPorts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%