Changeset 4546


Ignore:
Timestamp:
Jun 19, 2007, 10:56:41 AM (17 years ago)
Author:
nick
Message:

update scripts

Location:
anuga_work/production
Files:
5 edited

Legend:

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

    r4544 r4546  
    3232
    3333#tide = -5.3
    34 tide = 0
    35 #tide = 4.9
     34#tide = 0
     35tide = 4.9
    3636
    3737#Maybe will try to make project a class to allow these parameters to be passed in.
     
    4141finaltime=25000
    4242setup='final'
    43 source='dampier'
     43source='onslow'
    4444
    4545if setup =='trial':
  • anuga_work/production/broome_2006/run_broome_urs.py

    r4544 r4546  
    3838from anuga.caching import myhash
    3939from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage
     40from anuga.fit_interpolate.benchmark_least_squares import mem_usage
    4041
    4142# Application specific imports
     
    4445def run_model(**kwargs):
    4546   
    46 #    tide = kwargs['tide']
    47 #    alpha = kwargs['alpha']
    48 #    friction = kwargs['friction']
    49 #    time_thinning = kwargs['time_thinning']
    50 #    scenario_name = kwargs['aa_scenario_name']
    51    
    52    
    53    
     47
    5448    #------------------------------------------------------------------------------
    5549    # Copy scripts to time stamped output directory and capture screen
     
    7165#    kwargs['bathy_file']=project_urs.combined_small_dir_name + '.pts'
    7266    kwargs['boundary_file']=project_urs.boundaries_in_dir_name + '.sww'
    73     start_screen_catcher(kwargs['output_dir'], myid, numprocs)
    7467   
    7568    print 'output_dir',kwargs['output_dir']
     
    8275    barrier()
    8376
    84     #start_screen_catcher(kwargs['output_dir'], myid, numprocs)
     77    start_screen_catcher(kwargs['output_dir'], myid, numprocs)
    8578
    8679    print "Processor Name:",get_processor_name()
     
    125118    #above don't work
    126119    domain = Domain(project_urs.meshes_dir_name+'.msh', use_cache=False, verbose=True)
     120    print 'memory usage before del domain',mem_usage()
    127121       
    128122    print domain.statistics()
     
    234228    if myid == 0:
    235229        store_parameters(**kwargs)
    236     barrier()
    237    
    238     swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']
    239     export_grid(swwfile, extra_name_out = 'town',
     230       
     231        print 'memory usage before del domain',mem_usage()
     232        del domain
     233        print 'memory usage after del domain',mem_usage()
     234   
     235        swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']
     236        export_grid(swwfile, extra_name_out = 'town',
    240237                quantities = ['elevation','stage','speed'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
    241238                timestep = None,
     
    252249                format = 'asc')
    253250   
    254     buildings_filename = project_urs.buildings_filename
    255     buildings_filename_out = project_urs.buildings_filename_out
     251        buildings_filename = project_urs.buildings_filename
     252        buildings_filename_out = project_urs.buildings_filename_out
    256253               
    257     inundation_damage(swwfile+'.sww', buildings_filename, buildings_filename_out)
    258     print '\n Augmented building file written to %s \n' %buildings_filename_out
    259    
     254        inundation_damage(swwfile+'.sww', buildings_filename, buildings_filename_out)
     255        print '\n Augmented building file written to %s \n' %buildings_filename_out
     256    barrier()
    260257   
    261258#-------------------------------------------------------------
  • anuga_work/production/dampier_2006/project_urs.py

    r4544 r4546  
    2525
    2626#tide = -2.5
    27 tide = 0.0
    28 #tide = 2.4
     27#tide = 0.0
     28tide = 2.4
    2929
    3030#Maybe will try to make project a class to allow these parameters to be passed in.
  • anuga_work/production/exmouth_2006/project.py

    r4544 r4546  
    3030
    3131#tide = -1.4
    32 tide = 0
    33 #tide = 1.4
     32#tide = 0
     33tide = 1.4
    3434
    3535#Maybe will try to make project a class to allow these parameters to be passed in.
     
    3939finaltime=25000
    4040setup='final'
    41 extra='dampier'
     41source='onslow'
     42#source='dampier'
     43#source='exmouth'
    4244
    4345if setup =='trial':
     
    6365
    6466
    65 dir_comment='_'+setup+'_'+str(tide)+'_'+str(extra)+'_'+str(user)
     67dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+str(user)
    6668
    6769onshore_name = 'DLI'
     
    111113tide_dir = anuga_dir+'tide_data'+sep
    112114
     115if source =='dampier':
     116    boundaries_name = 'exmouth_3854_17042007' #Dampier gun
     117    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
     118
     119if source=='onslow':
     120    boundaries_name = 'exmouth_3103_18052007' #onslow_hedland_broome gun
     121    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
     122   
     123if source=='exmouth':
     124    boundaries_name = 'exmouth_3859_16052007' #exmouth gun
     125    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
     126
    113127#boundaries locations
    114 boundaries_name = 'exmouth_3854_17042007' #dampier
    115 #boundaries_name = 'exmouth_3103_18052007' #exmouth
    116 #boundaries_name = 'exmouth_3859_16052007' #onslow
    117 
    118 boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
    119 #boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
    120 #boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
     128boundaries_source = ''
     129#boundaries_in_dir = anuga_dir+'boundaries'+sep
    121130boundaries_in_dir_name = boundaries_in_dir + boundaries_name
    122 boundaries_dir = anuga_dir+'boundaries'+sep
    123 boundaries_dir_name = boundaries_dir + boundaries_name
    124131
    125132#output locations
     
    161168res_coast = 10000*res_factor
    162169
    163 poly_coast1 = read_polygon(polygons_dir+'pts_coast1.csv')
     170#poly_coast1 = read_polygon(polygons_dir+'pts_coast1.csv')
    164171#res_0 = 20000*res_factor
    165172
     
    197204res_airport = 5000*res_factor
    198205
    199 interior_regions = [[poly_coast,res_coast],[poly_coast1,res_coast],[poly_coast2,res_coast]
     206interior_regions = [[poly_coast,res_coast],[poly_coast2,res_coast]
    200207                   ,[poly_coast3,res_coast],[poly_middle,res_middle],[poly_exmouth,res_exmouth]
    201208                   ,[poly_exmouth_south,res_exmouth],[poly_carpark1,res_exmouth],[poly_carpark2,res_exmouth]
  • anuga_work/production/exmouth_2006/run_exmouth.py

    r4542 r4546  
    3838from anuga.caching import myhash
    3939from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage
     40from anuga.fit_interpolate.benchmark_least_squares import mem_usage
    4041
    4142# Application specific imports
     
    4445def run_model(**kwargs):
    4546   
    46     scenario_name = kwargs['aa_scenario_name']
     47    #scenario_name = kwargs['aa_scenario_name']
    4748   
    4849    #------------------------------------------------------------------------------
     
    107108                             use_cache=False,
    108109                             verbose=True)
     110        copy(project.meshes_dir_name+'.msh',project.output_dir+project.scenario_name+'.msh')
    109111    barrier()
    110112
     
    226228    if myid == 0:
    227229        store_parameters(**kwargs)
    228 
    229     swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']
    230     export_grid(swwfile, extra_name_out = 'town',
     230       
     231        print 'memory usage before del domain',mem_usage()
     232        del domain
     233        print 'memory usage after del domain',mem_usage()
     234       
     235        swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']
     236        export_grid(swwfile, extra_name_out = 'town',
    231237#                quantities = ['depth'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
    232238                quantities = ['elevation','depth','stage','speed'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
     
    244250                format = 'asc')
    245251   
    246     buildings_filename = project.buildings_filename
    247     buildings_filename_out = project.buildings_filename_out
     252        buildings_filename = project.buildings_filename
     253        buildings_filename_out = project.buildings_filename_out
    248254               
    249     inundation_damage(swwfile+'.sww', buildings_filename, buildings_filename_out)
    250     print '\n Augmented building file written to %s \n' %buildings_filename_out
     255        inundation_damage(swwfile+'.sww', buildings_filename, buildings_filename_out)
     256        print '\n Augmented building file written to %s \n' %buildings_filename_out
    251257   
    252258    barrier()
Note: See TracChangeset for help on using the changeset viewer.