Index: /issm/trunk-jpl/src/m/classes/clusters/generic.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic.m	(revision 25683)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic.m	(revision 25684)
@@ -95,13 +95,13 @@
 					if cluster.interactive
 						if IssmConfig('_HAVE_MPI_'),
-							fprintf(fid,'mpiexec -np %i %s/%s %s %s %s \n',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
+							fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
 						else
-							fprintf(fid,'%s/%s %s %s %s ',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
+							fprintf(fid,'%s/%s %s %s %s',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
 						end
 					else
 						if IssmConfig('_HAVE_MPI_'),
-							fprintf(fid,'mpiexec -np %i %s/%s %s %s %s 2> %s.errlog >%s.outlog &',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
+							fprintf(fid,'mpiexec -np %i %s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
 						else
-							fprintf(fid,'%s/%s %s %s %s 2> %s.errlog >%s.outlog &',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
+							fprintf(fid,'%s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
 						end
 					end
@@ -113,16 +113,16 @@
 					if ismac,
 						if IssmConfig('_HAVE_MPI_'),
-							fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --dsymutil=yes --suppressions=%s %s/%s %s %s %s 2> %s.errlog >%s.outlog ',...
+							fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --dsymutil=yes --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog ',...
 							cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname], modelname,modelname,modelname);
 						else
-							fprintf(fid,'%s --leak-check=full --dsymutil=yes --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog >%s.outlog ',...
+							fprintf(fid,'%s --leak-check=full --dsymutil=yes --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',...
 							cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname], modelname,modelname,modelname);
 						end
 					else
 						if IssmConfig('_HAVE_MPI_'),
-							fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog >%s.outlog ',...
+							fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',...
 							cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
 						else
-							fprintf(fid,'%s --leak-check=full --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog >%s.outlog ',...
+							fprintf(fid,'%s --leak-check=full --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',...
 							cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
 						end
Index: /issm/trunk-jpl/src/m/classes/clusters/generic.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 25683)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 25684)
@@ -104,11 +104,11 @@
                         fid.write('mpiexec -np {} {}/{} {} {}/{} {}'.format(self.np, self.codepath, executable, solution, self.executionpath, dirname, modelname))
                     else:
-                        fid.write('{}/{} {} {}/{} {} '.format(self.codepath, executable, solution, self.executionpath, dirname, modelname))
+                        fid.write('{}/{} {} {}/{} {}'.format(self.codepath, executable, solution, self.executionpath, dirname, modelname))
                 else:
                     if IssmConfig('_HAVE_MPI_')[0]:
-                        fid.write('mpiexec -np {} {}/{} {} {}/{} {} 2>{}.errlog>{}.outlog'.
+                        fid.write('mpiexec -np {} {}/{} {} {}/{} {} 2> {}.errlog > {}.outlog'.
                                   format(self.np, self.codepath, executable, solution, self.executionpath, dirname, modelname, modelname, modelname))
                     else:
-                        fid.write('{}/{} {} {}/{} {} 2>{}.errlog>{}.outlog '.
+                        fid.write('{}/{} {} {}/{} {} 2> {}.errlog > {}.outlog '.
                                   format(self.codepath, executable, solution, self.executionpath, dirname, modelname, modelname, modelname))
             elif isgprof:
@@ -122,8 +122,8 @@
 
                 if IssmConfig('_HAVE_MPI_')[0]:
-                    fid.write('mpiexec -np {} {} --leak-check=full {} {}/{} {} {}/{} {} 2>{}.errlog>{}.outlog '.
+                    fid.write('mpiexec -np {} {} --leak-check=full {} {}/{} {} {}/{} {} 2> {}.errlog > {}.outlog '.
                               format(self.np, self.valgrind, supstring, self.codepath, executable, solution, self.executionpath, dirname, modelname, modelname, modelname))
                 else:
-                    fid.write('{} --leak-check=full {} {}/{} {} {}/{} {} 2>{}.errlog>{}.outlog '.
+                    fid.write('{} --leak-check=full {} {}/{} {} {}/{} {} 2> {}.errlog > {}.outlog '.
                               format(self.valgrind, supstring, self.codepath, executable, solution, self.executionpath, dirname, modelname, modelname, modelname))
 
Index: /issm/trunk-jpl/src/m/classes/clusters/generic_static.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic_static.py	(revision 25683)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic_static.py	(revision 25684)
@@ -1,14 +1,16 @@
+import math
+import os
+import socket
+import subprocess
+
 import numpy as np
-import socket
-import os
-import math
-import subprocess
+
 from IssmConfig import IssmConfig
 from issmdir import issmdir
-from pairoptions import pairoptions
 from issmssh import issmssh
 from issmscpin import issmscpin
 from issmscpout import issmscpout
 import MatlabFuncs as m
+from pairoptions import pairoptions
 
 
@@ -58,7 +60,7 @@
     def checkconsistency(self, md, solution, analyses):  # {{{
         if self.np < 1:
-            md = checkmessage(md, 'number of processors should be at least 1')
-        if math.isnan(self.np):
-            md = checkmessage(md, 'number of processors should not be NaN!')
+            md.checkmessage('number of processors should be at least 1')
+        if np.isnan(self.np):
+            md.checkmessage('number of processors should not be NaN!')
 
         return md
Index: /issm/trunk-jpl/src/m/classes/clusters/local.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/local.py	(revision 25684)
+++ /issm/trunk-jpl/src/m/classes/clusters/local.py	(revision 25684)
@@ -0,0 +1,83 @@
+from subprocess import call
+
+import numpy as np
+
+from IssmConfig import IssmConfig
+from issmdir import *
+from pairoptions import pairoptions
+
+
+class local(object): #{{{
+    """LOCAL class definition
+
+    Usage:
+        cluster = local('name', 'astrid', 'np', 3)
+        cluster = local('name', oshostname(), 'np', 3, 'login', 'username')
+    """
+
+    def __init__(self, *args): #{{{
+        self.name           = ''
+        self.np             = 1
+        self.codepath       = IssmConfig('ISSM_PREFIX') + '/bin'
+        self.etcpath        = issmdir() + '/etc'
+        self.executionpath  = issmdir() + '/execution'
+        self.verbose        = 1
+        self.shell          = '/bin/sh'
+
+        # Use provided options to change fields
+        options = pairoptions(*args)
+
+        # Get name
+        cluster.name = options.getfieldvalue('name', oshostname())
+
+        # OK get other fields
+        self = options.AssignObjectFields(self)
+
+    def __repr__(cluster): #{{{
+        # Display the object
+        s = 'class {} = \n'.format(type(cluster).__name__)
+        s += '    name: {}\n'.format(cluster.name)
+        s += '    np: {}\n'.format(cluster.np)
+        s += '    codepath: {}\n'.format(cluster.codepath)
+        s += '    executionpath: {}\n'.format(cluster.executionpath)
+        s += '    etcpath: {}\n'.format(cluster.etcpath)
+        s += '    verbose: {}\n'.format(cluster.verbose)
+        s += '    shell: {}\n'.format(cluster.shell)
+
+        return s
+    #}}}
+
+    def checkconsistency: #{{{
+        if cluster.np < 1:
+            md.checkmessage('number of processors should be at least 1')
+
+        if np.isnan(cluster.np):
+            md.checkmessage('number of processors should not be NaN')
+
+        return md
+    #}}}
+
+    def BuildQueueScript(cluster, dirname, modelname, solution, io_gather, isvalgrind, isgporf, isdakota, isoceancoupling): #{{{
+        # Which executable are we calling?
+        executable = 'issm.exe' # Default
+
+        if isdakota:
+            executable = 'issm_dakota.exe'
+
+        fid = open(modelname + '.queue', 'w')
+        fid.write('#!{}\n'.format(cluster.shell))
+        fid.write('mpiexec -np {} {}/{} {} {} {}\n',cluster.np,cluster.codepath,executable,solution,'./',modelname)
+        fid.close()
+
+    def UploadQueueJob(cluster, modelname, dirname, filelist): #{{{
+        # Do nothing really
+        pass
+    #}}}
+
+    def LaunchQueueJob(cluster, modelname, dirname, filelist, restart, batch): #{{{
+        subprocess.call('source ' + modelname + '.queue')
+    #}}}
+
+    def Download(cluster, dirname, filelist): #{{{
+        pass
+    #}}}
Index: /issm/trunk-jpl/src/m/dev/devpath.py
===================================================================
--- /issm/trunk-jpl/src/m/dev/devpath.py	(revision 25683)
+++ /issm/trunk-jpl/src/m/dev/devpath.py	(revision 25684)
@@ -10,25 +10,4 @@
 if ISSM_DIR is None:
     raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!')
-
-# NOTE: Now having user install netcdf4 via pip
-#
-# #Get paths to locally installed Python libraries
-# tpls = [
-#     'cftime', # Needed for netCDF4
-#     'netCDF4'
-# ]
-# for tpl in os.listdir(ISSM_DIR + '/externalpackages'):
-#     tpl_path = ISSM_DIR + '/externalpackages/' + tpl
-#     for dirpath, dirnames, filenames in os.walk(tpl_path):
-#         install_lib_path = dirpath + '/install/lib'
-#         for dirpath, dirnames, filenames in os.walk(install_lib_path):
-#             for dirname in dirnames:
-#                 if dirname in tpls:
-#                     dir = dirpath + '/' + dirname
-#                     for file in os.listdir(dir):
-#                         if file.find(".py") != -1:
-#                             if file.find(".pyc") == -1:
-#                                 if dirpath not in sys.path:
-#                                     sys.path.append(dirpath)
 
 #Go through src/m and append any directory that contains a *.py file to PATH
Index: /issm/trunk-jpl/src/m/mesh/meshintersect3d.py
===================================================================
--- /issm/trunk-jpl/src/m/mesh/meshintersect3d.py	(revision 25683)
+++ /issm/trunk-jpl/src/m/mesh/meshintersect3d.py	(revision 25684)
@@ -63,5 +63,6 @@
         raise RuntimeError('issue with transition vector having one empty slot')
 
-    # Convert results to type 'int' to avoid modifying structures to which they are assigned
+    # Convert results to type 'int' to avoid modifying structures to which 
+    # results are assigned
     indices = indices.astype(int)
 
