Changeset 6201


Ignore:
Timestamp:
Jan 19, 2009, 12:01:17 PM (10 years ago)
Author:
kristy
Message:

Updating scripts

Location:
anuga_work/production/busselton
Files:
9 edited
1 moved

Legend:

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

    r6085 r6201  
    2828##time_dir2 = '20081209_160607_run_final_0_68693_250m_none_lfountai'
    2929
     30##time_dir1 = '20081002_111432_run_final_0_27283_250m_none_kvanputt'
     31##time_dir2 = '20081217_115336_run_final_0_27283_250m_none_dp_kvanputt'
    3032
    31 ##time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'
    32 time_dir2 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'
    33 ##time_dir3 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'
    34 ##time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'
    35 time_dir5 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'
    36 ##time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'
    3733
    38 time_dirs = [time_dir2, time_dir5]#, time_dir3, time_dir4, time_dir5, time_dir6]
     34time_dir1 = '20081211_154006_run_final_0.6_27255_alpha0.1_kvanputt'
     35####time_dir2 = '20081211_162311_run_final_0_27255_alpha0.1_kvanputt'
     36####time_dir3 = '20081211_162346_run_final_0_68693_alpha0.1_kvanputt'
     37##time_dir4 = '20081211_162433_run_final_0.6_68693_alpha0.1_kvanputt'
     38##time_dir5 = '20081211_162656_run_final_0.6_27283_alpha0.1_kvanputt'
     39##time_dir6 = '20081211_162744_run_final_0_27283_alpha0.1_kvanputt'
     40
     41time_dirs = [time_dir1] #, time_dir2] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
    3942 
    4043for time_dir in time_dirs:
     
    4346    folder = scenario_dir + output_dir + time_dir +'\\'
    4447    raster_gbd = folder + 'raster.gdb'
    45     land = scenario_dir + "map_work\\Busselton.gdb\\Internal_polygons\\initial_conditions_extend"
     48    land = scenario_dir + "map_work\\Busselton.gdb\\Internal_polygons\\initial_conditions_extend_Di"
    4649    ocean = scenario_dir + "map_work\\Busselton.gdb\\input_boundaries\\Ocean"
    4750
    4851   
    49 ##    print 'Process: Create File GDB'
    50 ##    gp.CreateFileGDB_management(folder, "raster")
     52    #print 'Process: Create File GDB'
     53    #gp.CreateFileGDB_management(folder, "raster")
    5154
    5255    gp.Workspace = raster_gbd
     
    5558   
    5659    #replication dictionary
    57     replicate = (('busselton', ''),('_', ''),('max','_M'),
     60    replicate = (('busselton', ''),('_', ''),('max','_M_5'),
    5861                 ('Busselton', 'Bus'),('Bunbury', 'Bun'),
    59                  ('depth','_dep_'),('speed', '_spe_'),
     62                 ('depth','_depth'),('speed', '_speed'),
    6063                 ('elevation', '_ele_'), ('stage','_stage'))
    6164
    6265    generate_filename = []
    63     input_ascii = glob.glob(folder + '*stage_max.asc')
     66    input_ascii = glob.glob(folder + '*Bunbury_depth_max.asc')
    6467
    6568    for infile in input_ascii:
     
    6770        for (key, rep) in replicate:
    6871            output_DEM = output_DEM.replace(key,rep)
    69         output_DEM = output_DEM[:10]
     72        output_DEM = output_DEM[:12]
    7073        if output_DEM in generate_filename:
    7174            print 'Output_DEM filename (%s) already in use' % output_DEM
     
    8285                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',117.0],PARAMETER['Scale_Factor',0.9996]"
    8386                                                   ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
    84 ##        output_extract = output_DEM + 'E'
    85 ##        print 'Output Extract ',output_extract
    86 ##        print 'Process: Extract by Mask'
    87 ##        gp.ExtractByMask_sa(output_DEM, ocean, output_extract)
     87        output_extract = output_DEM + '_E'
     88        print 'Output Extract ',output_extract
     89        print 'Process: Extract by Mask'
     90        gp.ExtractByMask_sa(output_DEM, land, output_extract)
    8891
    8992
  • anuga_work/production/busselton/Arc_txt2feature_class.py

    r6069 r6201  
    1919output_dir = "anuga\\outputs\\"
    2020
    21 time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'
    22 time_dir2 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'
    23 time_dir3 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'
    24 time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'
    25 time_dir5 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'
    26 time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'
     21time_dir1 = '20081211_154006_run_final_0.6_27255_alpha0.1_kvanputt'
     22##time_dir2 = '20081211_162311_run_final_0_27255_alpha0.1_kvanputt'
     23##time_dir3 = '20081211_162346_run_final_0_68693_alpha0.1_kvanputt'
     24##time_dir4 = '20081211_162433_run_final_0.6_68693_alpha0.1_kvanputt'
     25##time_dir5 = '20081211_162656_run_final_0.6_27283_alpha0.1_kvanputt'
     26##time_dir6 = '20081211_162744_run_final_0_27283_alpha0.1_kvanputt'
    2727
    28 
    29 time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
     28time_dirs = [time_dir1] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
    3029
    3130for time_dir in time_dirs:
     
    3837    layer = 'layer'
    3938    feature_class_name = input_name[:-4]
     39
     40##    print 'Process: Create File GDB'
     41##    gp.CreateFileGDB_management(folder, "raster")
    4042
    4143    print 'Process: Make XY Event Layer'
  • anuga_work/production/busselton/Arc_txt2feature_class_res.py

    r6069 r6201  
    1919output_dir = "anuga\\outputs\\"
    2020
    21 #time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'
    22 time_dir2 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'
    23 #time_dir3 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'
    24 time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'
    25 #time_dir5 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'
    26 time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'
     21##time_dir1 = '20081211_154006_run_final_0.6_27255_alpha0.1_kvanputt'
     22##time_dir2 = '20081211_162311_run_final_0_27255_alpha0.1_kvanputt'
     23##time_dir3 = '20081211_162346_run_final_0_68693_alpha0.1_kvanputt'
     24time_dir4 = '20081211_162433_run_final_0.6_68693_alpha0.1_kvanputt'
     25##time_dir5 = '20081211_162656_run_final_0.6_27283_alpha0.1_kvanputt'
     26##time_dir6 = '20081211_162744_run_final_0_27283_alpha0.1_kvanputt'
    2727
    28 
    29 time_dirs = [time_dir2, time_dir4, time_dir6] #, time_dir4, time_dir5, time_dir6]
     28time_dirs = [time_dir4] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
    3029
    3130for time_dir in time_dirs:
  • anuga_work/production/busselton/export_results_max.py

    r6063 r6201  
    2121directory = project.output_dir
    2222
    23 ##time_dir1 = '20081209_155610_run_final_0_27255_250m_none_lfountai'
    24 ##time_dir2 = '20081209_160607_run_final_0_68693_250m_none_lfountai'
     23##time_dir1 = '20081217_101310_run_final_0_27283_250m_none_dt_kvanputt'
     24##time_dir2 = '20081217_115336_run_final_0_27283_250m_none_dp_kvanputt'
    2525###time_dir1 = '20080924_123626_run_final_0_27283_250m_all_kvanputt' # This uses the 250m bathymetry with all interior polygons
    2626###time_dir2 = '20080912_154716_run_final_0_27283_alpha0.1_kvanputt' # This uses original bathyemetry data
     
    2828##time_dirs = [time_dir1, time_dir2]#, time_dir3]
    2929
    30 ##time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'
    31 time_dir2 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'
    32 ##time_dir3 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'
    33 ##time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'
    34 time_dir5 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'
    35 ##time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'
     30time_dir1 = '20081211_154006_run_final_0.6_27255_alpha0.1_kvanputt'
     31##time_dir2 = '20081211_162311_run_final_0_27255_alpha0.1_kvanputt'
     32##time_dir3 = '20081211_162346_run_final_0_68693_alpha0.1_kvanputt'
     33##time_dir4 = '20081211_162433_run_final_0.6_68693_alpha0.1_kvanputt'
     34##time_dir5 = '20081211_162656_run_final_0.6_27283_alpha0.1_kvanputt'
     35##time_dir6 = '20081211_162744_run_final_0_27283_alpha0.1_kvanputt'
    3636##
    37 time_dirs = [time_dir2, time_dir5]# , time_dir3, time_dir4, time_dir5, time_dir6]
     37time_dirs = [time_dir1] #5, time_dir4]# , time_dir4, time_dir5, time_dir6]
    3838 
    3939
    40 #cellsize = 20
    41 cellsize = 250
     40##cellsize = 20
     41cellsize = 5
    4242
    4343timestep = None    # None means no timestep!
     
    4848######
    4949
    50 #area = ['Bunbury', 'Busselton']  # strings must match keys in var_equations below
    51 area = ['All']      # 'All' means no special areas - the whole thing
     50area = ['Bunbury']  # strings must match keys in var_equations below
     51##area = ['All']      # 'All' means no special areas - the whole thing
    5252
    5353######
     
    6262
    6363# one or more key strings from var_equations above
    64 var = ['stage']
     64var = ['depth']
    6565
    6666######
  • anuga_work/production/busselton/get_runup.py

    r6039 r6201  
    1515directory = project.output_dir
    1616
    17 time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'
    18 time_dir2 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'
    19 time_dir3 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'
    20 time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'
    21 time_dir5 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'
    22 time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'
     17time_dir1 = '20081211_154006_run_final_0.6_27255_alpha0.1_kvanputt'
     18##time_dir2 = '20081211_162311_run_final_0_27255_alpha0.1_kvanputt'
     19##time_dir3 = '20081211_162346_run_final_0_68693_alpha0.1_kvanputt'
     20##time_dir4 = '20081211_162433_run_final_0.6_68693_alpha0.1_kvanputt'
     21##time_dir5 = '20081211_162656_run_final_0.6_27283_alpha0.1_kvanputt'
     22##time_dir6 = '20081211_162744_run_final_0_27283_alpha0.1_kvanputt'
    2323
    24 time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
     24time_dirs = [time_dir1] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
    2525
    2626area_dictionary = {'Busselton': project.poly_aoi1,
  • anuga_work/production/busselton/get_timeseries.py

    r6063 r6201  
    1818directory = project.output_dir
    1919
    20 time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'+sep+'gauge'
    21 time_dir2 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'+sep+'gauge'
    22 time_dir3 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'+sep+'gauge'
    23 time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'+sep+'gauge'
    24 time_dir5 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'+sep+'gauge'
    25 time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'+sep+'gauge'
     20##time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'+sep+'gauge'
     21##time_dir2 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'+sep+'gauge'
     22##time_dir3 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'+sep+'gauge'
     23##time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'+sep+'gauge'
     24##time_dir5 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'+sep+'gauge'
     25##time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'+sep+'gauge'
     26##
     27##time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
    2628
    27 time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
     29time_dir1 = '20081217_115336_run_final_0_27283_250m_none_dp_kvanputt'
     30
     31time_dirs = [time_dir1]
    2832
    2933for time_dir in time_dirs:
  • anuga_work/production/busselton/project.py

    r6062 r6201  
    117117
    118118# gauges - used in get_timeseries.py
    119 gauge_name = scenario_name+'.txt'
     119#gauge_name = scenario_name+'.txt'
     120gauge_name = 'Gauges.csv'
    120121# buildings - used in run_building_inundation.py
    121122building = 'busselton_res_clip'
  • anuga_work/production/busselton/project_250m.py

    r5804 r6201  
    7878# Important to distinguish each run - ensure str(user) is included!
    7979# Note, the user is free to include as many parameters as desired
    80 dir_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_250m_' + str(interior_mesh) +'_'+str(user)
     80dir_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_250m_' + str(interior_mesh) +'_dp_'+str(user)
    8181
    8282#------------------------------------------------------------------------------
     
    9696# Check the run_busselton.py for boundary_tags
    9797# thinned ordering file from Hazard Map: format is index,latitude,longitude (with title)
    98 order_filename = 'thinned_boundary_ordering.txt'
     98order_filename = 'thinned_boundary_ordering.csv'
    9999#landward bounding points
    100 landward = 'landward_bounding_polygon.txt'
     100landward = 'landward_bounding_polygon.csv'
    101101
    102102#------------------------------------------------------------------------------
  • anuga_work/production/busselton/run_building_inundation.py

    r6063 r6201  
    2525directory = project.output_dir
    2626
    27 time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'
    28 time_dir2 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'
    29 time_dir3 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'
    30 time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'
    31 time_dir5 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'
    32 time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'
     27time_dir1 = '20081211_154006_run_final_0.6_27255_alpha0.1_kvanputt'
     28##time_dir2 = '20081211_162311_run_final_0_27255_alpha0.1_kvanputt'
     29##time_dir3 = '20081211_162346_run_final_0_68693_alpha0.1_kvanputt'
     30##time_dir4 = '20081211_162433_run_final_0.6_68693_alpha0.1_kvanputt'
     31##time_dir5 = '20081211_162656_run_final_0.6_27283_alpha0.1_kvanputt'
     32##time_dir6 = '20081211_162744_run_final_0_27283_alpha0.1_kvanputt'
    3333
    34 time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
     34time_dirs = [time_dir1] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
    3535
    3636buildings = project.building_in_dir_name
  • anuga_work/production/busselton/run_busselton_250m.py

    r6023 r6201  
    3131# Related major packages
    3232from anuga.shallow_water import Domain
     33from anuga.shallow_water.shallow_water_domain import Transmissive_stage_zero_momentum_boundary
    3334from anuga.shallow_water import Dirichlet_boundary
    3435from anuga.shallow_water import File_boundary
     
    177178    Br = Reflective_boundary(domain)
    178179    Bd = Dirichlet_boundary([kwargs['tide'],0,0])
     180    Bp = Dirichlet_boundary([kwargs['tide']-1,0,0])
     181    Bt = Transmissive_stage_zero_momentum_boundary(domain)
    179182   
    180183    print 'Available boundary tags', domain.get_boundary_tags()
     
    188191
    189192    domain.set_boundary({'back': Br,
    190                          'side': Bd,
     193                         'side': Bt,
    191194                         'ocean': Bf})
    192195
     
    224227   
    225228    kwargs={}
    226     kwargs['file_name']=project.dir_comment
     229    kwargs['file_name']=project_250m.dir_comment
    227230    kwargs['finaltime']=project_250m.finaltime
    228231    kwargs['output_dir']=project_250m.output_run_time_dir
Note: See TracChangeset for help on using the changeset viewer.