Changeset 5381 for anuga_work/production


Ignore:
Timestamp:
May 30, 2008, 10:52:58 AM (16 years ago)
Author:
kristy
Message:

update scripts

Location:
anuga_work/production
Files:
8 edited

Legend:

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

    r5149 r5381  
    7272print "creates DEMs from ascii data"
    7373convert_dem_from_ascii2netcdf(onshore_in_dir_name, basename_out=onshore_dir_name, use_cache=True, verbose=True)
    74 #convert_dem_from_ascii2netcdf(island_in_dir_name, basename_out=island_dir_name, use_cache=True, verbose=True)
    7574
    7675#creates pts file for onshore DEM
     
    111110#G_all=Geospatial_data(file_name = project.combined_dir_name + '.txt')
    112111print'split'
    113 G_all_1, = G.split(.10)
     112G_all_1 = G.split(.10)
    114113print'export 1'
    115114G_all_1.export_points_file(project.combined_dir_name+'_small' + '.txt')
  • anuga_work/production/busselton/project.py

    r5160 r5381  
    7272# AHO + DPI data
    7373coast_name = 'coastline_excluding_beach_survey'
    74 coast_name1 = 'beach_survey_final'
    75 offshore_name = 'busselton'
     74coast_name1 = 'bussleton_beach_data'
     75offshore_name = 'Busselton_bathymetry'
    7676
    7777#final topo name
     
    8484topographies_dir = home+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep
    8585
    86 #input topo file location
    87 onshore_in_dir_name = topographies_in_dir + onshore_name
    88 #island_in_dir_name = topographies_in_dir + island_name
     86# input topo file location
     87onshore_in_dir_name = topographies_in_dir + onshore_name #topo
    8988
    90 coast_in_dir_name = topographies_in_dir + coast_name
    91 coast_in_dir_name1 = topographies_in_dir + coast_name1
    92 offshore_in_dir_name = topographies_in_dir + offshore_name
     89coast_in_dir_name = topographies_in_dir + coast_name #coastline
     90coast_in_dir_name1 = topographies_in_dir + coast_name1 #beach survey
     91offshore_in_dir_name = topographies_in_dir + offshore_name #bathymetry
    9392
     93#output to anuga from build file
    9494onshore_dir_name = topographies_dir + onshore_name
    95 #island_dir_name = topographies_dir + island_name
     95
    9696coast_dir_name = topographies_dir + coast_name
    9797coast_dir_name1 = topographies_dir + coast_name1
     
    177177res_busselton1 = 10000*res_factor
    178178
    179 poly_busselton2 = read_polygon(polygons_dir+'neg5_pos5_poly_.csv')
     179poly_busselton2 = read_polygon(polygons_dir+'neg5_pos5_poly.csv')
    180180res_busselton2 = 500*res_factor
    181181
     
    183183
    184184interior_regions = [[poly_busselton1,res_busselton1],[poly_busselton2,res_busselton2]]
     185print 'Hello',interior_regions
    185186
    186 boundary_tags={'back': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15],
    187                'side': [10, 14], 'ocean': [11, 12, 13]}
     187boundary_tags={'back': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14],
     188               'side': [10], 'ocean': [11, 12, 13]}
    188189
    189190trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
    190191
    191 poly_mainland=read_polygon(polygons_dir+'initial_condition_south.csv')
     192poly_mainland=read_polygon(topographies_in_dir+'initial_condition_south.csv')
    192193
    193194print 'min number triangles', trigs_min
  • anuga_work/production/busselton/run_busselton.py

    r5157 r5381  
    8787   
    8888        print 'start create mesh from regions'
    89 
     89       
    9090        create_mesh_from_regions(project.poly_all,
    9191                             boundary_tags=project.boundary_tags,
     
    9494                             filename=project.meshes_dir_name+'.msh',
    9595                             use_cache=False,
    96                              verbose=True)
     96                             verbose=False)
    9797    barrier()
    9898   
     
    175175    Bo = Dirichlet_boundary([kwargs['tide']+10.0,0,0])
    176176
    177     if project.source != 'other':
     177    if project.source != 'test':
     178        print 'start reading boundary file'
     179       
    178180        Bf = Field_boundary(kwargs['boundary_file'],
    179181                    domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'],
     
    189191                             'ocean': Bd})
    190192
    191 #    kwargs['input_start_time']=domain.starttime
     193    kwargs['input_start_time']=domain.starttime
    192194
    193195    print'finish set boundary'
     
    198200    t0 = time.time()
    199201
    200     for t in domain.evolve(yieldstep = 240, finaltime = kwargs['finaltime']):
     202    for t in domain.evolve(yieldstep = 240, finaltime = kwargs['starttime']):
    201203        domain.write_time()
    202204        domain.write_boundary_statistics(tags = 'ocean')     
     
    298300        export_model(**kwargs)
    299301    barrier
     302   
  • anuga_work/production/carnarvon/project.py

    r5005 r5381  
    3131#Making assumptions about the location of scenario data
    3232state = 'western_australia'
    33 scenario_name = 'busselton'
    34 scenario = 'busselton_tsunami_scenario_2006'
     33scenario_name = 'carnarvon'
     34scenario = 'carnarvon_tsunami_scenario'
    3535
    3636#Maybe will try to make project a class to allow these parameters to be passed in.
     
    7373
    7474#final topo name
    75 combined_name ='busselton_combined_elevation.pts'
    76 combined_smaller_name = 'busselton_combined_elevation_smaller'
     75combined_name ='carnarvon_combined_elevation.pts'
     76combined_smaller_name = 'carnarvon_combined_elevation_smaller'
    7777
    7878anuga_dir = home+state+sep+scenario+sep+'anuga'+sep
     
    137137gauges_dir_name = gauges_dir + gauge_name
    138138
    139 buildings_filename = gauges_dir + 'Busselton_res_Project.csv'
    140 buildings_filename_out = 'Busselton_res_Project_modified.csv'
     139buildings_filename = gauges_dir + 'carnarvon_res_Project.csv'
     140buildings_filename_out = 'carnarvon_res_Project_modified.csv'
    141141
    142142community_filename = gauges_dir +''
     
    169169
    170170#digitized polygons
    171 poly_busselton1 = read_polygon(polygons_dir+'neg20_pos10_polygon.csv')
    172 res_busselton1 = 10000*res_factor
    173 poly_busselton2 = read_polygon(polygons_dir+'neg5_pos5_poly_.csv')
    174 res_busselton2 = 500*res_factor
     171poly_carnarvon1 = read_polygon(polygons_dir+'neg20_pos10_polygon.csv')
     172res_carnarvon1 = 10000*res_factor
     173poly_carnarvon2 = read_polygon(polygons_dir+'neg5_pos5_poly_.csv')
     174res_carnarvon2 = 500*res_factor
    175175
    176176#plot_polygons([polyAll,poly_broome1,poly_broome2,poly_broome3],figname='boundingpoly2',verbose=False)
    177177
    178 interior_regions = [[poly_busselton1,res_busselton1],[poly_busselton2,res_busselton2]]
     178interior_regions = [[poly_carnarvon1,res_carnarvon1],[poly_carnarvon2,res_carnarvon2]]
    179179
    180180boundary_tags={'back': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14],
  • anuga_work/production/geraldton/project.py

    r5150 r5381  
    104104tide_dir = anuga_dir+'tide_data'+sep
    105105
    106 if source =='dampier':
    107     boundaries_name = 'broome_3854_17042007' #Dampier gun
    108     boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
    109 
    110 if source=='onslow':
    111     boundaries_name = 'broome_3859_16052007' #onslow_hedland_broome gun
    112     boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
    113    
    114 if source=='exmouth':
    115     boundaries_name = 'broome_3103_18052007' #exmouth gun
    116     boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
    117 
    118 if source=='other':
    119     boundaries_name = 'other' #exmouth gun
    120     boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
    121 
    122 
    123 #boundaries locations
    124 boundaries_in_dir_name = boundaries_in_dir + boundaries_name
     106##if source =='dampier':
     107##    boundaries_name = 'broome_3854_17042007' #Dampier gun
     108##    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'dampier'+sep+'1_10000'+sep
     109##
     110##if source=='onslow':
     111##    boundaries_name = 'broome_3859_16052007' #onslow_hedland_broome gun
     112##    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'onslow_hedland_broome'+sep+'1_10000'+sep
     113##   
     114##if source=='exmouth':
     115##    boundaries_name = 'broome_3103_18052007' #exmouth gun
     116##    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
     117##
     118##if source=='other':
     119##    boundaries_name = 'other' #exmouth gun
     120##    boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep
     121##
     122##
     123###boundaries locations
     124##boundaries_in_dir_name = boundaries_in_dir + boundaries_name
     125boundaries_in_dir_name = anuga_dir + sep + 'boundaries' + sep + scenario_name + '49'
    125126boundaries_dir = anuga_dir+'boundaries'+sep
    126127boundaries_dir_name = boundaries_dir + scenario_name
     
    168169#digitized polygons
    169170# bounding polygon for study area
    170 poly_all = read_polygon(polygons_dir+'extent_new_points.csv')
     171poly_all = read_polygon(polygons_dir+'poly_all_z50.csv')
    171172res_poly_all = 100000*res_factor
    172173
     
    177178res_neg10_pos10 = 2000*res_factor
    178179
    179 poly_cbd = read_polygon(polygons_dir+'cbd_points.csv')
     180poly_cbd = read_polygon(polygons_dir+'cbd_500m.csv')
    180181res_cbd = 500*res_factor
    181182
  • anuga_work/production/onslow_2006/export_results.py

    r4887 r5381  
    1919#time_dir = '20070904_235118_run_final_1.5_jsexton_exmouth_original' # revised model original data
    2020#time_dir = '20070905_052311_run_final_1.5_jsexton_exmouth_revised' # revised model original + survey data
    21 time_dir = '20070906_061418_run_final_1.5_jsexton_exmouth_original' # refined again
     21#time_dir = '20070906_061418_run_final_1.5_jsexton_exmouth_original' # refined again
    2222#time_dir = '20070907_055936_run_final_1.5_jsexton_exmouth_revised' # refined again
    23 cellsize = 50
     23time_dir = '20080526_043334_run_final_1.5_kvanputt_exmouth_revised' # New
     24cellsize = 25
    2425#cellsize = 150
    2526timestep = None
     
    4344print 'output dir:', name
    4445
    45 #var = [2,3,4] # depth and speed
     46var = [2,3,4] # depth and speed
    4647#var = [2] # depth
    4748#var = [4]
    48 var = [0]
     49#var = [0]
    4950
    5051for which_var in var:
  • anuga_work/production/onslow_2006/run_onslow_grad.py

    r4698 r5381  
    106106                                 interior_regions=project_grad.interior_regions,
    107107                                 filename=project_grad.mesh_name+'.msh',
    108                                  use_cache=False,
     108                                 use_cache=True,
    109109                                 verbose=True)
    110110
     
    117117    #above don't work
    118118    domain = Domain(project_grad.mesh_name+'.msh',
    119                     use_cache=False, verbose=True)
     119                    use_cache=True, verbose=True)
    120120     
    121121    print domain.statistics()
     
    150150                            use_cache = True,
    151151                            verbose = True,
    152                             alpha = alpha)
     152                            alpha = project_grad.alpha)
    153153       
    154154
     
    173173    print 'domain id', id(domain)
    174174    domain.beta_h = 0
    175     #domain.tight_slope_limiters = 1
     175    domain.tight_slope_limiters = 0
    176176   
    177177
     
    187187                        time_thinning=time_thinning,
    188188                        mean_stage=tide,
    189                         use_cache=False,
     189                        use_cache=True,
    190190                        verbose=True)
    191191                   
  • anuga_work/production/perth/project.py

    r5360 r5381  
    155155gauges_dir_name = gauges_dir + gauge_name
    156156
    157 buildings_filename = gauges_dir + 'Perth_res_Project.csv'
     157buildings_filename = gauges_dir + 'Perth_resA.csv'
    158158buildings_filename_out = 'Perth_res_Project_modified.csv'
    159159
Note: See TracChangeset for help on using the changeset viewer.