Changeset 5408 for anuga_work


Ignore:
Timestamp:
Jun 17, 2008, 9:03:30 AM (16 years ago)
Author:
kristy
Message:
 
Location:
anuga_work/production
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/busselton/project.py

    r5387 r5408  
    3737alpha = 0.1
    3838friction=0.01
    39 starttime=10000
     39starttime=0
    4040midtime=21600
    4141#finaltime=25000
    42 finaltime=10000
    43 export_cellsize=50
     42finaltime=86000
     43export_cellsize=25
    4444setup='final'
    4545source='exmouth'
  • anuga_work/production/busselton/run_busselton.py

    r5381 r5408  
    123123        from polygon import Polygon_function
    124124        #following sets the stage/water to be offcoast only
    125         IC = Polygon_function( [(project.poly_mainland, -1.0)], default = kwargs['tide'],
     125        IC = Polygon_function( [(project.poly_mainland, 0)], default = kwargs['tide'],
    126126                                 geo_reference = domain.geo_reference)
    127127        domain.set_quantity('stage', IC)
     
    173173    Br = Reflective_boundary(domain)
    174174    Bd = Dirichlet_boundary([kwargs['tide'],0,0])
    175     Bo = Dirichlet_boundary([kwargs['tide']+10.0,0,0])
    176 
    177     if project.source != 'test':
    178         print 'start reading boundary file'
    179        
    180         Bf = Field_boundary(kwargs['boundary_file'],
     175   
     176
     177    Bf = Field_boundary(kwargs['boundary_file'],
    181178                    domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'],
    182179                    use_cache=True, verbose=True)
    183         print 'finished reading boundary file'
    184         domain.set_boundary({'back': Br,
     180    print 'finished reading boundary file'
     181    domain.set_boundary({'back': Bd,
    185182                             'side': Bd,
    186183                             'ocean': Bf})
    187     else:
    188         print 'set ocean'               
    189         domain.set_boundary({'back': Br,
    190                              'side': Bd,
    191                              'ocean': Bd})
    192184
    193185    kwargs['input_start_time']=domain.starttime
     
    200192    t0 = time.time()
    201193
    202     for t in domain.evolve(yieldstep = 240, finaltime = kwargs['starttime']):
     194    for t in domain.evolve(yieldstep = 240, finaltime = kwargs['finaltime']):
    203195        domain.write_time()
    204196        domain.write_boundary_statistics(tags = 'ocean')     
    205 
    206         if allclose(t, 240):
    207             domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bo})
    208 
    209         if allclose(t, 1440):
    210             domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd})
    211 
    212 #    for t in domain.evolve(yieldstep = kwargs['yieldstep'], finaltime = kwargs['midtime']
    213 #                       ,skip_initial_step = True):
    214 #        domain.write_time()
    215 #        domain.write_boundary_statistics(tags = 'ocean')     
    216 #   
    217 #    for t in domain.evolve(yieldstep = 240, finaltime = kwargs['finaltime']
    218 #                       ,skip_initial_step = True):
    219 #        domain.write_time()
    220 #        domain.write_boundary_statistics(tags = 'ocean')   
    221197
    222198    x, y = domain.get_maximum_inundation_location()
     
    235211   
    236212    print 'memory usage before del domain1',mem_usage()
    237    
    238 def export_model(**kwargs):   
    239     #store_parameters(**kwargs)
    240    
    241 #    print 'memory usage before del domain',mem_usage()
    242     #del domain
    243     print 'memory usage after del domain',mem_usage()
    244    
    245     swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']
    246     print'swwfile',swwfile
    247    
    248     export_grid(swwfile, extra_name_out = 'town',
    249             quantities = ['speed','depth','elevation','stage'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
    250             #quantities = ['speed','depth'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
    251             timestep = None,
    252             reduction = max,
    253             cellsize = kwargs['export_cellsize'],
    254             NODATA_value = -9999,
    255             easting_min = project.eastingmin,
    256             easting_max = project.eastingmax,
    257             northing_min = project.northingmin,
    258             northing_max = project.northingmax,
    259             verbose = False,
    260             origin = None,
    261             datum = 'GDA94',
    262             format = 'asc')
    263            
    264     inundation_damage(swwfile+'.sww', project.buildings_filename,
    265                       project.buildings_filename_out)
    266    
    267 #-------------------------------------------------------------
     213
     214 #-------------------------------------------------------------
    268215if __name__ == "__main__":
    269216   
  • anuga_work/production/exmouth_2006/export_results.py

    r4856 r5408  
    1010#time_dir = '20070619_042140_run_final_0_onslow_nbartzis' # MSL 1 in Onslow 10000 yr
    1111#time_dir = '20070619_042542_run_final_1.4_exmouth_nbartzis' # HAT 1 in Exmouth 10000 yr
    12 time_dir = '20070619_042417_run_final_0_exmouth_nbartzis' # MSL 1 in Exmouth 10000 yr
     12#time_dir = '20070619_042417_run_final_0_exmouth_nbartzis' # MSL 1 in Exmouth 10000 yr
     13#time_dir = '20080610_041607_run_final_1.4_exmouth_kvanputt' # HAT 1 in Exmouth 10000 yr
     14time_dir = '20080613_055032_run_final_1.4_exmouth_kvanputt' # HAT 1 in Exmouth 10000 yr slope 1
     15
    1316cellsize = 25
    1417timestep = None
     
    1720name = directory+time_dir+sep+project.scenario_name
    1821
    19 is_parallel = True
     22is_parallel = False
    2023if is_parallel == True: nodes = 4
    2124print 'output dir:', name
    2225
    23 var = [2,3] # depth and speed
     26var = [2,3, 4] # depth and speed
    2427
    2528for which_var in var:
     
    3336
    3437    if which_var == 2:  # Depth
    35         outname = name + '_depth_north'
     38        outname = name + '_depth'
    3639        quantityname = 'stage-elevation' 
    3740
    3841    if which_var == 3:  # Speed
    39         outname = name + '_speed_north'
     42        outname = name + '_speed'
    4043        quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
    4144
     
    6770                    timestep = timestep,
    6871                    cellsize = cellsize,     
    69                     easting_min = project.e_min_area,
    70                     easting_max = project.e_max_area,
    71                     northing_min = project.n_min_area,
    72                     northing_max = project.n_max_area,       
     72                    easting_min = project.eastingmin,
     73                    easting_max = project.eastingmax,
     74                    northing_min = project.northingmin,
     75                    northing_max = project.northingmax,       
    7376                    reduction = max,
    7477                    verbose = True,
  • anuga_work/production/exmouth_2006/project.py

    r4856 r5408  
    133133output_dir = anuga_dir+'outputs'+sep
    134134output_build_time_dir = output_dir+build_time+sep
    135 #output_run_time_dir = output_dir +run_time+dir_comment+sep
    136 output_run_time_dir = output_dir +'20070619_042140_run_final_0_onslow_nbartzis'+sep
     135output_run_time_dir = output_dir +run_time+dir_comment+sep
     136#output_run_time_dir = output_dir +'20070619_042140_run_final_0_onslow_nbartzis'+sep
    137137output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
    138138
  • anuga_work/production/exmouth_2006/run_exmouth.py

    r4631 r5408  
    6666#    kwargs['bathy_file']=project.combined_small_dir_name + '.txt'
    6767    kwargs['boundary_file']=project.boundaries_in_dir_name + '.sww'
    68     '''
     68 
    6969    print 'output_dir',kwargs['output_dir']
    7070    if myid == 0:
     
    108108                             use_cache=False,
    109109                             verbose=True)
    110         copy(project.meshes_dir_name+'.msh',project.output_dir+project.scenario_name+'.msh')
    111110    barrier()
    112111
     
    170169    domain.beta_h = 0 #sets the surface of the triangle to follow the bathy
    171170    #domain.H0=0.01 #controls the flux limiter (limiter2007)
    172     #domain.tight_slope_limiters = 1 #minimises creep
     171    domain.tight_slope_limiters = 0 #minimises creep
    173172
    174173    #-------------------------------------------------------------------------
     
    227226    kwargs['completed']=str(time.time()-t0)
    228227   
    229     '''
     228   
    230229    if myid == 0:
    231230        store_parameters(**kwargs)
  • anuga_work/production/perth/project.py

    r5387 r5408  
    3838friction=0.01
    3939starttime=10000
    40 midtime=21600
    41 finaltime=10000
     40finaltime=80000
    4241export_cellsize=50
    4342setup='final'
     
    213212###################################################################
    214213
    215 # exporting asc grid
    216 eastingmin = 379000
    217 eastingmax = 385000
    218 northingmin = 6450700
    219 northingmax = 6459800
    220 
    221 
    222 
     214
     215#Geordie Bay extract ascii grid
     216xminGeordie = 359500
     217xmaxGeordie = 360850
     218yminGeordie = 6459400
     219ymaxGeordie = 6460430
     220
     221#Sorrento extract ascii grid
     222xminSorrento = 379560
     223xmaxSorrento = 380920
     224yminSorrento = 6477750
     225ymaxSorrento = 6479030
     226
     227#Perth extract ascii grid
     228xminPerth = 379106
     229xmaxPerth = 383100
     230yminPerth = 6450500
     231ymaxPerth = 6461150
     232
     233#Rockingham extract ascii grid
     234xminRockingham = 375500
     235xmaxRockingham = 383100
     236yminRockingham = 6427900
     237ymaxRockingham = 6430100
     238
  • anuga_work/production/perth/run_perth.py

    r5386 r5408  
    225225    kwargs['starttime']=project.starttime
    226226    kwargs['yieldstep']=project.yieldstep
    227     kwargs['midtime']=project.midtime
    228227    kwargs['finaltime']=project.finaltime
    229228   
Note: See TracChangeset for help on using the changeset viewer.