Ignore:
Timestamp:
06/28/20 00:26:36 (5 years ago)
Author:
jdquinn
Message:

BUG: Fix for test2002; additional MATLAB -> Python translation; cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/slr.py

    r25170 r25171  
    122122    def checkconsistency(self, md, solution, analyses):  # {{{
    123123        #Early return
    124         if (solution != 'SealevelriseAnalysis') or (solution == 'TransientSolution' and not md.transient.isslr):
     124        if (solution != 'SealevelriseAnalysis') or (solution == 'TransientSolution' and md.transient.isslr == 0):
    125125            return md
    126126
     
    147147
    148148        #check that love numbers are provided at the same level of accuracy:
    149         if (size(self.love_h, 0) != size(self.love_k, 0) | size(self.love_h, 0) != size(self.love_l, 0)):
    150             error('slr error message: love numbers should be provided at the same level of accuracy')
     149        if (size(self.love_h, 0) != size(self.love_k, 0)) or (size(self.love_h, 0) != size(self.love_l, 0)):
     150            raise Exception('slr error message: love numbers should be provided at the same level of accuracy')
    151151
    152152        #cross check that whereever we have an ice load, the mask is < 0 on each vertex:
     
    160160        #a coupler to a planet model is provided.
    161161        if self.geodetic and not md.transient.iscoupler and domaintype(md.mesh) != 'mesh3dsurface':
    162             error('model is requesting geodetic computations without being a mesh3dsurface, or being coupled to one!')
     162            raise Exception('model is requesting geodetic computations without being a mesh3dsurface, or being coupled to one!')
    163163        return md
    164164    # }}}
Note: See TracChangeset for help on using the changeset viewer.