Changeset 26818
- Timestamp:
- 01/25/22 13:26:22 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/classes/SMBautoregression.py ¶
r26816 r26818 129 129 temprefelevation = np.zeros((md.smb.num_basins)) 130 130 areas = GetAreas(md.mesh.elements, md.mesh.x, md.mesh.y) 131 for ii in range(int(md.smb.num_basins)):132 indices = np.where(md.smb.basin_id== ii+1)[0]131 for ii,bid in enumerate(np.unique(md.smb.basin_id)): 132 indices = np.where(md.smb.basin_id==bid)[0] 133 133 elemsh = np.zeros((len(indices))) 134 134 for jj in range(len(indices)): … … 142 142 elemsh[jj] = sumval/cntval 143 143 temprefelevation[ii] = np.sum(areas[indices]*elemsh)/np.sum(areas[indices]) 144 print(indices)145 print(areas[indices])146 print(elemsh)147 144 if(np.any(templapserate_pos!=0) or np.any(templapserate_neg!=0)): 148 145 print(' smb.refelevation not specified: Reference elevations set to mean surface elevation of basins')
Note:
See TracChangeset
for help on using the changeset viewer.