Changeset 6773
- Timestamp:
- Apr 8, 2009, 4:47:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/australia_ph2/sydney/project.py
r6731 r6773 8 8 from time import localtime, strftime, gmtime 9 9 from os.path import join, exists 10 from os import sep 11 10 from anuga.lib.add_csv_header.add_csv_header import add_csv_header 12 11 13 12 #------------------------------------------------------------------------------- … … 19 18 state = 'australia_ph2' 20 19 scenario_name = 'sydney' 21 scenario_folder = scenario_name22 20 23 21 #------------------------------------------------------------------------------- … … 27 25 # Model specific parameters. 28 26 # One or all can be changed each time the run_model script is executed 27 28 central_meridian = 151 # Central meridian for projection (optional) 29 zone = None 30 import sys 31 if len(sys.argv) > 1: 32 event_number = int(sys.argv[1]) 33 else: 34 event_number = 58152 # the event number or the mux file name 35 36 event_number_list = [58152, 58222, 58326] # To piggy back multiple events 37 38 # events: 27346 (java 2.1e-6), 58334 (puysegur 8.8e-7), 64322 (sandwich 8.2e-6), 39 # other events: 51466 (newHebrides 7.2e-7), 57537 (peru 4.7e-7), 46591 (midAmerica 1.3e-6), 40 # 68791 (sumatra 7.5e-7), 11100 (andaman 4.9e-7), 65368 (shetland 2.5e-6), 7867 (altiplano 1.0e-6) 29 41 tide = 0 # difference between MSL and HAT 30 zone = 56 # specify zone of model31 event_number = 58152 # the event number or the mux file name32 42 alpha = 0.1 # smoothing parameter for mesh 33 43 friction=0.01 # manning's friction coefficient 34 44 starttime=0 # start time for simulation 35 finaltime=80000 # final time for simulation 36 37 # index is only used when wave = Tb 38 index = 2956 # index from the PTHA 39 wave = 'Tb' # Bf (sts wave) Tb (index wave) 40 41 setup = 'final' # This can be one of three values 45 finaltime=1000 #60000 # final time for simulation 46 setup = 'trial' # This can be one of three values 42 47 # trial - coarsest mesh, fast 43 48 # basic - coarse mesh 44 49 # final - fine mesh, slowest 50 51 # index is only used when wave = Tb 52 index = 2938 # index from the PTHA - Y2000 0.257m 53 wave = 'Tb' # Bf (sts wave) Tb (index wave) 54 55 56 internal_polygon = False 45 57 46 58 #------------------------------------------------------------------------------- … … 55 67 #------------------------------------------------------------------------------- 56 68 57 output_comment = [setup, tide, event_number, index, wave] 69 if internal_polygon: 70 internal_poly_comment = 'internal' 71 else: 72 internal_poly_comment = '' 73 74 output_comment = [setup, tide, event_number, index, wave, internal_poly_comment] 58 75 59 76 #------------------------------------------------------------------------------- … … 64 81 # Used in build_elevation.py 65 82 # Format for ascii grids, as produced in ArcGIS + a projection file 66 ascii_grid_filenames = [] # 250m grid 2005 67 68 # Format for point is x,y,elevation (with header) 69 point_filenames = ['sydney_elevation.txt', 70 'melbourne_elevation.txt'] # 250m grid 2005 83 ascii_grid_filenames = ['grid_250m_simple'] 84 85 # Format for points is x,y,elevation (with header) 86 point_filenames = [] 87 ##point_filenames = ['sydney_elevation.txt', 88 ## 'melbourne_elevation.txt'] # 250m grid 2005 71 89 72 90 ### Add csv header list to all files in point_filenames … … 75 93 ## add_csv_header(join(topographies_folder, f), headerlist) 76 94 77 95 # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh 78 96 # Used in build_elevation.py 79 # Format for points easting,northing (no header)80 bounding_polygon_filename = 'bounding_polygon .csv'81 bounding_polygon_maxarea = 1 0000097 # Format for points: easting,northing (no header) 98 bounding_polygon_filename = 'bounding_polygon_simple.csv' 99 bounding_polygon_maxarea = 125000 82 100 83 101 # INTERIOR REGIONS - for designing the mesh … … 86 104 interior_regions_data = [] 87 105 106 # add an internal polygon to force different mesh generation 107 # used to test for discretisation error when building elevation 108 # make sure file is in same folder as interior regions and bouding polygon; 109 # format is same (2 column .csv; easting, northing; no header) 110 if internal_polygon: 111 interior_regions_data.append(['internal_polygon.csv', 112 bounding_polygon_maxarea]) 113 88 114 # LAND - used to set the initial stage/water to be offcoast only 89 115 # Used in run_model.py. Format for points easting,northing (no header) … … 93 119 # Used in get_timeseries.py. 94 120 # Format easting,northing,name,elevation (with header) 95 gauges_filename = ' MH_gauges_10m2.csv' #'gauges.csv'121 gauges_filename = 'gauges.csv' 96 122 97 123 # BUILDINGS EXPOSURE - for identifying inundated houses 98 124 # Used in run_building_inundation.py 99 125 # Format latitude,longitude etc (geographic) 100 building_exposure_filename = ' sydney_res_clip.csv' # from NEXIS126 building_exposure_filename = '.csv' # from NEXIS 101 127 102 128 # BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively … … 107 133 # Thinned ordering file from Hazard Map (geographic) 108 134 # Format is index,latitude,longitude (with header) 109 urs_order_filename = 'urs_order .csv'135 urs_order_filename = 'urs_order_simple.csv' 110 136 111 137 # Landward bounding points 112 138 # Format easting,northing (no header) 113 landward_boundary_filename = 'landward_boundary .csv'139 landward_boundary_filename = 'landward_boundary_simple.csv' 114 140 115 141 # MUX input filename. 116 142 # If a meta-file from EventSelection is used, set 'multi-mux' to True. 117 143 # If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False. 118 ##mux_input_filename = event_number # to be found in event_folder 119 # (ie boundaries/event_number/) 144 ##mux_input_filename = 'Java-0016-z.grd' 120 145 ##multi_mux = False 121 146 mux_input_filename = 'event.list' 122 147 multi_mux = True 123 148 124 149 # Specify if share cache is to be used 150 # Whatever is specified here will be relative to INUNDATION_HOME/.cache 151 # If nothing is specified, local cache will be used. 152 cachedir = '.python_cache_phII' 125 153 126 154 … … 150 178 # Output filename for elevation 151 179 # this is a combination of all the data generated in build_elevation.py 152 combined_elevation_basename = scenario_name + ' _combined_elevation'180 combined_elevation_basename = scenario_name + 'simple_combined_elevation' 153 181 154 182 #------------------------------------------------------------------------------- … … 165 193 home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder 166 194 muxhome = os.getenv(ENV_MUXHOME) 195 196 # Create absolute pathname for cache directory 197 # and change caching to use it 198 if 'cachedir' in dir(): 199 cachedir = join(os.getenv(ENV_INUNDATIONHOME), '.cache', cachedir) 200 from anuga.caching import caching 201 caching.set_option('cachedir', cachedir) 167 202 168 203 # check various directories/files that must exist 169 anuga_folder = join(home, state, scenario_ folder, 'anuga')204 anuga_folder = join(home, state, scenario_name, 'anuga') 170 205 topographies_folder = join(anuga_folder, 'topographies') 171 206 polygons_folder = join(anuga_folder, 'polygons') … … 223 258 mux_input = join(event_folder, mux_input_filename) 224 259 225 boundary_csv = event_folder + sep + 'sts_gauge_' + str(index) +'.csv' 260 # sts gauge with desired index number - used for wave 'Tb' 261 boundary_csv = join(event_folder, 'sts_gauge_' + str(index) + '.csv') 262 263
Note: See TracChangeset
for help on using the changeset viewer.