Ignore:
Timestamp:
Sep 25, 2008, 1:34:14 PM (16 years ago)
Author:
kristy
Message:

Correlating with Janes updates

File:
1 edited

Legend:

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

    r5782 r5785  
    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
     48alpha = 0.1             # smoothing parameter for mesh
     49friction=0.01           # manning's friction coefficient
     50starttime=0             
     51finaltime=80000         # final time for simulation
    5052
    5153interior_mesh = 'all' # Can have 'all' or 'none' for Phase 2 study
    5254
    53 setup='final'  ## Can replace with trial or basic, this action will thin the mesh
    54                ## so that the run script will take less time (hence less acurate)
     55setup='final'  # Final can be replaced with trial or basic.
     56               # Either will result in a coarser mesh that will allow a
     57               # faster, but less accurate, simulation.
    5558
    5659if setup =='trial':
     
    7376# Output Filename
    7477#------------------------------------------------------------------------------
    75 ##Important to distiquish each run
     78# Important to distinguish each run - ensure str(user) is included!
     79# Note, the user is free to include as many parameters as desired
    7680dir_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_250m_' + str(interior_mesh) +'_'+str(user)
    7781
    7882#------------------------------------------------------------------------------
    79 # INPUT DATA
    80 #------------------------------------------------------------------------------
    81 
    82 ##ELEVATION DATA## - used in build_perth.py
    83 ## onshore data: format ascii grid with accompaning projection file
    84 grid_250m_2005 = 'grid'
    85 
    86 ##GAUGES## - used in get_timeseries.py
     83# Input Data
     84#------------------------------------------------------------------------------
     85
     86# elevation data used in build_perth.py
     87# onshore data: format ascii grid with accompanying projection file
     88onshore_name = 'grid'
     89
     90# gauges - used in get_timeseries.py
    8791gauge_name = 'perth.csv'
    8892gauge_name2 = 'thinned_MGA50.csv'
    8993
    90 ##BOUNDING POLYGON## -used in build_boundary.py and run_perth.py respectively
    91 #NOTE: when files are put together must be in sequence - for ease go clockwise!
    92 #Check the run_perth.py for boundary_tags
    93 ##thinned ordering file from Hazard Map: format index,latitude,longitude (with title)
     94# BOUNDING POLYGON - used in build_boundary.py and run_perth.py respectively
     95# NOTE: when files are put together the points must be in sequence - for ease go clockwise!
     96# Check the run_perth.py for boundary_tags
     97# thinned ordering file from Hazard Map: format is index,latitude,longitude (with title)
    9498order_filename = 'thinned_boundary_ordering.txt'
    95 ##landward bounding points
     99#landward bounding points
    96100landward = 'landward_bounding_polygon.txt'
    97101
    98102#------------------------------------------------------------------------------
    99 # OUTPUT ELEVATION DATA
    100 #------------------------------------------------------------------------------
    101 ##Output filename for elevation
    102 ## its a combination of all the data put together (utilisied in build_boundary)
     103# Output Elevation Data
     104#------------------------------------------------------------------------------
     105# Output filename for elevation
     106# this is a combination of all the data (utilisied in build_boundary)
    103107combined_name ='perth_combined_elevation_250m'
    104108
     
    117121
    118122#------------------------------------------------------------------------------
    119 # Location of input and output Data
    120 #------------------------------------------------------------------------------
    121 ##where the input data sits
    122 onshore_in_dir_name = topographies_in_dir + grid_250m_2005
    123 
    124 ##where the output data sits
    125 onshore_dir_name = topographies_dir + grid_250m_2005
    126 
    127 ##where the combined file sits
     123# Location of input and output data
     124#------------------------------------------------------------------------------
     125# where the input data sits
     126onshore_in_dir_name = topographies_in_dir + onshore_name
     127
     128# where the output data sits
     129onshore_dir_name = topographies_dir + onshore_name
     130
     131# where the combined elevation file sits
    128132combined_dir_name = topographies_dir + combined_name
    129133
    130 ##where the mesh sits (this is created during the run_perth.py)
    131 meshes_dir_name = meshes_dir + scenario_name + interior_mesh + '.msh'
    132 
    133 #where the boundary order files sit (this is used within build_boundary.py)
     134# where the mesh sits (this is created during the run_perth.py)
     135meshes_dir_name = meshes_dir + scenario_name+ interior_mesh +'.msh'
     136
     137# where the boundary ordering files sit (this is used within build_boundary.py)
    134138order_filename_dir = boundaries_dir + order_filename
    135139
    136 #where the landward points of boundary extent sit (this is used within run_perth.py)
     140# where the landward points of boundary extent sit (this is used within run_perth.py)
    137141landward_dir = boundaries_dir + landward
    138142
    139 #where the event sts files sits (this is created during the build_boundary.py)
     143# where the event sts files sits (this is created during the build_boundary.py)
    140144boundaries_dir_event = boundaries_dir + str(event_number) + sep
    141145boundaries_dir_mux = muxhome
    142146
    143 #where the directory of the output filename sits
    144 output_build_time_dir = output_dir+build_time+dir_comment+sep #used for build_perth.py
    145 output_run_time_dir = output_dir+run_time+dir_comment+sep #used for run_perth.py
     147# where the directory of the output filename sits
     148output_build_time_dir = output_dir+build_time+dir_comment+sep   #used for build_perth.py
     149output_run_time_dir = output_dir+run_time+dir_comment+sep       #used for run_perth.py
    146150output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
    147151
    148 #where the directory of the gauges sit
    149 gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py
    150 gauges_dir_name2 = gauges_dir + gauge_name2 #used for get_timeseries.py
     152#w here the directory of the gauges sit
     153gauges_dir_name = gauges_dir + gauge_name       #used for get_timeseries.py
     154gauges_dir_name2 = gauges_dir + gauge_name2     #used for get_timeseries.py
    151155
    152156#------------------------------------------------------------------------------
     
    154158#------------------------------------------------------------------------------
    155159
    156 #Land, to set the stage/water to be offcoast only
     160#Land, to set the initial stage/water to be offcoast only
    157161poly_mainland = read_polygon(polygons_dir+'initial_condition.csv')
    158162
    159 #Initial bounding polygon for data clipping
     163# Initial bounding polygon for data clipping
    160164poly_all = read_polygon(polygons_dir+'poly_all.csv')
    161165res_poly_all = 100000*res_factor
    162166
    163 #Area of Interest 1 (Fremantle)
     167# Area of Interest 1 (Fremantle)
    164168poly_aoi1 = read_polygon(polygons_dir+'CBD_coastal.csv')
    165169res_aoi1 = 500*res_factor
    166170
    167 #Area of Interest 2 (Rockingham)
     171# Area of Interest 2 (Rockingham)
    168172poly_aoi2 = read_polygon(polygons_dir+'rockingham_penguin.csv')
    169173res_aoi2 = 500*res_factor
    170174
    171 #Area of Interest 2 (garden Island)
     175# Area of Interest 2 (garden Island)
    172176poly_aoi2a = read_polygon(polygons_dir+'garden.csv')
    173177res_aoi2a= 500*res_factor
    174178
    175 #Area of Interest 3 (geordie bay - record of tsunami impact)
     179# Area of Interest 3 (geordie bay - record of tsunami impact)
    176180poly_aoi3 = read_polygon(polygons_dir+'geordie_bay.csv')
    177181res_aoi3 = 500*res_factor
    178182
    179 #Area of Interest 4 (sorrento - record of tsunami impact)
     183# Area of Interest 4 (sorrento - record of tsunami impact)
    180184poly_aoi4 = read_polygon(polygons_dir+'sorrento_gauge.csv')
    181185res_aoi4 = 500*res_factor
    182186
    183 #Area of Significance 1 (Garden Island and sand bank infront of Rockingham)
     187# Area of Significance 1 (Garden Island and sand bank infront of Rockingham)
    184188poly_aos1 = read_polygon(polygons_dir+'garden_rockingham.csv')
    185189res_aos1 = 1000*res_factor
    186190
    187 #Area of Significance 2 (incorporate coastline of rottnest)
     191# Area of Significance 2 (incorporate coastline of rottnest)
    188192poly_aos2 = read_polygon(polygons_dir+'rottnest_external.csv')
    189193res_aos2 = 1000*res_factor
    190194
    191 #Refined areas
    192 #Polygon designed to incorporate Dredge Area from Fremantle to
    193 #Rockingham the steep incline was making the mesh go to 0
     195# Refined areas
     196# Polygon designed to incorporate dredged area from Fremantle to
     197# Rockingham as the steep incline was making the elevation go to 0
    194198poly_aos3 = read_polygon(polygons_dir+'DredgeArea.csv')
    195199res_aos3 = 1000*res_factor
    196200
    197 #Shallow water 1
     201# Shallow water 1
    198202poly_sw1 = read_polygon(polygons_dir+'internal_h20mORd3km.csv')
    199203res_sw1 = 25000*res_factor
    200204
    201 #Deep water (land of Rottnest, ANUGA does not do donuts!)
     205# Deep water (land of Rottnest, ANUGA does not do donuts!)
    202206poly_dw1 = read_polygon(polygons_dir+'rottnest_internal.csv')
    203207res_dw1 = 100000*res_factor
     
    215219    print'Mesh = none'
    216220    interior_regions = []
    217    
     221     
    218222trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
    219223print 'min estimated number of triangles', trigs_min
    220224   
    221 
    222225#------------------------------------------------------------------------------
    223226# Clipping regions for export to asc and regions for clipping data
     227# Final inundation maps should only be created in regions of the finest mesh
    224228#------------------------------------------------------------------------------
    225229
Note: See TracChangeset for help on using the changeset viewer.