Changeset 4542


Ignore:
Timestamp:
Jun 13, 2007, 4:36:08 PM (17 years ago)
Author:
nick
Message:

update model scripts

Location:
anuga_work/production
Files:
3 added
8 edited

Legend:

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

    r4533 r4542  
    1818host = get_host_name()
    1919#needed when running using mpirun, mpirun doesn't inherit umask from .bashrc
    20 #umask(002)
     20umask(002)
    2121
    2222
     
    4141finaltime=25000
    4242setup='final'
    43 extra='onslow'
     43extra='exmouth'
    4444
    4545if setup =='trial':
     
    107107#boundaries locations
    108108#boundaries_name = 'broome_3854_17042007' #dampier
    109 #boundaries_name = 'broome_3103_18052007' #exmouth
    110 boundaries_name = 'broome_3859_16052007' #onslow
     109boundaries_name = 'broome_3103_18052007' #exmouth
     110#boundaries_name = 'broome_3859_16052007' #onslow
    111111
    112112#boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'1_10000'+sep
    113113#boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
    114 #boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
    115 boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
     114boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
     115#boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
    116116boundaries_in_dir_name = boundaries_in_dir + boundaries_name
    117117boundaries_dir = anuga_dir+'boundaries'+sep
     
    122122output_build_time_dir = output_dir+build_time+sep
    123123output_run_time_dir = output_dir +run_time+dir_comment+sep
    124 output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
     124output_run_time_dir = output_dir +'20070605_234438_run_final_0_exmouth_nbartzis'+sep
     125#output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
    125126
    126127#gauges
     
    177178
    178179# exporting asc grid
    179 e_min_area = 412000.0
    180 e_max_area = 423000.0
    181 n_min_area = 8007000.0
    182 n_max_area = 8022000.0
     180eastingmin = 412000.0
     181eastingmax = 423000.0
     182northingmin = 8007000.0
     183northingmax = 8022000.0
  • anuga_work/production/broome_2006/run_broome_urs.py

    r4533 r4542  
    3333
    3434from anuga.pmesh.mesh_interface import create_mesh_from_regions
    35 from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files,store_parameters
     35from anuga.shallow_water.data_manager import start_screen_catcher, copy_code_files,store_parameters
    3636from anuga_parallel.parallel_api import distribute, numprocs, myid, barrier
    3737from anuga_parallel.parallel_abstraction import get_processor_name
     
    7171#    kwargs['bathy_file']=project_urs.combined_small_dir_name + '.pts'
    7272    kwargs['boundary_file']=project_urs.boundaries_in_dir_name + '.sww'
    73 
     73    start_screen_catcher(kwargs['output_dir'], myid, numprocs)
     74   
    7475    print 'output_dir',kwargs['output_dir']
    7576    if myid == 0:
     
    8182    barrier()
    8283
    83     start_screen_catcher(kwargs['output_dir'], myid, numprocs)
     84    #start_screen_catcher(kwargs['output_dir'], myid, numprocs)
    8485
    8586    print "Processor Name:",get_processor_name()
     
    205206    #----------------------------------------------------------------------------
    206207    # Evolve system through time
    207     #----------------------------------------------------------------------------
    208 
     208    #--------------------------------------------------------------------
    209209    t0 = time.time()
    210210
     
    243243                cellsize = 25,
    244244                NODATA_value = -9999,
    245                 easting_min = project.eastingmin,
    246                 easting_max = project.eastingmax,
    247                 northing_min = project.northingmin,
    248                 northing_max = project.northingmax,
     245                easting_min = project_urs.eastingmin,
     246                easting_max = project_urs.eastingmax,
     247                northing_min = project_urs.northingmin,
     248                northing_max = project_urs.northingmax,
    249249                verbose = False,
    250250                origin = None,
     
    252252                format = 'asc')
    253253   
    254     buildings_filename = project.buildings_filename
    255     buildings_filename_out = project.buildings_filename_out
     254    buildings_filename = project_urs.buildings_filename
     255    buildings_filename_out = project_urs.buildings_filename_out
    256256               
    257257    inundation_damage(swwfile+'.sww', buildings_filename, buildings_filename_out)
    258258    print '\n Augmented building file written to %s \n' %buildings_filename_out
    259 
    260 
     259   
     260   
    261261#-------------------------------------------------------------
    262262if __name__ == "__main__":
     
    267267              time_thinning = project_urs.time_thinning,
    268268              dir_comment=project_urs.dir_comment)
    269 
    270 
  • anuga_work/production/exmouth_2006/project.py

    r4534 r4542  
    3838starttime=3600
    3939finaltime=25000
    40 setup='final'
    41 extra='onslow'
     40setup='store'
     41extra='dampier'
    4242
    4343if setup =='trial':
     
    112112
    113113#boundaries locations
    114 #boundaries_name = 'exmouth_3854_17042007' #dampier
     114boundaries_name = 'exmouth_3854_17042007' #dampier
    115115#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
     116#boundaries_name = 'exmouth_3859_16052007' #onslow
     117
     118boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
    119119#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
     120#boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
    121121boundaries_in_dir_name = boundaries_in_dir + boundaries_name
    122122boundaries_dir = anuga_dir+'boundaries'+sep
     
    127127output_build_time_dir = output_dir+build_time+sep
    128128output_run_time_dir = output_dir +run_time+dir_comment+sep
    129 #output_run_time_dir = output_dir +'20070530_063246_run_final_0_dampier_nbartzis'+sep
     129#output_run_time_dir = output_dir +'20070604_022250_run_final_0_onslow_nbartzis'+sep
    130130output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
    131131
  • anuga_work/production/exmouth_2006/run_exmouth.py

    r4533 r4542  
    226226    if myid == 0:
    227227        store_parameters(**kwargs)
    228     barrier()
    229 
    230228
    231229    swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']
    232230    export_grid(swwfile, extra_name_out = 'town',
    233                 quantities = ['elevation','stage','speed'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
     231#                quantities = ['depth'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
     232                quantities = ['elevation','depth','stage','speed'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
    234233                timestep = None,
    235234                reduction = max,
     
    240239                northing_min = project.northingmin,
    241240                northing_max = project.northingmax,
    242                 verbose = False,
     241                verbose = True,
    243242                origin = None,
    244243                datum = 'WGS84',
     
    250249    inundation_damage(swwfile+'.sww', buildings_filename, buildings_filename_out)
    251250    print '\n Augmented building file written to %s \n' %buildings_filename_out
    252 
    253 
     251   
     252    barrier()
     253   
    254254#-------------------------------------------------------------
    255255if __name__ == "__main__":
  • anuga_work/production/onslow_2006/project_urs.py

    r4533 r4542  
    3030
    3131#tide = -1.5
    32 tide = 0.0
    33 #tide = 1.5
     32#tide = 0.0
     33tide = 1.5
    3434
    3535#Maybe will try to make project a class to allow these parameters to be passed in.
     
    3939finaltime=25000
    4040setup='final'
    41 extra='exmouth'
     41source='dampier'
    4242
    4343if setup =='trial':
     
    6262    yieldstep=240   
    6363
    64 dir_comment='_'+setup+'_'+str(tide)+'_'+str(extra)+'_'+str(user)
     64dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+str(user)
    6565
    6666#Making assumptions about the location of scenario data
     
    119119tide_dir = anuga_dir+'tide_data'+sep
    120120
     121
     122if source =='dampier':
     123    boundaries_name = 'onslow_3854_17042007' #Dampier gun
     124    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
     125
     126if source=='onslow':
     127    boundaries_name = 'onslow_3859_16052007' #onslow_hedland_broome gun
     128    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
     129   
     130if source=='exmouth':
     131    boundaries_name = 'onslow_3103_18052007' #exmouth gun
     132    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
     133
     134#boundaries locations
    121135boundaries_source = ''
    122 #boundaries_name = 'onslow_3854_17042007' #Dampier gun
    123 #boundaries_name = 'onslow_3859_16052007' #onslow_hedland_broome gun
    124 boundaries_name = 'onslow_3103_18052007' #exmouth gun
    125 
    126 #boundaries locations
    127136#boundaries_in_dir = anuga_dir+'boundaries'+sep
    128 #boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'1_10000'+sep
    129 #boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
    130 #boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
    131 boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
    132137boundaries_in_dir_name = boundaries_in_dir + boundaries_name
    133138
     
    139144output_build_time_dir = output_dir+build_time+sep
    140145output_run_time_dir = output_dir +run_time+dir_comment+sep
    141 #output_run_time_dir = output_dir +'20070531_002753_run_final_0.0_onslow_nbartzis'+sep
     146#output_run_time_dir = output_dir +'20070608_062811_run_final_1.5_exmouth_nbartzis'+sep
    142147output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
    143148
  • anuga_work/production/onslow_2006/run_onslow_urs.py

    r4533 r4542  
    227227    if myid == 0:
    228228        store_parameters(**kwargs)
    229     barrier()
     229   
    230230   
    231231    swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']
    232232    print 'swwfile',swwfile
    233233    export_grid(swwfile, extra_name_out = 'town',
    234                 quantities = ['elevation','stage','speed'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
     234#                quantities = ['depth'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
     235                quantities = ['elevation','depth','stage','speed'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
    235236                timestep = None,
    236237                reduction = max,
     
    246247                format = 'asc')
    247248   
    248     swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']+'.sww'
    249249    buildings_filename = project_urs.buildings_filename
    250250    buildings_filename_out = project_urs.buildings_filename_out
     
    253253    print '\n Augmented building file written to %s \n' \
    254254           %buildings_filename_out
    255 
     255#    barrier()
    256256
    257257#-------------------------------------------------------------
  • anuga_work/production/pt_hedland_2006/project_urs.py

    r4533 r4542  
    1111from anuga.utilities.system_tools import get_user_name, get_host_name
    1212
    13 codename = 'project.py'
    1413
    1514home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent dir   
     
    3938finaltime=25000
    4039setup='final'
    41 extra='dampier'
     40source='onslow'
    4241
    4342if setup =='trial':
     
    5453    print'final'
    5554    res_factor=1
    56     time_thinning=4
     55    time_thinning=1
    5756    yieldstep=60
    58 
    59 dir_comment='_'+setup+'_'+str(tide)+'_'+str(extra)+'_'+str(user)
     57if setup =='store':
     58    print'store'
     59    res_factor=10
     60    time_thinning=48
     61    yieldstep=240   
     62
     63dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+str(user)
    6064
    6165# onshore data from 30m DTED level 2
     
    102106
    103107#boundaries locations
    104 boundaries_name = 'pt_hedland_3854_17042007' #dampier
    105 #boundaries_name = 'pt_hedland_3103_18052007' #exmouth
    106 #boundaries_name = 'pt_hedland_3859_16052007' #onslow
    107 
     108
     109if source =='dampier':
     110    boundaries_name = 'pt_hedland_3854_17042007' #Dampier gun
     111    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
     112
     113if source=='onslow':
     114    boundaries_name = 'pt_hedland_3859_16052007' #onslow_hedland_broome gun
     115    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
     116   
     117if source=='exmouth':
     118    boundaries_name = 'pt_hedland_3103_18052007' #exmouth gun
     119    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
     120   
    108121#boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'1_10000'+sep
    109 boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
    110 #boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
    111 #boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
    112122boundaries_in_dir_name = boundaries_in_dir + boundaries_name
    113123boundaries_dir = anuga_dir+'boundaries'+sep
     
    116126#output locations
    117127output_dir = anuga_dir+'outputs'+sep
    118 output_build_time_dir = output_dir+build_time+'_'+extra+sep
     128output_build_time_dir = output_dir+build_time+'_'+source+sep
    119129output_run_time_dir = output_dir +run_time+dir_comment+sep
    120130output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
     
    148158
    149159# region to export (used from export_results.py)
    150 e_min_area = 648000
    151 e_max_area = 675000
    152 n_min_area = 7745000
    153 n_max_area = 7761000
    154 
    155 export_region = [[e_min_area,n_min_area],[e_min_area,n_max_area],
    156                  [e_max_area,n_max_area],[e_max_area,n_min_area]]
     160eastingmin = 648000
     161eastingmax = 675000
     162northingmin = 7745000
     163northingmax = 7761000
     164
     165#export_region = [[e_min_area,n_min_area],[e_min_area,n_max_area],
     166#                 [e_max_area,n_max_area],[e_max_area,n_min_area]]
    157167                 
    158 refzone = 50
     168#refzone = 50
    159169
    160170from anuga.coordinate_transforms.redfearn import redfearn
  • anuga_work/production/pt_hedland_2006/run_pt_hedland_urs.py

    r4467 r4542  
    3030from anuga.shallow_water import Field_boundary
    3131from Numeric import allclose
     32from anuga.shallow_water.data_manager import export_grid
    3233
    3334from anuga.pmesh.mesh_interface import create_mesh_from_regions
    34 from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files,store_parameters
     35from anuga.shallow_water.data_manager import start_screen_catcher, copy_code_files,store_parameters
    3536from anuga_parallel.parallel_api import distribute, numprocs, myid, barrier
    3637from anuga_parallel.parallel_abstraction import get_processor_name
    3738from anuga.caching import myhash
     39from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage
    3840# Application specific imports
    3941import project_urs                 # Definition of file names and polygons
     
    6567    kwargs['bathy_file']=project_urs.combined_dir_name + '.txt'
    6668#    kwargs['bathy_file']=project_urs.combined_small_dir_name + '.pts'
    67     kwargs['boundary_file']=project_urs.boundaries_dir_name + '.sww'
     69    kwargs['boundary_file']=project_urs.boundaries_in_dir_name + '.sww'
    6870#    kwargs['Completed']=''
     71
     72    start_screen_catcher(kwargs['output_dir'], myid, numprocs)
    6973
    7074    print 'output_dir',kwargs['output_dir']
     
    7680
    7781    barrier()
    78 
    79     start_screen_catcher(kwargs['output_dir'], myid, numprocs)
    8082
    8183    print "Processor Name:",get_processor_name()
     
    224226    if myid == 0:
    225227        store_parameters(**kwargs)
    226     barrier()
    227 
     228
     229    swwfile = kwargs['output_dir']+kwargs['aa_scenario_name']
     230    export_grid(swwfile, extra_name_out = 'town',
     231                quantities = ['elevation','depth','stage','speed'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation
     232                timestep = None,
     233                reduction = max,
     234                cellsize = 25,
     235                NODATA_value = -9999,
     236                easting_min = project_urs.eastingmin,
     237                easting_max = project_urs.eastingmax,
     238                northing_min = project_urs.northingmin,
     239                northing_max = project_urs.northingmax,
     240                verbose = True,
     241                origin = None,
     242                datum = 'WGS84',
     243                format = 'asc')
     244   
     245    buildings_filename = project_urs.buildings_filename
     246    buildings_filename_out = project_urs.buildings_filename_out
     247               
     248    inundation_damage(swwfile+'.sww', buildings_filename, buildings_filename_out)
     249    print '\n Augmented building file written to %s \n' %buildings_filename_out
     250   
     251    barrier()
    228252#-------------------------------------------------------------
    229253if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.