Ignore:
Timestamp:
Aug 7, 2008, 8:54:24 AM (16 years ago)
Author:
sexton
Message:

updated build_boundary based on 44 unit sources as opposed to all mux2 files that were sitting in the mux directory (i.e. 49)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/perth/build_boundary.py

    r5578 r5623  
    1010import project
    1111
    12 
    1312######################################
    1413# Create urs boundary from mux2files #
    1514######################################
    1615
    17 #print project.muxhome
    1816dir=os.path.join(project.muxhome,'mux')
    19 #print dir
    20 prefix=os.path.join(dir,'Java-00')
    21 suffix='-z.grd'
    2217
    23 urs_filenames={}
    24 for filename in os.listdir(dir):
    25     basename = filename[:-7]
     18# taken from David's event list
     19urs_filenames = [
     20    os.path.join(dir,'Java-0000-z.grd'),
     21    os.path.join(dir,'Java-0001-z.grd'),
     22    os.path.join(dir,'Java-0002-z.grd'),
     23    os.path.join(dir,'Java-0003-z.grd'),
     24    os.path.join(dir,'Java-0005-z.grd'),
     25    os.path.join(dir,'Java-0006-z.grd'),
     26    os.path.join(dir,'Java-0007-z.grd'),
     27    os.path.join(dir,'Java-0008-z.grd'),
     28    os.path.join(dir,'Java-0010-z.grd'),
     29    os.path.join(dir,'Java-0011-z.grd'),
     30    os.path.join(dir,'Java-0012-z.grd'),
     31    os.path.join(dir,'Java-0013-z.grd'), 
     32    os.path.join(dir,'Java-0015-z.grd'), 
     33    os.path.join(dir,'Java-0016-z.grd'), 
     34    os.path.join(dir,'Java-0017-z.grd'), 
     35    os.path.join(dir,'Java-0018-z.grd'), 
     36    os.path.join(dir,'Java-0020-z.grd'), 
     37    os.path.join(dir,'Java-0021-z.grd'), 
     38    os.path.join(dir,'Java-0022-z.grd'), 
     39    os.path.join(dir,'Java-0023-z.grd'), 
     40    os.path.join(dir,'Java-0025-z.grd'), 
     41    os.path.join(dir,'Java-0026-z.grd'), 
     42    os.path.join(dir,'Java-0027-z.grd'), 
     43    os.path.join(dir,'Java-0028-z.grd'), 
     44    os.path.join(dir,'Java-0029-z.grd'), 
     45    os.path.join(dir,'Java-0030-z.grd'), 
     46    os.path.join(dir,'Java-0031-z.grd'), 
     47    os.path.join(dir,'Java-0032-z.grd'), 
     48    os.path.join(dir,'Java-0033-z.grd'), 
     49    os.path.join(dir,'Java-0034-z.grd'), 
     50    os.path.join(dir,'Java-0035-z.grd'), 
     51    os.path.join(dir,'Java-0036-z.grd'), 
     52    os.path.join(dir,'Java-0037-z.grd'), 
     53    os.path.join(dir,'Java-0038-z.grd'), 
     54    os.path.join(dir,'Java-0039-z.grd'), 
     55    os.path.join(dir,'Java-0040-z.grd'), 
     56    os.path.join(dir,'Java-0041-z.grd'), 
     57    os.path.join(dir,'Java-0042-z.grd'), 
     58    os.path.join(dir,'Java-0043-z.grd'), 
     59    os.path.join(dir,'Java-0044-z.grd'), 
     60    os.path.join(dir,'Java-0045-z.grd'), 
     61    os.path.join(dir,'Java-0046-z.grd'), 
     62    os.path.join(dir,'Java-0047-z.grd'),
     63    os.path.join(dir,'Java-0048-z.grd')] 
     64 
     65print 'number of sources', len(urs_filenames)
    2666
    27     urs_filenames[basename] = True
     67#from os import sys
     68#sys.exit()
     69# for all mux files
     70#urs_filenames={}
     71##for filename in os.listdir(dir)
     72##    basename = filename[:-7]
     73##
     74##    urs_filenames[basename] = True
     75   
     76# Make list of basenames 
     77#urs_filenames = [os.path.join(dir, basename) for basename in urs_filenames.keys()]
    2878
    29 # Make list of basenames 
    30 urs_filenames = [os.path.join(dir, basename) for basename in urs_filenames.keys()]
    31 
    32 # AS per David Burbidge email on friday 4th July the mag 9.3 event
     79# AS per David Burbidge email on Friday 4th July the mag 9.3 event
    3380# has 1m worth of slip on each sub fault therefore mutliple each unit
    34 # soucre by the slip (10.4544) and sum the 44 time series together to
     81# source by the slip (10.4544) and sum the 44 time series together to
    3582# get the time series for this event at the points on your boundary.
    3683
    37 weights=10.4544*ones(len(urs_filenames),Float)
     84weight_factor = 10.4544
     85weights=weight_factor*ones(len(urs_filenames),Float)
    3886
    39 scenario_name=project.scenario_name
     87scenario_name='perth' #project.scenario_name
    4088order_filename=os.path.join(project.boundaries_dir, 'thinned_bound_order.txt')
    4189
     
    5098        mean_stage=project.tide,
    5199        verbose=True)
    52 
    53 
    54 
    55 
    56 
Note: See TracChangeset for help on using the changeset viewer.