Changeset 25182
- Timestamp:
- 06/29/20 15:25:08 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/test2003.py
r25166 r25182 27 27 #Access every element in lat using the indices in elements 28 28 # - 1 to convert to base 0 indexing, 1 (not 2, in matlab) to sum over rows 29 late = sum(md.mesh.lat[md.mesh.elements - 1], 1)/ 330 longe = sum(md.mesh.long[md.mesh.elements - 1], 1)/ 331 pos = np.intersect1d(np.array(np.where(late < -75) ), np.array(np.where(longe < 0)))29 late = md.mesh.lat[md.mesh.elements - 1].sum(axis=1)/ 3 30 longe = md.mesh.long[md.mesh.elements - 1].sum(axis=1)/ 3 31 pos = np.intersect1d(np.array(np.where(late < -75)[0]), np.array(np.where(longe < 0)[0])) 32 32 md.solidearth.surfaceload.icethicknesschange[pos] = -1 33 33 … … 41 41 pos = np.where(mask == 0)[0] 42 42 icemask[pos] = -1 43 pos = np.where( np.sum(mask[md.mesh.elements - 1], axis=1) < 3)43 pos = np.where(mask[md.mesh.elements - 1].sum(axis=1) < 3)[0] 44 44 icemask[md.mesh.elements[pos, :] - 1] = -1 45 45 md.mask.ice_levelset = icemask … … 52 52 #make sure wherever there is an ice load, that the mask is set to ice: 53 53 #pos = np.nonzero(md.solidearth.surfaceload.icethicknesschange)[0] # Do we need to do this twice? 54 md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = 154 md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = -1 55 55 # }}} 56 56
Note:
See TracChangeset
for help on using the changeset viewer.