Changeset 25182


Ignore:
Timestamp:
06/29/20 15:25:08 (5 years ago)
Author:
jdquinn
Message:

BUG: Corrected test2003.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/test2003.py

    r25166 r25182  
    2727#Access every element in lat using the indices in elements
    2828# - 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) / 3
    30 longe = sum(md.mesh.long[md.mesh.elements - 1], 1) / 3
    31 pos = np.intersect1d(np.array(np.where(late < -75)), np.array(np.where(longe < 0)))
     29late = md.mesh.lat[md.mesh.elements - 1].sum(axis=1)/ 3
     30longe = md.mesh.long[md.mesh.elements - 1].sum(axis=1)/ 3
     31pos = np.intersect1d(np.array(np.where(late < -75)[0]), np.array(np.where(longe < 0)[0]))
    3232md.solidearth.surfaceload.icethicknesschange[pos] = -1
    3333
     
    4141pos = np.where(mask == 0)[0]
    4242icemask[pos] = -1
    43 pos = np.where(np.sum(mask[md.mesh.elements - 1], axis=1) < 3)
     43pos = np.where(mask[md.mesh.elements - 1].sum(axis=1) < 3)[0]
    4444icemask[md.mesh.elements[pos, :] - 1] = -1
    4545md.mask.ice_levelset = icemask
     
    5252#make sure wherever there is an ice load, that the mask is set to ice:
    5353#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] = 1
     54md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = -1
    5555# }}}
    5656
Note: See TracChangeset for help on using the changeset viewer.