Index: /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m
===================================================================
--- /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m	(revision 25693)
+++ /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m	(revision 25694)
@@ -129,4 +129,9 @@
 	results(index).(result.fieldname)=result.field;
 end
+
+disp(results)
+disp(length(results))
+pause
+
 % }}}
 function results=parseresultsfromdiskioserialsequential(md,filename) % {{{
Index: /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py
===================================================================
--- /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py	(revision 25693)
+++ /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py	(revision 25694)
@@ -78,63 +78,48 @@
 
 def parseresultsfromdiskioserial(md, filename):  # {{{
-    #Open file
+    # Open file
     try:
         fid = open(filename, 'rb')
     except IOError as e:
         raise IOError("parseresultsfromdisk error message: could not open {} for binary reading".format(filename))
-
-    #initialize results:
-    saveres = []
-
-    #Read fields until the end of the file.
-    loadres = ReadData(fid, md)
-
-    counter = 0
-    check_nomoresteps = 0
-    step = loadres['step']
-
-    while loadres:
-        #check that the new result does not add a step, which would be an error:
-        if check_nomoresteps:
-            if loadres['step'] >= 1:
-                raise TypeError("parsing results for a steady-state core, which incorporates transient results!")
-
-        #Check step, increase counter if this is a new step
-        if(step != loadres['step'] and loadres['step'] > 1):
-            counter = counter + 1
-            step = loadres['step']
-
-        #Add result
-        if loadres['step'] == 0:
-            #if we have a step = 0, this is a steady state solution, don't expect more steps.
-            index = 0
-            check_nomoresteps = 1
-        elif loadres['step'] == 1:
-            index = 0
-        else:
-            index = counter
-
-        if index > len(saveres) - 1:
-            for i in range(len(saveres) - 1, index - 1):
-                saveres.append(None)
-            saveres.append(resultsclass.results())
-        elif saveres[index] is None:
-            saveres[index] = resultsclass.results()
-
-    #Get time and step
-        if loadres['step'] != -9999.:
-            saveres[index].__dict__['step'] = loadres['step']
-        if loadres['time'] != -9999.:
-            saveres[index].__dict__['time'] = loadres['time']
-
-    #Add result
-        saveres[index].__dict__[loadres['fieldname']] = loadres['field']
-
-    #read next result
-        loadres = ReadData(fid, md)
-
+        
+    # Collect all results in a list
+    allresults = []
+    while True:
+        # Read next result
+        result = ReadData(fid, md)
+
+        if result == None:
+            if allresults == []:
+                raise Exception('no results found in binary file ' + filename)
+            else:
+                break
+
+        allresults.append(result)
     fid.close()
 
-    return saveres
+    # Now, process all results and find out how many steps we have
+    numresults = len(allresults)
+    allsteps = np.zeros((numresults, 1))
+    for i in range(numresults):
+        allsteps[i] = allresults[i]['step']
+    pos = np.where(allsteps != -9999)
+    allsteps = np.sort(np.unique(allsteps[pos]))
+
+    # Ok, now construct structure
+    results = []
+    for i in range(len(allsteps)):
+        results.append(resultsclass.results())
+    for i in range(numresults):
+        result = allresults[i]
+        index = 0
+        if result['step'] != -9999:
+            index = np.where(result['step'] == allsteps)[0][0]
+            setattr(results[index], 'step', result['step'])
+        if result['time'] != -9999:
+            setattr(results[index], 'time', result['time'])
+        setattr(results[index], result['fieldname'], result['field'])
+
+    return results
 # }}}
 
