Changeset 6276


Ignore:
Timestamp:
Feb 4, 2009, 5:11:17 PM (15 years ago)
Author:
kristy
Message:

Standardised naming convention

Location:
anuga_work/production/busselton/standardised_version
Files:
2 edited

Legend:

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

    r6263 r6276  
    5050geospatial_data = {}
    5151for filename in project.ascii_grid_filenames:
    52     absolute_filename = project.topographies_in_dir + filename
     52    absolute_filename = project.topographies_dir + filename
    5353    convert_dem_from_ascii2netcdf(absolute_filename,
    5454                                  basename_out=absolute_filename,
     
    6262# Create Geospatial data from TXT files
    6363for filename in project.point_filenames:
    64     absolute_filename = project.topographies_in_dir + filename
     64    absolute_filename = project.topographies_dir + filename
    6565    geospatial_data[filename] = Geospatial_data(file_name=absolute_filename,
    6666                                                verbose=True)
  • anuga_work/production/busselton/standardised_version/project.py

    r6262 r6276  
    77
    88import os
     9from os.path import join
    910from os import sep, getenv
    1011from time import localtime, strftime, gmtime
     
    3637state = 'western_australia'
    3738scenario_name = 'busselton'
    38 scenario = 'busselton_tsunami_scenario'
     39scenario_folder = 'busselton_tsunami_scenario'
    3940
    4041# Model specific parameters. One or all can be changed each time the
     
    6970    yieldstep=60
    7071
    71 #------------------------------------------------------------------------------
    72 # Revision numbers - for comparisons study
    73 #------------------------------------------------------------------------------
    74 rev_num = 'newExtent'
    75 #rev_num = '5449'
    76 #rev_num = '4695' # 2nd Sept 2007
    77 #rev_num = '4743' # 3nd Oct 2007
    78 #rev_num = '4777' # 1st Nov 2007
    79 #rev_num = '4874' # 3rd Dec 2007
    80 #rev_num = '4901' # 3rd Jan 2007
    81 #rev_num = '4990' # 5th Feb 2007
    82 #rev_num = '5103' # 3rd March 2007
    83 #rev_num = '5120' # 5th March 2007
    84 #rev_num = '5140' # 7th March 2007
    85 #rev_num = '5160' # 11th March 2007
    86 #rev_num = '5185' # 1st April 2007
    87 #rev_num = '5273' # 2nd May 2007
    88 
    8972
    9073#------------------------------------------------------------------------------
     
    9376# Important to distinguish each run - ensure str(user) is included!
    9477# Note, the user is free to include as many parameters as desired
    95 dir_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_'+ 'alpha' +str(alpha)+'_'+str(user)
     78output_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_'+ 'alpha' +str(alpha)+'_'+str(user)
    9679
    9780#------------------------------------------------------------------------------
     
    10184
    10285# elevation data used in build_busselton.py
     86ascii_grid_filenames = [onshore_name,   # Topo
     87                        offshore_name5] # Busselton Topo
     88
     89point_filenames = [coast_name,     # Coastline
     90                   coast_name1,    # Beach survey
     91                   offshore_name,  # Bathymetry
     92                   offshore_name1, # Bathymetry Charts
     93                   offshore_name2, # Digitised Fairsheet
     94                   offshore_name3, # 250m
     95                   offshore_name4] # Bunbury DPI
    10396# onshore data: format ascii grid with accompanying projection file
    10497onshore_name = 'busselton_v2_gda94_mga50'
     
    116109# gauges - used in get_timeseries.py
    117110#gauge_name = scenario_name+'.txt'
    118 gauge_name = 'Gauges.csv'
     111gauges_filename = 'gauges.csv'
    119112# buildings - used in run_building_inundation.py
    120 building = 'busselton_res_clip'
     113building_exposure_filename = 'busselton_res_clip.csv' #from NEXIS
    121114
    122115
     
    125118# Check the run_busselton.py for boundary_tags
    126119# thinned ordering file from Hazard Map: format is index,latitude,longitude (with title)
    127 order_filename = 'thinned_boundary_ordering.csv'
     120urs_order_filename = 'thinned_boundary_ordering.csv'
    128121#landward bounding points
    129 landward = 'landward_bounding_polygon.csv'
     122landward_boundary_filename = 'landward_boundary.csv'
    130123
    131124
     
    135128# Output filename for elevation
    136129# this is a combination of all the data (utilisied in build_boundary)
    137 combined_name ='busselton_combined_elevation'
    138 combined_smaller_name = 'busselton_combined_elevation_smaller'
     130combined_elevation_basename = scenario_name + '_combined_elevation'
    139131
    140132#------------------------------------------------------------------------------
    141133# Directory Structure
    142134#------------------------------------------------------------------------------
    143 anuga_dir = home+state+sep+scenario+sep+'anuga'+sep
    144 topographies_in_dir = home+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep
    145 topographies_dir = anuga_dir+'topographies'+sep
    146 polygons_dir = anuga_dir+'polygons'+sep
    147 tide_dir = anuga_dir+'tide_data'+sep
    148 boundaries_dir = anuga_dir+'boundaries'+ sep
     135anuga_dir = home+state+sep+scenario+sep+'anuga'
     136topographies_dir = anuga_dir+'topographies'
     137polygons_dir = anuga_dir+'polygons'
     138tide_dir = anuga_dir+'tide_data'
     139boundaries_dir = anuga_dir+'boundaries'
    149140output_dir = anuga_dir+'outputs'+sep
    150141gauges_dir = anuga_dir+'gauges'+sep
     
    155146#------------------------------------------------------------------------------
    156147
    157 ascii_grid_filenames = [onshore_name,   # Topo
    158                         offshore_name5] # Busselton Topo
    159 
    160 point_filenames = [coast_name,     # Coastline
    161                    coast_name1,    # Beach survey
    162                    offshore_name,  # Bathymetry
    163                    offshore_name1, # Bathymetry Charts
    164                    offshore_name2, # Digitised Fairsheet
    165                    offshore_name3, # 250m
    166                    offshore_name4] # Bunbury DPI
    167 
    168 
    169148# Where the combined elevation file sits
    170 combined_dir_name = topographies_dir + combined_name
    171 combined_smaller_name_dir = topographies_dir + combined_smaller_name
     149combined_elevation = topographies_folder + combined_elevation_basename
    172150
    173151# Where the mesh sits (this is created during the run_busselton.py)
    174 meshes_dir_name = meshes_dir + scenario_name+'.msh'
     152meshes = meshes_dir + scenario_name+'.msh'
    175153
    176154# Where the boundary ordering files sit (this is used within build_boundary.py)
    177 order_filename_dir = boundaries_dir + order_filename
     155urs_order = boundaries_folder+ order_filename
    178156
    179157# Where the landward points of boundary extent sit (this is used within run_busselton.py)
    180 landward_dir = boundaries_dir + landward
     158landward_boundary_dir = join(boundaries_dir, landward)
    181159
    182160# Where the event sts files sits (this is created during the build_boundary.py)
    183161boundaries_dir_event = boundaries_dir + str(event_number) + sep
    184 boundaries_dir_mux = muxhome
    185 urs_boundary_name = os.path.join(boundaries_dir_event,
     162urs_boundary_name = join(boundaries_dir_event,
    186163                                 scenario_name)
    187164
     
    193170
    194171# Where the directory of the gauges sit
    195 gauges_dir_name = gauges_dir + gauge_name       #used for get_timeseries.py
    196 building_in_dir_name = gauges_dir + building + '.csv'    #used for run_building_inundation.py
     172gauges = gauges_folder + gauges_filename       #used for get_timeseries.py
     173building_in_dir_name = gauges_dir + building '    #used for run_building_inundation.py
    197174
    198175#------------------------------------------------------------------------------
     
    201178
    202179# Land, to set the initial stage/water to be offcoast only
    203 poly_mainland = read_polygon(polygons_dir+'initial_condition.csv')
     180mainland_polygon = read_polygon(polygons_dir+'initial_condition.csv')
    204181
    205182# Land, to set the initial stage/water to be offcoast only
     
    207184
    208185# Initial bounding polygon for data clipping
    209 poly_all = read_polygon(polygons_dir+'poly_all_extend.csv')
    210 res_poly_all = 100000*res_factor
     186bounding_polygon = read_polygon(polygons_dir+'poly_all_extend.csv')
     187bounding_maxarea = 100000*scale_factor
    211188
    212189# Area of Interest 1 (Busselton)
    213 poly_aoi1 = read_polygon(polygons_dir+'busselton_1km.csv')
    214 res_aoi1 = 500*res_factor
     190aoi1_polygon = read_polygon(polygons_dir+'busselton_1km.csv')
     191aoi1_maxarea = 500*res_factor
    215192
    216193# Area of Interest 2 (Bunbury)
     
    238215
    239216# Combined all regions, must check that all are included!
    240 interior_regions = [[poly_aoi1,res_aoi1],[poly_aoi2,res_aoi2],
    241                     [poly_aos1,res_aos1],[poly_aos2,res_aos2],
    242                     [poly_aos3,res_aos3],[poly_aos4,res_aos4],
     217interior_regions = [[aoi1_polygon, aoi1_maxarea],
     218                    [poly_aoi2,res_aoi2],
     219                    [poly_aos1,res_aos1],
     220                    [poly_aos2,res_aos2],
     221                    [poly_aos3,res_aos3],
     222                    [poly_aos4,res_aos4],
    243223                    [poly_sw1,res_sw1]]
    244224
    245225   
    246 trigs_min = number_mesh_triangles(interior_regions, poly_all,
    247                                   res_poly_all)
     226trigs_min = number_mesh_triangles(interior_regions,
     227                                  poly_all, res_poly_all)
    248228print 'min estimated number of triangles', trigs_min
    249229   
Note: See TracChangeset for help on using the changeset viewer.