Changeset 25310
- Timestamp:
- 07/29/20 03:26:25 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/solve/WriteData.py
r25307 r25310 42 42 # end 43 43 44 # Make a copy of the the data so that we do not accidently overwrite any 44 # Make a copy of the the data so that we do not accidently overwrite any 45 45 # model fields. 46 46 # 47 # NOTE: This is a temporary fix to get builds green in Jenkins: without it, 48 # there still exists a bug wherein model fields are being modified 47 # NOTE: This is a temporary fix to get builds green in Jenkins: without it, 48 # there still exists a bug wherein model fields are being modified 49 49 # (see https://ross.ics.uci.edu/jenkins/view/All/job/Debian_Linux-Python/1036). 50 50 # … … 53 53 #Scale data if necessary 54 54 if datatype == 'MatArray': 55 #if it is a matrix array we loop over the matrixes 55 56 for i in range(np.size(data)): 56 57 if options.exist('scale'): 57 58 scale = options.getfieldvalue('scale') 58 59 if np.ndim(data[i]) > 1 and data[i].shape[0] == timeserieslength: 59 data[i][:-2, :] = scale * data[i][:-2, :] 60 #We scale everything but the last line that holds time 61 data[i][:-1, :] = scale * data[i][:-1, :] 60 62 else: 61 63 data[i] = scale * data[i] 62 if np.ndim(data) > 1 and data[i].shape[0] == timeserieslength: 64 if np.ndim(data[i]) > 1 and data[i].shape[0] == timeserieslength: 65 #no scaling given, use yts instead 63 66 yts = options.getfieldvalue('yts') 67 #We scale everything but the last line that holds time 64 68 data[i][-1, :] = yts * data[i][-1, :] 65 69 else: … … 67 71 scale = options.getfieldvalue('scale') 68 72 if np.ndim(data) > 1 and data.shape[0] == timeserieslength: 69 data[:-2, :] = scale * data[:-2, :] 73 #We scale everything but the last line that holds time 74 data[:-1, :] = scale * data[:-1, :] 70 75 else: 71 76 data = scale * data
Note:
See TracChangeset
for help on using the changeset viewer.