Index: issm/trunk-jpl/src/m/solve/solve.py
===================================================================
--- issm/trunk-jpl/src/m/solve/solve.py	(revision 25499)
+++ issm/trunk-jpl/src/m/solve/solve.py	(revision 25758)
@@ -1,3 +1,3 @@
-import datetime
+from datetime import datetime
 import os
 import shutil
@@ -16,29 +16,31 @@
     Usage:
         md = solve(md, solutionstring, varargin)
-        where varargin is a list of paired arguments of string OR enums
+    
+    where varargin is a list of paired arguments of string OR enums
 
-        solution types available comprise:
-            - 'Stressbalance'      or 'sb'
-            - 'Masstransport'      or 'mt'
-            - 'Thermal'            or 'th'
-            - 'Steadystate'        or 'ss'
-            - 'Transient'          or 'tr'
-            - 'Balancethickness'   or 'mc'
-            - 'Balancevelocity'    or 'bv'
-            - 'BedSlope'           or 'bsl'
-            - 'SurfaceSlope'       or 'ssl'
-            - 'Hydrology'          or 'hy'
-            - 'DamageEvolution'    or 'da'
-            - 'Gia'                or 'gia'
-            - 'Esa'                or 'esa'
-            - 'Sealevelrise'       or 'slr'
-            - 'Love'               or 'lv'
+    Solution types available comprise:
+    - 'Stressbalance'      or 'sb'
+    - 'Masstransport'      or 'mt'
+    - 'Thermal'            or 'th'
+    - 'Steadystate'        or 'ss'
+    - 'Transient'          or 'tr'
+    - 'Balancethickness'   or 'mc'
+    - 'Balancevelocity'    or 'bv'
+    - 'BedSlope'           or 'bsl'
+    - 'SurfaceSlope'       or 'ssl'
+    - 'Hydrology'          or 'hy'
+    - 'DamageEvolution'    or 'da'
+    - 'Gia'                or 'gia'
+    - 'Esa'                or 'esa'
+    - 'Sealevelrise'       or 'slr'
+    - 'Love'               or 'lv'
 
-        extra options:
-            - loadonly          : does not solve. only load results
-            - checkconsistency  : 'yes' or 'no' (default is 'yes'), ensures 
-                                  checks on consistency of model
-            - restart           : 'directory name (relative to the execution 
-                                  directory) where the restart file is located
+    Extra options:
+    - loadonly         : does not solve. only load results
+    - runtimename      : true or false (default is true), makes name unique
+    - checkconsistency : 'yes' or 'no' (default is 'yes'), ensures checks on 
+                         consistency of model
+    - restart          : directory name (relative to the execution directory) 
+                         where the restart file is located
 
     Examples:
@@ -47,5 +49,5 @@
     """
 
-    #recover and process solve options
+    # Recover and process solve options
     if solutionstring.lower() == 'sb' or solutionstring.lower() == 'stressbalance':
         solutionstring = 'StressbalanceSolution'
@@ -82,5 +84,5 @@
     options = pairoptions('solutionstring', solutionstring, *args)
 
-    #recover some fields
+    # Recover some fields
     md.private.solution = solutionstring
     cluster = md.cluster
@@ -90,5 +92,5 @@
         batch = 0
 
-    #check model consistency
+    # Check model consistency
     if options.getfieldvalue('checkconsistency', 'yes') == 'yes':
         if md.verbose.solution:
@@ -96,8 +98,8 @@
         ismodelselfconsistent(md)
 
-    #First, build a runtime name that is unique
+    # First, build a runtime name that is unique
     restart = options.getfieldvalue('restart', '')
     if restart == 1:
-        pass  #do nothing
+        pass  # do nothing
     else:
         if restart:
@@ -105,25 +107,25 @@
         else:
             if options.getfieldvalue('runtimename', True):
-                c = datetime.datetime.now()
+                c = datetime.now()
                 md.private.runtimename = "%s-%02i-%02i-%04i-%02i-%02i-%02i-%i" % (md.miscellaneous.name, c.month, c.day, c.year, c.hour, c.minute, c.second, os.getpid())
             else:
                 md.private.runtimename = md.miscellaneous.name
 
-    #if running qmu analysis, some preprocessing of dakota files using models
-    #fields needs to be carried out.
+    # If running QMU analysis, some preprocessing of Dakota files using models 
+    # fields needs to be carried out
     if md.qmu.isdakota:
         md = preqmu(md, options)
 
-    #Do we load results only?
+    # Do we load results only?
     if options.getfieldvalue('loadonly', False):
         md = loadresultsfromcluster(md)
         return md
 
-    #Write all input files
-    marshall(md)  # bin file
-    md.toolkits.ToolkitsFile(md.miscellaneous.name + '.toolkits')  # toolkits file
-    cluster.BuildQueueScript(md.private.runtimename, md.miscellaneous.name, md.private.solution, md.settings.io_gather, md.debug.valgrind, md.debug.gprof, md.qmu.isdakota, md.transient.isoceancoupling)  # queue file
+    # Write all input files
+    marshall(md) # bin file
+    md.toolkits.ToolkitsFile(md.miscellaneous.name + '.toolkits') # toolkits file
+    cluster.BuildQueueScript(md.private.runtimename, md.miscellaneous.name, md.private.solution, md.settings.io_gather, md.debug.valgrind, md.debug.gprof, md.qmu.isdakota, md.transient.isoceancoupling) # queue file
 
-    #Stop here if batch mode
+    # Stop here if batch mode
     if options.getfieldvalue('batch', 'no') == 'yes':
         print('batch mode requested: not launching job interactively')
@@ -131,5 +133,5 @@
         return md
 
-    #Upload all required files:
+    # Upload all required files:
     modelname = md.miscellaneous.name
     filelist = [modelname + '.bin ', modelname + '.toolkits ', modelname + '.queue ']
@@ -140,16 +142,16 @@
         cluster.UploadQueueJob(md.miscellaneous.name, md.private.runtimename, filelist)
 
-    #Launch job
+    # Launch job
     cluster.LaunchQueueJob(md.miscellaneous.name, md.private.runtimename, filelist, restart, batch)
 
-    #wait on lock
+    # Wait on lock
     if md.settings.waitonlock > 0:
-        #we wait for the done file
         islock = waitonlock(md)
-        if islock == 0:  #no results to be loaded
+        if islock == 0:  # no results to be loaded
             print('The results must be loaded manually with md = loadresultsfromcluster(md).')
-        else:  #load results
+        else:  # load results
             if md.verbose.solution:
                 print('loading results from cluster')
             md = loadresultsfromcluster(md)
+
     return md
