Ignore:
Timestamp:
Aug 4, 2008, 12:08:33 PM (16 years ago)
Author:
ole
Message:

Cleaned up in tests and made directories independent on where the test is run from.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/test_tsunami_okada.py

    r5421 r5601  
    2424        rectangular sources
    2525        """
    26         #get path where this test is run
     26        # Get path where this test is run
    2727        path = get_pathname_from_package('anuga.shallow_water')
    28         #choose what test to proceed
     28       
     29        # Choose what test to proceed
    2930        T = 1
    3031       
    3132
    32 
    3333        if T==0:
    34             # fotran output file
    35            
     34            # Fortran output file           
    3635            filename = path+sep+'fullokada_SP.txt'
    37         # initial condition of earthquake for multiple source
     36           
     37            # Initial condition of earthquake for multiple source
    3838            x0 = 7000.0
    3939            y0 = 10000.0
     
    4848            NSMAX=1
    4949        elif T==1:
    50         # fotran output file
     50            # Fortran output file       
    5151            filename = path+sep+'fullokada_SS.txt'
    52         # initial condition of earthquake for multiple source
     52           
     53            # Initial condition of earthquake for multiple source
    5354            x0 = 7000.0
    5455            y0 = 10000.0
     
    6566        elif T==2:
    6667
    67         # fotran output file
     68            # Fortran output file
    6869            filename = path+sep+'fullokada_MS.txt'
    69         # initial condition of earthquake for multiple source
     70           
     71            # Initial condition of earthquake for multiple source
    7072            x0 = [7000.0,10000.0]
    7173            y0 = [10000.0,7000.0]
     
    8284
    8385
    84         # get output file from original okada fortran script.
    85         # vertical displacement is listed under tmp.
     86        # Get output file from original okada fortran script.
     87        # Vertical displacement is listed under tmp.
    8688        polyline_file=open(filename,'r')
    8789        lines=polyline_file.readlines()
     
    160162        """
    161163
    162         #get path where this test is run
     164        # Get path where this test is run
    163165        path= get_pathname_from_package('anuga.shallow_water')
    164166       
    165         #choose what test to proceed
     167        # Choose what test to proceed
    166168        T=1
    167169
    168170        if T==0:
    169         # fotran output file
    170            
     171            # Fortran output file
    171172            filename = path+sep+'fullokada_SP.txt'
    172         # initial condition of earthquake for multiple source
     173           
     174            # Initial condition of earthquake for multiple source
    173175            x0 = 7000.0
    174176            y0 = 10000.0
     
    183185            NSMAX=1
    184186        elif T==1:
    185         # fotran output file
     187            # Fortran output file
    186188            filename = path+sep+'fullokada_SS.txt'
    187         # initial condition of earthquake for multiple source
     189           
     190            # Initial condition of earthquake for multiple source
    188191            x0 = 7000.0
    189192            y0 = 10000.0
     
    200203        elif T==2:
    201204
    202         # fotran output file
     205            # Fortran output file
    203206            filename = path+sep+'fullokada_MS.txt'
    204         # initial condition of earthquake for multiple source
     207           
     208            # Initial condition of earthquake for multiple source
    205209            x0 = [7000.0,10000.0]
    206210            y0 = [10000.0,7000.0]
     
    217221
    218222
    219         # get output file from original okada fortran script.
    220         # vertical displacement is listed under tmp.
     223        # Get output file from original okada fortran script.
     224        # Vertical displacement is listed under tmp.
    221225        polyline_file=open(filename,'r')
    222226        lines=polyline_file.readlines()
Note: See TracChangeset for help on using the changeset viewer.