Changeset 7657


Ignore:
Timestamp:
Mar 9, 2010, 1:54:17 PM (15 years ago)
Author:
fountain
Message:

updates to bunbury model to refine elevation around leschenault inlet and estuary and include storm gates

Location:
anuga_work/production/bunbury_storm_surge_2009
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/bunbury_storm_surge_2009/build_elevation.py

    r7647 r7657  
    8484keylist = project.ascii_grid_filenames + project.point_filenames
    8585
    86 G1 = geospatial_data['swwa_10m_IC'].clip_outside(project.elevation_clip_box)
    87 G2 = geospatial_data['bunbury_5m_IC'].clip(project.elevation_clip_box)
    88 #~ G2 = geospatial_data['bunbury_nth_a'].clip(project.elevation_clip_box)
    89 #~ G3 = geospatial_data['bunbury_nth_b'].clip(project.elevation_clip_box)
    90 #~ G4 = geospatial_data['bunbury_sth_a'].clip(project.elevation_clip_box)
    91 #~ G5 = geospatial_data['bunbury_sth_b'].clip(project.elevation_clip_box)
    92 G3 = geospatial_data['DPI.txt']
    93 G4 = geospatial_data['Busselton_Chart_Clip_ss.txt']
    94 G5 = geospatial_data['Busselton_NavyFinal_Clip_ss.txt']
    95 G6 = geospatial_data['Leschenault_TIN.txt']
    96 G7 = geospatial_data['Leschenault_Inlet_TIN.txt']
    97 G8 = geospatial_data['DPI5U1A02_01a_edited.txt']
    98 G9 = geospatial_data['DPI5U1A02_01b_edited.txt']
    99 G10 = geospatial_data['DPI5U1A02_01c_edited.txt']
    100 G11 = geospatial_data['DPI5U1A02_01d_edited.txt']
    101 G12 = geospatial_data['DPI5U1A02_01e_edited.txt']
     86G1 = geospatial_data[keylist[0]].clip_outside(project.elevation_clip_box)
     87G2 = geospatial_data[keylist[1]].clip(project.elevation_clip_box)
     88G3 = geospatial_data[keylist[2]]
     89G4 = geospatial_data[keylist[3]]
     90G5 = geospatial_data[keylist[4]]
     91G6 = geospatial_data[keylist[5]]
     92G7 = geospatial_data[keylist[6]]
     93G8 = geospatial_data[keylist[7]]
     94G9 = geospatial_data[keylist[8]]
     95G10 = geospatial_data[keylist[9]]
     96G11 = geospatial_data[keylist[10]]
    10297
     98
     99# G = None
     100
     101# for i, key in enumerate(keylist):
     102    # if key==keylist[0]:
     103        # G[i] = geospatial_data[key].clip_outside(project.elevation_clip_box)
     104    # elif key==keylist[1]:
     105        # G[i] = geospatial_data[key].clip(project.elevation_clip_box)
     106    # else
     107        # G+ = geospatial_data[key]
     108       
    103109#~ G_list = [G1, G2, G3, G4, G5, G6, G7, G8, G9, G10]
    104110
     
    114120#~ print 'G10', G10.attributes
    115121
    116 G = G1 + G2 + G3 + G4 + G5 + G6 + G7 + G8 + G9 + G10 + G11 + G12
     122G = G1 + G2 + G3 + G4 + G5 + G6 + G7 + G8 + G9 + G10 + G11
    117123
    118124# G = None
     
    134140        #~ for i in keylist:
    135141        #~ g.export_points_file(join(project.topographies_folder, (str(keylist[i]) +'_export.txt')))
     142
    136143G.export_points_file(project.combined_elevation + '.txt')
    137 G1.export_points_file(join(project.topographies_folder, keylist[0] +'_export.txt'))
    138 G2.export_points_file(join(project.topographies_folder, keylist[1] +'_export.txt'))
    139 G3.export_points_file(join(project.topographies_folder, keylist[2] +'_export.txt'))
    140 G4.export_points_file(join(project.topographies_folder, keylist[3] +'_export.txt'))
    141 G5.export_points_file(join(project.topographies_folder, keylist[4] +'_export.txt'))
    142 G6.export_points_file(join(project.topographies_folder, keylist[5] +'_export.txt'))
    143 G7.export_points_file(join(project.topographies_folder, keylist[6] +'_export.txt'))
    144 G8.export_points_file(join(project.topographies_folder, keylist[7] +'_export.txt'))
    145 G9.export_points_file(join(project.topographies_folder, keylist[8] +'_export.txt'))
    146 G10.export_points_file(join(project.topographies_folder, keylist[9] +'_export.txt'))
    147 G11.export_points_file(join(project.topographies_folder, keylist[10] +'_export.txt'))
    148 G12.export_points_file(join(project.topographies_folder, keylist[11] +'_export.txt'))
     144
     145print 'Export individual text files'
     146for i in xrange(len(keylist)):
     147    G[i+1].export_points_file(join(project.topographies_folder, keylist[i] +'_export.txt'))
     148 
     149# G1.export_points_file(join(project.topographies_folder, keylist[0] +'_export.txt'))
     150# G2.export_points_file(join(project.topographies_folder, keylist[1] +'_export.txt'))
     151# G3.export_points_file(join(project.topographies_folder, keylist[2] +'_export.txt'))
     152# G4.export_points_file(join(project.topographies_folder, keylist[3] +'_export.txt'))
     153# G5.export_points_file(join(project.topographies_folder, keylist[4] +'_export.txt'))
     154# G6.export_points_file(join(project.topographies_folder, keylist[5] +'_export.txt'))
     155# G7.export_points_file(join(project.topographies_folder, keylist[6] +'_export.txt'))
     156# G8.export_points_file(join(project.topographies_folder, keylist[7] +'_export.txt'))
     157# G9.export_points_file(join(project.topographies_folder, keylist[8] +'_export.txt'))
     158# G10.export_points_file(join(project.topographies_folder, keylist[9] +'_export.txt'))
     159# G11.export_points_file(join(project.topographies_folder, keylist[10] +'_export.txt'))
  • anuga_work/production/bunbury_storm_surge_2009/project.py

    r7647 r7657  
    8585                   'Busselton_Chart_Clip_ss.txt',               # Clipped from Busselton_Chart  - see Busselton Tsunami Scenario 2009
    8686                   'Busselton_NavyFinal_Clip_ss.txt',   # Clipped from Busselton_NavyFinal - see Busselton Tsunami Scenario 2009
    87                    'Leschenault_TIN.txt',               # TIN created over the Leschenault Estuary
    88                    'Leschenault_inlet_TIN.txt'          # TIN created over the Leschenault Inlet
    89                    'DPI5U1A02_01a_edited.txt',          # Bathymetric LiDAR from DPI - split into manageable pieces
    90                    'DPI5U1A02_01b_edited.txt', 
    91                    'DPI5U1A02_01c_edited.txt',
     87                   'DPI5U1A02_01a_edited.txt',          # Bathymetric LiDAR from DPI - split into manageable pieces and edited so
     88                   'DPI5U1A02_01b_edited.txt',          # depths below 0 m are negative, and all soundings on land (ie positive)
     89                   'DPI5U1A02_01c_edited.txt',          # are removed as these are not corrected to "bare earth".
    9290                   'DPI5U1A02_01d_edited.txt',
    93                    'DPI5U1A02_01e_edited.txt']                                 
     91                   'DPI5U1A02_01e_edited.txt',
     92                   'Leschenault_TIN.txt']               # TIN created over the Leschenault Estuary and Inlet]                                   
    9493
    9594# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
     
    105104                         ['area_of_interest.csv', 100],
    106105                         ['storm_gate_area.csv', 1],
    107                          ['floodgates.csv', floodgate_resolution]]
     106                         ['stormgates.csv', 1]]
    108107
    109108# LAND - used to set the initial stage/water to be offcoast only
     
    114113# Format is index,northing, easting, elevation (without header)
    115114gems_order_filename = 'gems_boundary_order_thinned.csv'
     115
     116# Storm gate filename
     117# Format is as for a building file to be read by csv2building_polygons,
     118# easting, northing, id, floors (with header)
     119storm_gate_filename = 'storm_gates.csv'
    116120
    117121# GAUGES - for creating timeseries at a specific point
     
    231235log.log_filename = join(output_run, scenario_name) + '.log'
    232236
     237# The absolute pathname for the storm gate file
     238# Used for run_model.py
     239if storm_gate_filename:
     240        storm_gate = join(polygons_folder, storm_gate_filename) 
     241
    233242# The absolute pathname for the gauges file
    234243# Used for get_timeseries.py
  • anuga_work/production/bunbury_storm_surge_2009/run_model.py

    r7647 r7657  
    113113print domain.statistics()
    114114
     115domain.set_starttime(project.starttime)
    115116domain.set_name(project.scenario_name)
    116117domain.set_datadir(project.output_run)
     
    137138                    verbose=True,
    138139                    alpha=project.alpha)
     140
     141#--------------------------
     142# Add storm surge gate
     143#--------------------------
     144storm_gate_polygon, storm_gate_height = csv2building_polygons(project.storm_gate, floor_height=4)
     145
     146gate = []
     147for key in storm_gate_polygon:
     148    poly = storm_gate_polygon[key]
     149    elev = storm_gate_height[key]
     150    gate.append((poly, elev))
     151
     152domain.add_quantity('elevation',
     153                    Polygon_function(gate, geo_reference=domain.geo_reference),
     154                    use_cache=True,
     155                    verbose=True)
    139156
    140157#-------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.