Changeset 6814


Ignore:
Timestamp:
Apr 15, 2009, 12:23:12 PM (16 years ago)
Author:
kristy
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/australia_ph2/darwin/project.py

    r6755 r6814  
    88from time import localtime, strftime, gmtime
    99from os.path import join, exists
    10 
     10from anuga.lib.add_csv_header.add_csv_header import add_csv_header
    1111
    1212#-------------------------------------------------------------------------------
     
    1818state = 'australia_ph2'
    1919scenario_name = 'darwin'
    20 scenario_folder = scenario_name
    2120
    2221#-------------------------------------------------------------------------------
     
    2625# Model specific parameters.
    2726# One or all can be changed each time the run_model script is executed
    28 tide = 0                # difference between MSL and HAT
    29 central_meridian = 129.0 # for projection (necessary for nonstandard)
    30 event_number = 17898    # the event number or the mux file name
     27
     28central_meridian = 128 # Central meridian for projection (optional)
     29zone = None
     30import sys
     31if len(sys.argv) > 1:
     32    event_number = int(sys.argv[1])
     33else:   
     34 event_number = 17898    # the event number or the mux file name
     35
     36event_number_list = [17898, 64977 , 70906, 71261] # To piggy back multiple events
     37                                          # using run_multiple_events.py
    3138# contributing events: 17898 (Flores), 64977 (Seram), 70906 (Sumba_normal),
    3239# 71261 (Timor_OTF)
     40
     41tide = 0                # difference between MSL and HAT
    3342alpha = 0.1             # smoothing parameter for mesh
    3443friction=0.01           # manning's friction coefficient
    3544starttime=0             # start time for simulation
    36 finaltime=1000          # final time for simulation
    37 
    38 # index is only used when wave = Tb
    39 index = 1829            # index from the PTHA - Y2000 for pt1833 wave height = 0.64m
    40 ##index = 1860            # index from the PTHA - Y2000 for pt 1860 = 1.32m - large wave from Timor
    41 wave = 'Tb'             # Bf (sts wave) Tb (index wave)
    42 
    43 setup = 'trial'         # This can be one of three values
     45finaltime=60000   #60000 # final time for simulation
     46setup = 'final'         # This can be one of three values
    4447                        #    trial - coarsest mesh, fast
    4548                        #    basic - coarse mesh
    4649                        #    final - fine mesh, slowest
    4750
    48 # for 1860 - point to north of Darwin, large wave from event off Timor
    49 # event_number 71065    #(timor - mag 7.4, prob 1e-4)
     51# index is only used when wave = Tb
     52index = 1829            # index from the PTHA - Y2000 0.257m
     53wave = 'Tb'             # Bf (sts wave) Tb (index wave)
     54
    5055
    5156internal_polygon = False
     
    6570    internal_poly_comment = 'internal'
    6671else:
    67     internal_poly_comment = None
     72    internal_poly_comment = ''
    6873
    6974output_comment = [setup, tide, event_number, index, wave, internal_poly_comment]
     
    7681# Used in build_elevation.py
    7782# Format for ascii grids, as produced in ArcGIS + a projection file
    78 ascii_grid_filenames = [] # 250m grid 2005
    79 
    80 # Format for point is x,y,elevation (with header)
    81 point_filenames = ['darwin_grid250m.txt',
    82                    'derby_grid250m.txt'] # 250m grid 2005
     83ascii_grid_filenames = ['grid250m_simple']
     84
     85# Format for points is x,y,elevation (with header)
     86point_filenames = []
     87##point_filenames = ['brisbane_250m.txt',
     88##                   'GBR_250m.txt',
     89##                   'Sydney_250m.txt'] # 250m grid 2005
    8390
    8491### Add csv header list to all files in point_filenames
     
    8794##    add_csv_header(join(topographies_folder, f), headerlist)
    8895
    89     # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
     96# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
    9097# Used in build_elevation.py
    91 # Format for points easting,northing (no header)
    92 bounding_polygon_filename = 'bounding_polygon.csv'
    93 bounding_polygon_maxarea = 100000
     98# Format for points: easting,northing (no header)
     99bounding_polygon_filename = 'bounding_polygon_simple.csv'
     100bounding_polygon_maxarea = 125000
    94101
    95102# INTERIOR REGIONS -  for designing the mesh
    96103# Used in run_model.py
    97104# Format for points easting,northing (no header)                   
    98 #interior_regions_data = []
    99 interior_regions_data = [] #[['poly_island.csv',200000000]]  # large triangles on island
     105interior_regions_data = []
    100106
    101107# add an internal polygon to force different mesh generation
     
    119125# Used in run_building_inundation.py
    120126# Format latitude,longitude etc (geographic)
    121 building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
     127building_exposure_filename = '.csv' # from NEXIS
    122128
    123129# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
     
    132138# Landward bounding points
    133139# Format easting,northing (no header)
    134 landward_boundary_filename = 'landward_boundary.csv'
     140landward_boundary_filename = 'landward_boundary_simple.csv'
    135141
    136142# MUX input filename.
    137143# If a meta-file from EventSelection is used, set 'multi-mux' to True.
    138144# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
    139 ##mux_input_filename = event_number # to be found in event_folder
    140                                     # (ie boundaries/event_number/)
     145##mux_input_filename = 'Java-0016-z.grd'
    141146##multi_mux = False
    142147mux_input_filename = 'event.list'
    143148multi_mux = True
     149
     150# Specify if share cache is to be used
     151# Whatever is specified here will be relative to INUNDATION_HOME/.cache
     152# If nothing is specified, local cache will be used.
     153cachedir = '.python_cache_phII'
    144154
    145155
     
    169179# Output filename for elevation
    170180# this is a combination of all the data generated in build_elevation.py
    171 combined_elevation_basename = scenario_name + '_combined_elevation'
     181combined_elevation_basename = scenario_name + 'simple_combined_elevation'
    172182
    173183#-------------------------------------------------------------------------------
     
    184194home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
    185195muxhome = os.getenv(ENV_MUXHOME)
     196
     197# Create absolute pathname for cache directory
     198# and change caching to use it
     199if 'cachedir' in dir():
     200    cachedir = join(os.getenv(ENV_INUNDATIONHOME), '.cache', cachedir)
     201    from anuga.caching import caching
     202    caching.set_option('cachedir', cachedir)
    186203   
    187204# check various directories/files that must exist
    188 anuga_folder = join(home, state, scenario_folder, 'anuga')
     205anuga_folder = join(home, state, scenario_name, 'anuga')
    189206topographies_folder = join(anuga_folder, 'topographies')
    190207polygons_folder = join(anuga_folder, 'polygons')
     
    243260
    244261# sts gauge with desired index number - used for wave 'Tb'
    245 boundary_csv = join(event_folder, 'sts_gauge_' + str(index) +'.csv')
     262boundary_csv = join(event_folder, 'sts_gauge_' + str(index) + '.csv')
     263
     264
Note: See TracChangeset for help on using the changeset viewer.