Index: /issm/trunk-jpl/src/m/solve/WriteData.py
===================================================================
--- /issm/trunk-jpl/src/m/solve/WriteData.py	(revision 25309)
+++ /issm/trunk-jpl/src/m/solve/WriteData.py	(revision 25310)
@@ -42,9 +42,9 @@
     #       end
 
-    # Make a copy of the the data so that we do not accidently overwrite any 
+    # Make a copy of the the data so that we do not accidently overwrite any
     # model fields.
     #
-    # NOTE: This is a temporary fix to get builds green in Jenkins: without it, 
-    #       there still exists a bug wherein model fields are being modified 
+    # NOTE: This is a temporary fix to get builds green in Jenkins: without it,
+    #       there still exists a bug wherein model fields are being modified
     #       (see https://ross.ics.uci.edu/jenkins/view/All/job/Debian_Linux-Python/1036).
     #
@@ -53,13 +53,17 @@
     #Scale data if necessary
     if datatype == 'MatArray':
+        #if it is a matrix array we loop over the matrixes
         for i in range(np.size(data)):
             if options.exist('scale'):
                 scale = options.getfieldvalue('scale')
                 if np.ndim(data[i]) > 1 and data[i].shape[0] == timeserieslength:
-                    data[i][:-2, :] = scale * data[i][:-2, :]
+                    #We scale everything but the last line that holds time
+                    data[i][:-1, :] = scale * data[i][:-1, :]
                 else:
                     data[i] = scale * data[i]
-            if np.ndim(data) > 1 and data[i].shape[0] == timeserieslength:
+            if np.ndim(data[i]) > 1 and data[i].shape[0] == timeserieslength:
+                #no scaling given, use yts instead
                 yts = options.getfieldvalue('yts')
+                #We scale everything but the last line that holds time
                 data[i][-1, :] = yts * data[i][-1, :]
     else:
@@ -67,5 +71,6 @@
             scale = options.getfieldvalue('scale')
             if np.ndim(data) > 1 and data.shape[0] == timeserieslength:
-                data[:-2, :] = scale * data[:-2, :]
+                #We scale everything but the last line that holds time
+                data[:-1, :] = scale * data[:-1, :]
             else:
                 data = scale * data
