Ignore:
Timestamp:
May 15, 2007, 4:13:58 PM (17 years ago)
Author:
nick
Message:

update broome

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/broome_2006/run_broome.py

    r4372 r4429  
    8181                         interior_regions=project.interior_regions,
    8282                         filename=meshes_dir_name,
    83                          use_cache=True,
     83                         use_cache=False,
    8484                         verbose=True)
    8585
     
    9292print 'Setup computational domain'
    9393#domain = Domain(meshes_time_dir_name, use_cache=True, verbose=True)
    94 domain = Domain(meshes_dir_name, use_cache=True, verbose=True)
     94domain = Domain(meshes_dir_name, use_cache=False, verbose=True)
    9595print domain.statistics()
    96 '''
    97 print 'starting to create boundary conditions'
    98 boundaries_in_dir_name = project.boundaries_in_dir_name
    99 
    100 from anuga.shallow_water.data_manager import urs2sww, ferret2sww
    101 
    102 # put above distribute
    103 print 'boundary file is: ',boundaries_dir_name
    104 from caching import cache
    105 if myid == 0:
    106     cache(ferret2sww,
    107           (boundaries_in_dir_name,
    108     #       boundaries_time_dir_name),
    109            boundaries_dir_name),
    110           {'verbose': True,
    111            'minlat': project.south_boundary,
    112            'maxlat': project.north_boundary,
    113            'minlon': project.west_boundary,
    114            'maxlon': project.east_boundary,
    115 #           'minlat': project.south,
    116 #           'maxlat': project.north,
    117 #           'minlon': project.west,
    118 #           'maxlon': project.east,
    119            'mint': 0, 'maxt': 35100,
    120            'origin': domain.geo_reference.get_origin(),
    121            'mean_stage': project.tide,
    122 #           'zscale': 1,                 #Enhance tsunami
    123            'fail_on_NaN': False},
    124            verbose = True,
    125            )
    126 barrier()
    127 '''
    12896
    12997#-------------------------------------------------------------------------
     
    134102    print 'Setup initial conditions'
    135103
    136     domain.set_quantity('stage', tide)
    137     domain.set_quantity('friction', 0.01)
     104    from polygon import Polygon_function
     105    #following sets the stage/water to be offcoast only
     106    IC = Polygon_function( [(project.poly_mainland, -1.0)], default = tide,
     107                             geo_reference = domain.geo_reference)
     108    domain.set_quantity('stage', IC)
    138109    #combined_time_dir_name = project.topographies_dir+build_time+project.combined_name
    139110    print 'Start Set quantity'
    140111    print 'project.combined_dir_name_unclipped1',project.combined_dir_name_unclipped1+'.txt'
    141112    domain.set_quantity('elevation',
     113#                    filename = project.combined_dir_name+'.txt',
    142114                    filename = project.combined_dir_name_unclipped1+'.txt',
    143115#                    filename = project.combined_smaller_name_dir+'.xya',
     
    175147print 'domain id', id(domain)
    176148#Bf = File_boundary(boundaries_dir_name + '.sww',
    177 #                  domain, time_thinning=5, use_cache=True, verbose=True)
     149#                  domain, time_thinning=12, use_cache=True, verbose=True)
     150Bf = Field_boundary(boundaries_dir_name + '.sww',
     151                  domain, time_thinning=1, mean_stage=tide,
     152                  use_cache=True, verbose=True)
    178153
    179154print 'finished reading boundary file'
     
    185160domain.set_boundary({'back': Br,
    186161                     'side': Bd,
    187                      'ocean': Bd})
     162                     'ocean': Bf})
     163#                     'ocean': Bd})
    188164print'finish set boundary'
    189165
     
    194170t0 = time.time()
    195171
    196 for t in domain.evolve(yieldstep = 60, finaltime = 10000):
     172for t in domain.evolve(yieldstep = 60, finaltime = 30000):
    197173    domain.write_time()
    198174    domain.write_boundary_statistics(tags = 'ocean')
    199     if allclose(t, 120):
    200         domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bo})
     175#    if allclose(t, 120):
     176#        domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bo})
    201177
    202     if allclose(t, 1020):
    203         domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd})
     178#    if allclose(t, 1020):
     179#        domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd})
    204180
    205181   
Note: See TracChangeset for help on using the changeset viewer.