Changeset 5783


Ignore:
Timestamp:
Sep 25, 2008, 10:39:12 AM (16 years ago)
Author:
sexton
Message:

updated commenting in project file for Perth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/perth/project.py

    r5781 r5783  
    11"""Common filenames and locations for elevation, meshes and outputs.
    2 This script is the heart of all scripts in folder
     2This script is the heart of all scripts in the folder
    33"""
    44#------------------------------------------------------------------------------
     
    1818# Directory setup
    1919#------------------------------------------------------------------------------
    20 ##Note: INUNDATIONHOME is the inundation directory, not the data directory.
     20# Note: INUNDATIONHOME is the inundation directory, not the data directory.
    2121
    2222home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent diruser = get_user_name()
     
    2525host = get_host_name()
    2626
    27 ##time stuff
    28 time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
    29 gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
     27# determines time for setting up output directories
     28time = strftime('%Y%m%d_%H%M%S',localtime())
     29gtime = strftime('%Y%m%d_%H%M%S',gmtime())
    3030build_time = time+'_build'
    3131run_time = time+'_run'
    32 print 'gtime: ', gtime
    3332
    3433#------------------------------------------------------------------------------
     
    3635#------------------------------------------------------------------------------
    3736
    38 ##Changed to reflect the modeled community (also sets up the directory system)
     37# this section needs to be updated to reflect the modelled community.
     38# Note, the user needs to set up the directory system accordingly
    3939state = 'western_australia'
    4040scenario_name = 'perth'
    4141scenario = 'perth_tsunami_scenario'
    42 ##One or all can be changed each time the run_scenario script is excuted
    43 tide = 0 #0.6
    44 #event_number = 27255
     42
     43# Model specific parameters. One or all can be changed each time the
     44# run_scenario script is executed
     45tide = 0                #0.6
     46#event_number = 27255   # linked to hazard map
    4547event_number = 27283
    46 alpha = 0.1
    47 friction=0.01
    48 starttime=0
    49 finaltime=80000
    50 
    51 setup='final'  ## Can replace with trial or basic, this action will thin the mesh
    52                ## so that the run script will take less time (hence less acurate)
     48alpha = 0.1             # smoothing parameter for mesh
     49friction=0.01           # manning's friction coefficient
     50starttime=0             
     51finaltime=80000         # final time for simulation
     52
     53setup='final'  # Final can be replaced with trial or basic.
     54               # Either will result in a coarser mesh that will allow a
     55               # faster, but less accurate, simulation.
    5356
    5457if setup =='trial':
     
    7174# Output Filename
    7275#------------------------------------------------------------------------------
    73 ##Important to distiquish each run
     76# Important to distinguish each run - ensure str(user) is included!
     77# Note, the user is free to include as many parameters as desired
    7478dir_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_'+ 'alpha' +str(alpha)+'_'+str(user)
    7579
    7680#------------------------------------------------------------------------------
    77 # INPUT DATA
    78 #------------------------------------------------------------------------------
    79 
    80 ##ELEVATION DATA## - used in build_perth.py
    81 ## onshore data: format ascii grid with accompaning projection file
     81# Input Data
     82#------------------------------------------------------------------------------
     83
     84# elevation data used in build_perth.py
     85# onshore data: format ascii grid with accompanying projection file
    8286onshore_name = 'perth_dli_ext'
    83 ## island: format ascii grid with accompaning projection file
     87# island: format ascii grid with accompanying projection file
    8488island_name = 'rott_dli_ext'
    8589island_name1 = 'gard_dli_ext'
    8690island_name2 = 'carnac_island_dli_ext'
    8791island_name3 = 'penguin_dli_ext'
    88 ## coastline: format x,y,elevation (with title)
     92# coastline: format x,y,elevation (with title)
    8993coast_name = 'coastline_perthP.txt'
    90 ## bathymetry: format x,y,elevation (with title)
     94# bathymetry: format x,y,elevation (with title)
    9195offshore_name = 'Perth.txt'
    9296offshore_name1 = 'Perth_Chart.txt'
     
    9498offshore_name3 = 'port_swanriver.txt'
    9599
    96 ##GAUGES## - used in get_timeseries.py
     100# gauges - used in get_timeseries.py
    97101gauge_name = 'perth.csv'
    98102gauge_name2 = 'thinned_MGA50.csv'
    99103
    100 ##BOUNDING POLYGON## -used in build_boundary.py and run_perth.py respectively
    101 #NOTE: when files are put together must be in sequence - for ease go clockwise!
    102 #Check the run_perth.py for boundary_tags
    103 ##thinned ordering file from Hazard Map: format index,latitude,longitude (with title)
     104# BOUNDING POLYGON - used in build_boundary.py and run_perth.py respectively
     105# NOTE: when files are put together the points must be in sequence - for ease go clockwise!
     106# Check the run_perth.py for boundary_tags
     107# thinned ordering file from Hazard Map: format is index,latitude,longitude (with title)
    104108order_filename = 'thinned_boundary_ordering.txt'
    105 ##landward bounding points
     109#landward bounding points
    106110landward = 'landward_bounding_polygon.txt'
    107111
    108112#------------------------------------------------------------------------------
    109 # OUTPUT ELEVATION DATA
    110 #------------------------------------------------------------------------------
    111 ##Output filename for elevation
    112 ## its a combination of all the data put together (utilisied in build_boundary)
     113# Output Elevation Data
     114#------------------------------------------------------------------------------
     115# Output filename for elevation
     116# this is a combination of all the data (utilisied in build_boundary)
    113117combined_name ='perth_combined_elevation'
    114118combined_smaller_name = 'perth_combined_elevation_smaller'
     
    128132
    129133#------------------------------------------------------------------------------
    130 # Location of input and output Data
    131 #------------------------------------------------------------------------------
    132 ##where the input data sits
     134# Location of input and output data
     135#------------------------------------------------------------------------------
     136# where the input data sits
    133137onshore_in_dir_name = topographies_in_dir + onshore_name
    134138island_in_dir_name = topographies_in_dir + island_name
     
    142146offshore_in_dir_name3 = topographies_in_dir + offshore_name3
    143147
    144 ##where the output data sits
     148# where the output data sits
    145149onshore_dir_name = topographies_dir + onshore_name
    146150island_dir_name = topographies_dir + island_name
     
    154158offshore_dir_name3 = topographies_dir + offshore_name3
    155159
    156 ##where the combined file sits
     160# where the combined elevation file sits
    157161combined_dir_name = topographies_dir + combined_name
    158162combined_smaller_name_dir = topographies_dir + combined_smaller_name
    159163
    160 ##where the mesh sits (this is created during the run_perth.py)
     164# where the mesh sits (this is created during the run_perth.py)
    161165meshes_dir_name = meshes_dir + scenario_name+'.msh'
    162166
    163 #where the boundary order files sit (this is used within build_boundary.py)
     167# where the boundary ordering files sit (this is used within build_boundary.py)
    164168order_filename_dir = boundaries_dir + order_filename
    165169
    166 #where the landward points of boundary extent sit (this is used within run_perth.py)
     170# where the landward points of boundary extent sit (this is used within run_perth.py)
    167171landward_dir = boundaries_dir + landward
    168172
    169 #where the event sts files sits (this is created during the build_boundary.py)
     173# where the event sts files sits (this is created during the build_boundary.py)
    170174boundaries_dir_event = boundaries_dir + str(event_number) + sep
    171175boundaries_dir_mux = muxhome
    172176
    173 #where the directory of the output filename sits
    174 output_build_time_dir = output_dir+build_time+dir_comment+sep #used for build_perth.py
    175 output_run_time_dir = output_dir+run_time+dir_comment+sep #used for run_perth.py
     177# where the directory of the output filename sits
     178output_build_time_dir = output_dir+build_time+dir_comment+sep   #used for build_perth.py
     179output_run_time_dir = output_dir+run_time+dir_comment+sep       #used for run_perth.py
    176180output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
    177181
    178 #where the directory of the gauges sit
    179 gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py
    180 gauges_dir_name2 = gauges_dir + gauge_name2 #used for get_timeseries.py
     182#w here the directory of the gauges sit
     183gauges_dir_name = gauges_dir + gauge_name       #used for get_timeseries.py
     184gauges_dir_name2 = gauges_dir + gauge_name2     #used for get_timeseries.py
    181185
    182186#------------------------------------------------------------------------------
     
    184188#------------------------------------------------------------------------------
    185189
    186 #Land, to set the stage/water to be offcoast only
     190#Land, to set the initial stage/water to be offcoast only
    187191poly_mainland = read_polygon(polygons_dir+'initial_condition.csv')
    188192
    189 #Initial bounding polygon for data clipping
     193# Initial bounding polygon for data clipping
    190194poly_all = read_polygon(polygons_dir+'poly_all.csv')
    191195res_poly_all = 100000*res_factor
    192196
    193 #Area of Interest 1 (Fremantle)
     197# Area of Interest 1 (Fremantle)
    194198poly_aoi1 = read_polygon(polygons_dir+'CBD_coastal.csv')
    195199res_aoi1 = 500*res_factor
    196200
    197 #Area of Interest 2 (Rockingham)
     201# Area of Interest 2 (Rockingham)
    198202poly_aoi2 = read_polygon(polygons_dir+'rockingham_penguin.csv')
    199203res_aoi2 = 500*res_factor
    200204
    201 #Area of Interest 2 (garden Island)
     205# Area of Interest 2 (garden Island)
    202206poly_aoi2a = read_polygon(polygons_dir+'garden.csv')
    203207res_aoi2a= 500*res_factor
    204208
    205 #Area of Interest 3 (geordie bay - record of tsunami impact)
     209# Area of Interest 3 (geordie bay - record of tsunami impact)
    206210poly_aoi3 = read_polygon(polygons_dir+'geordie_bay.csv')
    207211res_aoi3 = 500*res_factor
    208212
    209 #Area of Interest 4 (sorrento - record of tsunami impact)
     213# Area of Interest 4 (sorrento - record of tsunami impact)
    210214poly_aoi4 = read_polygon(polygons_dir+'sorrento_gauge.csv')
    211215res_aoi4 = 500*res_factor
    212216
    213 #Area of Significance 1 (Garden Island and sand bank infront of Rockingham)
     217# Area of Significance 1 (Garden Island and sand bank infront of Rockingham)
    214218poly_aos1 = read_polygon(polygons_dir+'garden_rockingham.csv')
    215219res_aos1 = 1000*res_factor
    216220
    217 #Area of Significance 2 (incorporate coastline of rottnest)
     221# Area of Significance 2 (incorporate coastline of rottnest)
    218222poly_aos2 = read_polygon(polygons_dir+'rottnest_external.csv')
    219223res_aos2 = 1000*res_factor
    220224
    221 #Refined areas
    222 #Polygon designed to incorporate Dredge Area from Fremantle to
    223 #Rockingham the steep incline was making the mesh go to 0
     225# Refined areas
     226# Polygon designed to incorporate dredged area from Fremantle to
     227# Rockingham as the steep incline was making the elevation go to 0
    224228poly_aos3 = read_polygon(polygons_dir+'DredgeArea.csv')
    225229res_aos3 = 1000*res_factor
    226230
    227 #Shallow water 1
     231# Shallow water 1
    228232poly_sw1 = read_polygon(polygons_dir+'internal_h20mORd3km.csv')
    229233res_sw1 = 25000*res_factor
    230234
    231 #Deep water (land of Rottnest, ANUGA does not do donuts!)
     235# Deep water (land of Rottnest, ANUGA does not do donuts!)
    232236poly_dw1 = read_polygon(polygons_dir+'rottnest_internal.csv')
    233237res_dw1 = 100000*res_factor
     
    244248print 'min estimated number of triangles', trigs_min
    245249   
    246 
    247250#------------------------------------------------------------------------------
    248251# Clipping regions for export to asc and regions for clipping data
     252# Final inundation maps should only be created in regions of the finest mesh
    249253#------------------------------------------------------------------------------
    250254
Note: See TracChangeset for help on using the changeset viewer.