Index: /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-solid_earth
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-solid_earth	(revision 25195)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-solid_earth	(revision 25196)
@@ -40,20 +40,21 @@
 
 EXTERNALPACKAGES="
-	autotools	install-debian-linux.sh
-	cmake		install.sh
-	petsc		install-3.12-linux-solid_earth-static.sh
-	boost		install-1.7-linux-static.sh
-	triangle	install-linux-static.sh
-	chaco		install.sh
-	m1qn3		install.sh
-	semic		install.sh
-	curl		install-7.67-static.sh
-	netcdf		install-4.7-parallel-static.sh
-	proj		install-6.2-static.sh
-	gdal		install-3.0-python-netcdf-static.sh
-	gshhg		install.sh
-	gmt			install-6.0-linux-static.sh
-	gmsh		install-4-static.sh
-	shell2junit	install.sh
+	autotools		install-debian-linux.sh
+	cmake			install.sh
+	petsc			install-3.12-linux-solid_earth-static.sh
+	boost			install-1.7-linux-static.sh
+	triangle		install-linux-static.sh
+	chaco			install.sh
+	m1qn3			install.sh
+	semic			install.sh
+	curl			install-7.67-static.sh
+	netcdf			install-4.7-parallel-static.sh
+	netcdf-python	install.sh
+	proj			install-6.2-static.sh
+	gdal			install-3.0-python-netcdf-static.sh
+	gshhg			install.sh
+	gmt				install-6.0-linux-static.sh
+	gmsh			install-4-static.sh
+	shell2junit		install.sh
 "
 
Index: /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-solid_earth.sh
===================================================================
--- /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-solid_earth.sh	(revision 25195)
+++ /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-solid_earth.sh	(revision 25196)
@@ -9,5 +9,5 @@
 MATLAB_PATH="/usr/local/MATLAB/R2019b"
 PACKAGE="ISSM-Solid_Earth" # Name of directory to copy distributable files to
-PYTHON_NROPTIONS="--benchmark 'slr'"
+PYTHON_NROPTIONS="--benchmark slr"
 TARBALL_NAME="issm-linux-solid_earth"
 TARBALL="${TARBALL_NAME}.tar.gz"
@@ -41,4 +41,22 @@
 else
 	echo "MPICH not found"
+	exit 1
+fi
+
+echo "Moving GDAL binaries to bin/"
+if [ -f ${ISSM_DIR}/externalpackages/gdal/install/bin/gdal-config ]; then
+	cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdalsrsinfo .
+	cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdaltransform .
+else
+	echo "GDAL not found"
+	exit 1
+fi
+
+echo "Moving GMT binaries to bin/"
+if [ -f ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt-config ]; then
+	cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt .
+	cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmtselect .
+else
+	echo "GMT not found"
 	exit 1
 fi
@@ -141,4 +159,5 @@
 rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
 rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
+rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
 echo "Creating tarball: ${TARBALL_NAME}"
 tar -czf ${TARBALL} ${PACKAGE}
Index: /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-with_dakota.sh
===================================================================
--- /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-with_dakota.sh	(revision 25195)
+++ /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-with_dakota.sh	(revision 25196)
@@ -133,4 +133,5 @@
 rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
 rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
+rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
 echo "Creating tarball: ${TARBALL_NAME}"
 tar -czf ${TARBALL} ${PACKAGE}
Index: /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries.sh
===================================================================
--- /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries.sh	(revision 25195)
+++ /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries.sh	(revision 25196)
@@ -92,4 +92,5 @@
 rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
 rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
+rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
 echo "Creating tarball: ${TARBALL_NAME}"
 tar -czf ${TARBALL} ${PACKAGE}
Index: /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-with_dakota.sh
===================================================================
--- /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-with_dakota.sh	(revision 25195)
+++ /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-with_dakota.sh	(revision 25196)
@@ -127,4 +127,5 @@
 rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
 rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
+rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
 echo "Creating tarball: ${TARBALL_NAME}"
 tar -czf ${TARBALL} ${PACKAGE}
Index: /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries.sh
===================================================================
--- /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries.sh	(revision 25195)
+++ /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries.sh	(revision 25196)
@@ -87,4 +87,5 @@
 rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package (we only need MEX-files)
 rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
+rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
 echo "Creating tarball: ${TARBALL_NAME}"
 tar -czf ${TARBALL} ${PACKAGE}
Index: /issm/trunk-jpl/scripts/devpath.py
===================================================================
--- /issm/trunk-jpl/scripts/devpath.py	(revision 25195)
+++ /issm/trunk-jpl/scripts/devpath.py	(revision 25196)
@@ -7,5 +7,5 @@
 #
 #           export ISSM_DIR=</path/to/ISSM>
-#           export PATH="${PATH}:${ISSM_DIR}/bin"
+#           export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
 #           export PYTHONPATH="${ISSM_DIR}/scripts"
 #           export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
Index: /issm/trunk-jpl/scripts/test-issm-linux-binaries-solid_earth.sh
===================================================================
--- /issm/trunk-jpl/scripts/test-issm-linux-binaries-solid_earth.sh	(revision 25195)
+++ /issm/trunk-jpl/scripts/test-issm-linux-binaries-solid_earth.sh	(revision 25196)
@@ -6,52 +6,51 @@
 #
 
-unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
-
 MATLAB_NROPTIONS="'benchmark','slr'"
 MATLAB_PATH="/usr/local/MATLAB/R2019b"
 INSTALL_DIR=~/Downloads
 PACKAGE_NAME="ISSM-Solid_Earth"
-PYTHON_NROPTIONS="--benchmark 'slr'"
+PYTHON_NROPTIONS="--benchmark slr"
 TARBALL_NAME="issm-linux-solid_earth"
 TARBALL="${TARBALL_NAME}.tar.gz"
 
+export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
+export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
+
 cd ${INSTALL_DIR}
-rm -rf ${PACKAGE_NAME}
-tar -zxvf ${TARBALL}
+# rm -rf ${PACKAGE_NAME}
+# tar -zxvf ${TARBALL}
 cd ${PACKAGE_NAME}/test/NightlyRun
 
-# Check that MATLAB tests run
-echo "Running MATLAB tests"
-rm matlab.log 2> /dev/null
+# # Check that MATLAB tests run
+# echo "Running MATLAB tests"
+# rm matlab.log 2> /dev/null
 
-# Run MATLAB tests redirecting output to logfile and suppressing output to console
-${MATLAB_PATH}/bin/matlab -nojvm -nosplash -r "try, addpath ../../bin; addpath ../../lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log &> /dev/null
+# # Run MATLAB tests redirecting output to logfile and suppressing output to console
+# ${MATLAB_PATH}/bin/matlab -nojvm -nosplash -r "try, addpath ../../bin; addpath ../../lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log &> /dev/null
 
-# Check that MATLAB did not exit in error
-matlabExitCode=`echo $?`
-matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
+# # Check that MATLAB did not exit in error
+# matlabExitCode=`echo $?`
+# matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
 
-if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
-	echo "----------MATLAB exited in error!----------"
-	cat matlab.log
-	echo "-----------End of matlab.log-----------"
-	exit 1
-fi
+# if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
+# 	echo "----------MATLAB exited in error!----------"
+# 	cat matlab.log
+# 	echo "-----------End of matlab.log-----------"
+# 	exit 1
+# fi
 
-# Check that all MATLAB tests passed
-numMatlabTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
+# # Check that all MATLAB tests passed
+# numMatlabTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
 
-if [[ ${numMatlabTestsFailed} -ne 0 ]]; then
-	echo "One or more MATLAB tests FAILED"
-	exit 1
-else
-	echo "All MATLAB tests PASSED"
-fi
+# if [[ ${numMatlabTestsFailed} -ne 0 ]]; then
+# 	echo "One or more MATLAB tests FAILED"
+# 	exit 1
+# else
+# 	echo "All MATLAB tests PASSED"
+# fi
 
 # Check that Python tests run
 echo "Running Python tests"
 
-export ISSM_DIR="${INSTALL_DIR}"
-export PATH="${PATH}:${ISSM_DIR}/bin"
 export PYTHONPATH="${ISSM_DIR}/scripts"
 export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
Index: /issm/trunk-jpl/scripts/test-issm-linux-binaries-with_dakota.sh
===================================================================
--- /issm/trunk-jpl/scripts/test-issm-linux-binaries-with_dakota.sh	(revision 25195)
+++ /issm/trunk-jpl/scripts/test-issm-linux-binaries-with_dakota.sh	(revision 25196)
@@ -5,6 +5,4 @@
 # NOTE: Tarball must already exist in INSTALL_DIR
 #
-
-unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
 
 MATLAB_NROPTIONS="'id',[IdFromString('Dakota')]"
@@ -15,4 +13,7 @@
 TARBALL_NAME="issm-linux-with_dakota"
 TARBALL="${TARBALL_NAME}.tar.gz"
+
+export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
+export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
 
 cd ${INSTALL_DIR}
Index: /issm/trunk-jpl/scripts/test-issm-linux-binaries.sh
===================================================================
--- /issm/trunk-jpl/scripts/test-issm-linux-binaries.sh	(revision 25195)
+++ /issm/trunk-jpl/scripts/test-issm-linux-binaries.sh	(revision 25196)
@@ -6,6 +6,4 @@
 #
 
-unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
-
 MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota')]"
 MATLAB_PATH="/usr/local/MATLAB/R2019b"
@@ -14,4 +12,7 @@
 TARBALL_NAME="issm-linux"
 TARBALL="${TARBALL_NAME}.tar.gz"
+
+export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
+export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
 
 cd ${INSTALL_DIR}
Index: /issm/trunk-jpl/scripts/test-issm-mac-binaries-with_dakota.sh
===================================================================
--- /issm/trunk-jpl/scripts/test-issm-mac-binaries-with_dakota.sh	(revision 25195)
+++ /issm/trunk-jpl/scripts/test-issm-mac-binaries-with_dakota.sh	(revision 25196)
@@ -5,6 +5,4 @@
 # NOTE: Tarball must already exist in INSTALL_DIR
 #
-
-unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
 
 MATLAB_NROPTIONS="'id',[IdFromString('Dakota')],'exclude',[234,235,418,420,444,445]"
@@ -15,4 +13,8 @@
 TARBALL_NAME="issm-mac-with_dakota"
 TARBALL="${TARBALL_NAME}.tar.gz"
+
+export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
+export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
+
 
 cd ${INSTALL_DIR}
@@ -53,5 +55,4 @@
 
 export ISSM_DIR="${INSTALL_DIR}"
-export PATH="${PATH}:${ISSM_DIR}/bin"
 export PYTHONPATH="${ISSM_DIR}/scripts"
 export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
Index: /issm/trunk-jpl/scripts/test-issm-mac-binaries.sh
===================================================================
--- /issm/trunk-jpl/scripts/test-issm-mac-binaries.sh	(revision 25195)
+++ /issm/trunk-jpl/scripts/test-issm-mac-binaries.sh	(revision 25196)
@@ -6,5 +6,6 @@
 #
 
-unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
+export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
+export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
 
 MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota'),435,701,702,703]"
Index: /issm/trunk-jpl/src/m/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/m/Makefile.am	(revision 25195)
+++ /issm/trunk-jpl/src/m/Makefile.am	(revision 25196)
@@ -48,4 +48,5 @@
 	${ISSM_DIR}/src/m/qmu/setupdesign/*.m \
 	${ISSM_DIR}/src/m/regional/*.m \
+	${ISSM_DIR}/src/m/shp/*.m \
 	${ISSM_DIR}/src/m/solve/*.m \
 	${ISSM_DIR}/src/m/solvers/*.m \
Index: /issm/trunk-jpl/src/m/coordsystems/gmtmask.m
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/gmtmask.m	(revision 25195)
+++ /issm/trunk-jpl/src/m/coordsystems/gmtmask.m	(revision 25196)
@@ -36,4 +36,6 @@
 
 	%Avoid bypassing of the ld library path by Matlab (:()
+	%
+	% TODO: Do we really need this (we can/already set it in etc/environment.sh)?
 	if ismac,
 		dyld_library_path_old=getenv('DYLD_LIBRARY_PATH');
@@ -42,7 +44,7 @@
 
 	%Find path to gmt, list all possible known paths to gmt (you may need to add yours to the list)
-   paths = {[issmdir() '/bin/gmt'],[issmdir() '/externalpackages/gmt/install/bin/gmt'],'/Applications/GMT-5.4.3.app/Contents/Resources/bin/gmt'};
+   gmtpaths = {[issmdir '/bin/gmt'],[issmdir '/externalpackages/gmt/install/bin/gmt'],'/Applications/GMT-5.4.3.app/Contents/Resources/bin/gmt'};
    gmtpath = '';
-   for i=paths
+   for i=gmtpaths
       if exist(i{1},'file'),
          gmtpath = i{1};
@@ -51,5 +53,5 @@
    end
    if isempty(gmtpath),
-      error('gmt not found, make sure it is properly installed, or add its path to this file (line 44)');
+      error('gmt not found! Make sure it is properly installed, or add its path to this file.');
    end
    
Index: /issm/trunk-jpl/src/m/coordsystems/gmtmask.py
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/gmtmask.py	(revision 25195)
+++ /issm/trunk-jpl/src/m/coordsystems/gmtmask.py	(revision 25196)
@@ -1,7 +1,8 @@
-from os import getenv, putenv
+import os
 import subprocess
 
 import numpy as np
 
+from issmdir import *
 from MatlabFuncs import *
 from model import *
@@ -44,8 +45,6 @@
 
     #Avoid bypassing of the ld library path by Matlab (:()
-    try:
-        issmdir
-    except NameError:
-        issmdir = getenv('ISSM_DIR')
+    issm_dir = issmdir()
+
     try:
         ismac
@@ -53,14 +52,33 @@
         ismac = False
 
+    # TODO: Do we really need this (we can/already set it in etc/environment.sh)?
     if ismac:
-        dyld_library_path_old = getenv('DYLD_LIBRARY_PATH')
-        putenv('DYLD_LIBRARY_PATH', issmdir + '/externalpackages/curl/install/lib:' + issmdir + '/externalpackages/hdf5/install/lib:' + issmdir + '/externalpackages/netcdf/install/lib')
+        dyld_library_path_old = os.getenv('DYLD_LIBRARY_PATH')
+        os.putenv('DYLD_LIBRARY_PATH', issm_dir + '/externalpackages/curl/install/lib:' + issm_dir + '/externalpackages/hdf5/install/lib:' + issm_dir + '/externalpackages/netcdf/install/lib')
+
+    #Find path to gmt (you may need to add yours to the list).
+    #
+    # NOTE: Assumes gmtselect is also in this directory.
+    #
+    gmtpaths = [
+        issm_dir + '/bin/gmt',
+        issm_dir + '/externalpackages/gmt/install/bin/gmt',
+        '/Applications/GMT-5.4.3.app/Contents/Resources/bin/gmt'
+    ]
+    gmtpath = ''
+    for i in range(len(gmtpaths)):
+        if os.path.isfile(gmtpaths[i]):
+            gmtpath = gmtpaths[i]
+            break
+
+    if gmtpath == '':
+        raise Exception('gmt not found! Make sure it is properly installed, or add its path to this file.')
 
     #figure out which vertices are on the ocean, which one on the continent:
-    subprocess.call(issmdir + '/externalpackages/gmt/install/bin/gmt gmtselect ./ all_vertices.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt', shell=True)
+    subprocess.call(gmtpath + ' gmtselect ./ all_vertices.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt', shell=True)
 
     #reset DYLD_LIBRARY_PATH to what it was:
     if ismac:
-        putenv('DYLD_LIBRARY_PATH', dyld_library_path_old)
+        os.putenv('DYLD_LIBRARY_PATH', dyld_library_path_old)
 
     #read the con_vertices.txt file and flag our mesh vertices on the continent
