Changeset 8943


Ignore:
Timestamp:
Jul 3, 2013, 11:56:10 PM (12 years ago)
Author:
davies
Message:

Added data check in Okada tsunami

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/shallow_water/okada_tsunami.py

    r8940 r8943  
    209209        raise Exception, 'ERROR: Dip should be between 0 and 90 degrees'
    210210
     211    depth=source[:,2]
     212    width=source[:,6]
     213    topdepth=depth-width/2.0*numpy.sin(dip/180.*numpy.pi)
     214    if(topdepth.min() < 0.0):
     215        print '  easting   northing   depth strike    dip length  width  disl1   disl2  disl3 topdepth'
     216        for i in range(len(source[:,0])):
     217            if(topdepth[i]<0.0):
     218                print source[i,:], topdepth[i]
     219
     220        raise Exception, 'ERROR: The tops of some sub-faults are above the ground (printed above)'
     221
    211222    #A few print statements
    212223    if verbose is True:
Note: See TracChangeset for help on using the changeset viewer.