Ignore:
Timestamp:
Sep 18, 2006, 5:19:25 PM (18 years ago)
Author:
sexton
Message:

updates to Hobart script(data not yet received)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/hobart_2006/run_hobart.py

    r3559 r3615  
    66
    77The scenario is defined by a triangular mesh created from project.polygon,
    8 the elevation data and a simulated submarine landslide.
     8the elevation data and a tsunami wave generated by MOST.
    99
    1010Ole Nielsen and Duncan Gray, GA - 2005 and Nick Bartzis, GA - 2006
    1111"""
    12 
    13 
    1412#-------------------------------------------------------------------------------# Import necessary modules
    1513#-------------------------------------------------------------------------------
     
    6765# filenames
    6866onshore_dem_name = project.onshore_dem_name
    69 coast_points = project.coast_dem_name
    70 offshore_points = project.offshore_dem_name
    7167meshname = project.meshname+'.msh'
    7268source_dir = project.boundarydir
     
    8177
    8278#creates pts file for onshore DEM
    83 dem2pts(onshore_dem_name,
    84         easting_min=project.eastingmin,
    85         easting_max=project.eastingmax,
    86         northing_min=project.northingmin,
    87         northing_max= project.northingmax,
    88         use_cache=True,
    89         verbose=True)
    90 
    91 convert_dem_from_ascii2netcdf(islands_dem_name, use_cache=True, verbose=True)
    92 
    93 #creates pts file for islands DEM
    94 dem2pts(islands_dem_name, use_cache=True, verbose=True)
     79dem2pts(onshore_dem_name, use_cache=True, verbose=True)
    9580
    9681print'create G1'
    97 G1 = Geospatial_data(file_name = project.offshore_dem_name + '.xya')
     82G1 = Geospatial_data(file_name = project.offshore_dem_name_local + '.xya')
    9883print'create G2'
    99 G2 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
     84G2 = Geospatial_data(file_name = project.offshore_dem_name_aho + '.xya')
    10085print'create G3'
    101 G3 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
    102 print'add G1+G2+G3'
    103 G = G1 + G2 + G3
     86G3 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
     87print'create G4'
     88G4 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
     89print'add G1+G2+G3+G4'
     90G = G1 + G2 + G3 + G4
    10491print'export G'
    10592G.export_points_file(project.combined_dem_name + '.pts')
     
    113100from anuga.pmesh.mesh_interface import create_mesh_from_regions
    114101
    115 #new
    116 region_res = 200000
    117 coast_res = 25000
    118 hobart_res = 5000
     102# use 75 for onshore components (12.5m DEM)
     103island_res = 10000
     104hobart_res = 10000
     105peninsular_res = 10000
    119106interior_regions = [[project.poly_hobart, hobart_res],
    120                     [project.poly_coast, coast_res],
    121                     [project.poly_region, region_res]]
     107                    [project.poly_tasman_peninsula, peninsula_res],
     108                    [project.poly_bruny, island_res]]
    122109
    123110print 'number of interior regions', len(interior_regions)
     
    126113_ = cache(create_mesh_from_regions,
    127114          project.polyAll,
    128           {'boundary_tags': {'top': [0], 'topleft': [1],
    129                              'topleft1': [2], 'bottomleft': [3],
    130                              'bottom': [4], 'bottomright': [5],
    131                              'topright':[6]},
     115          {'boundary_tags': {'bottom': [0], 'right': [1],
     116                             'top': [2], 'left': [3]},
    132117           'maximum_triangle_area': 100000,
    133118           'filename': meshname,           
     
    177162print 'start ferret2sww'
    178163from anuga.pyvolution.data_manager import ferret2sww
    179 
     164'''
    180165south = project.south
    181166north = project.north
     
    209194       dependencies = source_dir + project.boundary_basename + '.sww')
    210195
    211 
     196'''
    212197print 'Available boundary tags', domain.get_boundary_tags()
    213198
    214 Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
     199#Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
    215200                    domain, verbose = True)
    216201Br = Reflective_boundary(domain)
     
    222207                   f=lambda t: [(60<t<480)*6, 0, 0])
    223208
    224 domain.set_boundary( {'top': Bf, 'topleft': Bf,
    225                       'topleft1': Bf, 'bottomleft': Bd,
    226                       'bottom': Br, 'bottomright': Br, 'topright': Bd} )
     209# for MOST BC
     210#domain.set_boundary( {'top': Bd, 'left': Bd,
     211#                      'bottom': Bf, 'right': Bf} )
     212
     213# for testing
     214domain.set_boundary( {'top': Bd, 'left': Bd,
     215                      'bottom': Bd, 'right': Bw} )
    227216
    228217#-------------------------------------------------------------------------------                                 
     
    234223for t in domain.evolve(yieldstep = 240, finaltime = 7200):
    235224    domain.write_time()
    236     domain.write_boundary_statistics(tags = 'top')     
     225    domain.write_boundary_statistics(tags = 'bottom')     
    237226
    238227for t in domain.evolve(yieldstep = 120, finaltime = 12600
    239228                       ,skip_initial_step = True):
    240229    domain.write_time()
    241     domain.write_boundary_statistics(tags = 'top')     
    242 
    243 for t in domain.evolve(yieldstep = 60, finaltime = 19800
    244                        ,skip_initial_step = True):
    245     domain.write_time()
    246     domain.write_boundary_statistics(tags = 'top')     
    247    
    248 for t in domain.evolve(yieldstep = 120, finaltime = 25200
    249                        ,skip_initial_step = True):
    250     domain.write_time()
    251     domain.write_boundary_statistics(tags = 'top')     
    252 
    253 for t in domain.evolve(yieldstep = 240, finaltime = 36000
    254                        ,skip_initial_step = True):
    255     domain.write_time()
    256     domain.write_boundary_statistics(tags = 'top')
     230    domain.write_boundary_statistics(tags = 'bottom')     
    257231   
    258232print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset for help on using the changeset viewer.