Index: /issm/trunk-jpl/src/m/mesh/roundmesh.m
===================================================================
--- /issm/trunk-jpl/src/m/mesh/roundmesh.m	(revision 27840)
+++ /issm/trunk-jpl/src/m/mesh/roundmesh.m	(revision 27841)
@@ -11,8 +11,8 @@
 
 %First we have to create the domain outline 
-if nargin<4
+if nargin>=4:
+	expname = varargin{1};
+else
 	expname = [tempname() '.exp'];
-else
-	expname = varargin{1};
 end
 
@@ -20,5 +20,5 @@
 pointsonedge=floor((2.*pi*radius) / resolution)+1; %+1 to close the outline
 
-%Calculate the cartesians coordinates of the points
+%Calculate the Cartesian coordinates of the points
 theta=linspace(0,2*pi,pointsonedge)';
 x_list=roundsigfig(radius*cos(theta),12);
Index: /issm/trunk-jpl/src/m/mesh/roundmesh.py
===================================================================
--- /issm/trunk-jpl/src/m/mesh/roundmesh.py	(revision 27840)
+++ /issm/trunk-jpl/src/m/mesh/roundmesh.py	(revision 27841)
@@ -3,23 +3,31 @@
 from collections import OrderedDict
 from expwrite import expwrite
+from MatlabFuncs import tempname
 from triangle import triangle
 
 
-def roundmesh(md, radius, resolution):
-    """
-    ROUNDMESH - create an unstructured round mesh
+def roundmesh(md, radius, resolution, *args):
+    """roundmesh - create an unstructured round mesh
 
-       This script will generate a structured round mesh
- - radius     : specifies the radius of the circle in meters
- - resolution : specifies the resolution in meters
+    This script will generate a structured round mesh
+    - radius     : specifies the radius of the circle in meters
+    - resolution : specifies the resolution in meters
 
-       Usage:
-          md = roundmesh(md, radius, resolution)
+    Usage:
+        md = roundmesh(md, radius, resolution)
+        md = roundmesh(md, radius, resolution, 'domain.exp')
     """
     # First we have to create the domain outline
+    if len(args):
+        expname = args[0]
+    else:
+        expname = tempname() + '.exp'
+        print(expname)
+        exit()
+
     # Get number of points on the circle
-    pointsonedge = int(np.floor((2. * np.pi * radius) / resolution) + 1)  # + 1 to close the outline
+    pointsonedge = int(np.floor((2. * np.pi * radius) / resolution) + 1)  # +1 to close the outline
 
-    # Calculate the cartesians coordinates of the points
+    # Calculate the Cartesian coordinates of the points
     theta = np.linspace(0., 2. * np.pi, pointsonedge)
     x_list = roundsigfig(radius * np.cos(theta), 12)
@@ -29,17 +37,17 @@
     A['y'] = y_list
     A['density'] = 1.
-    expwrite(A, 'RoundDomainOutline.exp')
+    expwrite(A, expname)
 
     # Call Bamg
-    md = triangle(md, 'RoundDomainOutline.exp', resolution)
+    md = triangle(md, expname, resolution)
     # md = bamg(md, 'domain', 'RoundDomainOutline.exp', 'hmin', resolution)
 
-    # move the closest node to the center
+    # Move the closest node to the center
     pos = np.argmin(md.mesh.x**2 + md.mesh.y**2)
     md.mesh.x[pos] = 0.
     md.mesh.y[pos] = 0.
 
-    # delete domain
-    os.remove('RoundDomainOutline.exp')
+    # Delete domain
+    os.remove(expname)
 
     return md
@@ -47,5 +55,4 @@
 
 def roundsigfig(x, n):
-
     nonzeros = np.where(x != 0)
     digits = np.ceil(np.log10(np.abs(x[nonzeros])))
Index: /issm/trunk-jpl/src/m/miscellaneous/MatlabFuncs.py
===================================================================
--- /issm/trunk-jpl/src/m/miscellaneous/MatlabFuncs.py	(revision 27840)
+++ /issm/trunk-jpl/src/m/miscellaneous/MatlabFuncs.py	(revision 27841)
@@ -372,2 +372,10 @@
         return False
 # }}}
+
+def tempname():  # {{{
+    import random
+    import string
+
+    alphanumlist = string.ascii_lowercase + string.digits
+    return '/tmp/tp' + ''.join(random.choices(alphanumlist, k=8)) + '_' + ''.join(random.choices(alphanumlist, k=4)) + '_' + ''.join(random.choices(alphanumlist, k=4)) + '_' + ''.join(random.choices(alphanumlist, k=4)) + '_' + ''.join(random.choices(alphanumlist, k=12))
+# }}}
Index: /issm/trunk-jpl/src/wrappers/Triangle/Triangle.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/Triangle/Triangle.h	(revision 27840)
+++ /issm/trunk-jpl/src/wrappers/Triangle/Triangle.h	(revision 27841)
@@ -19,5 +19,5 @@
 #ifdef _HAVE_JAVASCRIPT_MODULES_
 #undef _DO_NOT_LOAD_GLOBALS_ /*only module where this needs to be undefined, so as to 
-							   not include IssmComm several times in the javascript Modle construct.*/
+							   not include IssmComm several times in the JavaScript module construct.*/
 #endif
 
