Changeset 25181


Ignore:
Timestamp:
06/29/20 14:50:53 (5 years ago)
Author:
jdquinn
Message:

BUG: Corrected test2002.py

Location:
issm/trunk-jpl/test/NightlyRun
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/test2002.m

    r25169 r25181  
    33%mesh earth:
    44md=model;
    5 md.mesh=gmshplanet('radius',6.371012*10^3,'resolution',700.); %500 km resolution mesh
     5md.mesh=gmshplanet('radius',6.371012*10^3,'resolution',700.); %700 km resolution mesh
    66
    77%parameterize solidearth solution:
  • issm/trunk-jpl/test/NightlyRun/test2002.py

    r25171 r25181  
    2525
    2626#antarctica
    27 late = np.sum(md.mesh.lat[md.mesh.elements - 1], axis=1) / 3
    28 longe = np.sum(md.mesh.long[md.mesh.elements - 1], axis=1) / 3
     27late = md.mesh.lat[md.mesh.elements - 1].sum(axis=1) / 3
     28longe = md.mesh.long[md.mesh.elements - 1].sum(axis=1) / 3
    2929pos = np.where(late < -80)[0]
    3030md.solidearth.surfaceload.icethicknesschange[pos] = -100
     
    4242pos = np.where(mask == 0)[0]
    4343icemask[pos] = -1
    44 pos = np.where(np.sum(mask[md.mesh.elements - 1], axis=1) < 3)
     44pos = np.where(mask[md.mesh.elements - 1].sum(axis=1) < 3)[0]
    4545icemask[md.mesh.elements[pos, :] - 1] = -1
    4646md.mask.ice_levelset = icemask
    4747md.mask.ocean_levelset = -icemask
    48 
    49 #make sure that the ice level set is all inclusive:
    50 md.mask.land_levelset = np.zeros((md.mesh.numberofvertices, 1))
    51 md.mask.ocean_levelset = -np.ones((md.mesh.numberofvertices, 1))
    5248
    5349#make sure that the elements that have loads are fully grounded
     
    5753#make sure wherever there is an ice load, that the mask is set to ice:
    5854#pos = np.nonzero(md.solidearth.surfaceload.icethicknesschange)[0] # Do we need to do this twice?
    59 md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = 1
     55md.mask.ice_levelset[md.mesh.elements[pos, :] - 1] = -1
    6056# }}}
    6157
  • issm/trunk-jpl/test/NightlyRun/test2010.py

    r25178 r25181  
    4141mask = gmtmask(md.mesh.lat, md.mesh.long)
    4242icemask = np.ones((md.mesh.numberofvertices, 1))
    43 pos = np.where(mask == 0)
    44 icemask[pos[0]] = -1
     43pos = np.where(mask == 0)[0]
     44icemask[pos] = -1
    4545pos = np.where(mask[md.mesh.elements - 1].sum(axis=1) < 3)[0]
    4646icemask[md.mesh.elements[pos, :] - 1] = -1
Note: See TracChangeset for help on using the changeset viewer.