Changeset 25313
- Timestamp:
- 07/30/20 04:09:29 (5 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/SMBgemb.py
r25312 r25313 376 376 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'isclimatology', 'format', 'Boolean') 377 377 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'isconstrainsurfaceT', 'format', 'Boolean') 378 379 378 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Ta', 'format', 'DoubleMat', 'mattype', 2, 'timeserieslength', md.mesh.numberofelements + 1, 'yts', yts) 380 379 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'V', 'format', 'DoubleMat', 'mattype', 2, 'timeserieslength', md.mesh.numberofelements + 1, 'yts', yts) … … 434 433 time = self.Ta[-1] #assume all forcings are on the same time step 435 434 dtime = np.diff(time, n=1, axis=0) 436 dt = min(dtime) / yts435 dt = min(dtime) 437 436 438 437 WriteData(fid, prefix, 'data', dt, 'name', 'md.smb.dt', 'format', 'Double', 'scale', yts) -
issm/trunk-jpl/src/m/solve/WriteData.py
r25311 r25313 17 17 #process options 18 18 options = pairoptions.pairoptions(*args) 19 20 19 #Get data properties 21 20 if options.exist('object'): … … 49 48 # (see https://ross.ics.uci.edu/jenkins/view/All/job/Debian_Linux-Python/1036). 50 49 # 51 #data = deepcopy(data)50 data = deepcopy(data) 52 51 53 52 #Scale data if necessary … … 63 62 data[i] = scale * data[i] 64 63 if np.ndim(data[i]) > 1 and data[i].shape[0] == timeserieslength: 65 #no scaling given, use yts instead64 #no scaling given, just get the time right 66 65 yts = options.getfieldvalue('yts') 67 66 #We scale only the last line that holds time … … 77 76 if np.ndim(data) > 1 and data.shape[0] == timeserieslength: 78 77 yts = options.getfieldvalue('yts') 78 #We scale only the last line that holds time 79 # scaler = np.ones((np.shape(data))) 80 # scaler[-1, :] = yts 81 # data = scaler * data 79 82 data[-1, :] = yts * data[-1, :] 80 83
Note:
See TracChangeset
for help on using the changeset viewer.