Changeset 6799


Ignore:
Timestamp:
Apr 15, 2009, 8:52:27 AM (15 years ago)
Author:
kristy
Message:

change project.py to reflect 'simple' model

File:
1 edited

Legend:

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

    r6692 r6799  
    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 = 'melbourne'
    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
     27import sys
     28if len(sys.argv) > 1:
     29    event_number = int(sys.argv[1])
     30else:   
     31    event_number = 58348    # the event number or the mux file name
     32
     33event_side = 'west' #'east'
     34if event_side == 'west':
     35    index = 1979 # index from the PTHA - Y2000 0.257m
     36    event_number_list = [58348, 64288, 68793] # To piggy back multiple events
     37
     38elif event_side == 'east':
     39    index = 2649
     40    event_number_list = [31853, 51449, 58115] # To piggy back multiple events
     41
     42central_meridian = 146.0 # Central meridian for projection (optional)
     43zone = None
    2844tide = 0                # difference between MSL and HAT
    29 central_meridian = 146.0 # Central meridian for projection (optional)
    30 
    3145alpha = 0.1             # smoothing parameter for mesh
    3246friction=0.01           # manning's friction coefficient
    3347starttime=0             # start time for simulation
    34 finaltime=80000          # final time for simulation
    35 
    36 # index is only used when wave = Tb
    37 wave = 'Bf'             # Bf (sts wave) Tb (index wave)
    38 
    39 event_side = 'west'     # for the Tb wave, need to set which side is wave
    40                         # (other ocean boundary will be set to transmissive)
    41 
    42 # for melbourne (west) side:
    43 event_number = 64288    # the event number or the mux file name
    44 # sources:
    45 # other possible:
    46 index = 1982            # index from the PTHA - Y2000 is 0.43302m
    47 
     48finaltime=60000         # final time for simulation
    4849setup = 'final'         # This can be one of three values
    4950                        #    trial - coarsest mesh, fast
    5051                        #    basic - coarse mesh
    5152                        #    final - fine mesh, slowest
     53
     54# index is only used when wave = Tb
     55           
     56wave = 'Tb'         # Bf (sts wave) Tb (index wave)
    5257
    5358internal_polygon = False
     
    6772    internal_poly_comment = 'internal'
    6873else:
    69     internal_poly_comment = None
    70 
    71 output_comment = [setup, tide, event_number, index, wave, internal_poly_comment]
     74    internal_poly_comment = ''
     75
     76output_comment = [setup, tide, event_number, index, wave, event_side, internal_poly_comment]
    7277
    7378#-------------------------------------------------------------------------------
     
    7883# Used in build_elevation.py
    7984# Format for ascii grids, as produced in ArcGIS + a projection file
    80 ascii_grid_filenames = [] # 250m grid 2005
    81 
    82 # Format for point is x,y,elevation (with header)
    83 point_filenames = ['grid_250m.txt'] # 250m grid 2005
     85ascii_grid_filenames = ['grid_250m_simple']
     86
     87# Format for points is x,y,elevation (with header)
     88point_filenames = []               #
    8489
    8590### Add csv header list to all files in point_filenames
     
    8893##    add_csv_header(join(topographies_folder, f), headerlist)
    8994
    90     # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
     95# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
    9196# Used in build_elevation.py
    92 # Format for points easting,northing (no header)
     97# Format for points: easting,northing (no header)
    9398bounding_polygon_filename = 'bounding_polygon.csv'
    94 bounding_polygon_maxarea = 100000
     99bounding_polygon_maxarea = 125000
    95100
    96101# INTERIOR REGIONS -  for designing the mesh
     
    119124# Used in run_building_inundation.py
    120125# Format latitude,longitude etc (geographic)
    121 building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
     126building_exposure_filename = '.csv' # from NEXIS
    122127
    123128# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
     
    128133# Thinned ordering file from Hazard Map (geographic)
    129134# Format is index,latitude,longitude (with header)
    130 urs_order_filename_W = 'urs_order_west.csv'
    131 urs_order_filename_E ='urs_order_east.csv'
     135urs_order_filename_W = 'urs_order_west_simple.csv'
     136urs_order_filename_E ='urs_order_east_simple.csv'
    132137##urs_order_filename = 'urs_order_both.csv' # east is first, then west
    133138
     
    140145# If a meta-file from EventSelection is used, set 'multi-mux' to True.
    141146# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
    142 ##mux_input_filename = event_number # to be found in event_folder
    143                                     # (ie boundaries/event_number/)
     147##mux_input_filename = 'Java-0016-z.grd'
    144148##multi_mux = False
    145149mux_input_filename = 'event.list'
    146150multi_mux = True
     151
     152# Specify if share cache is to be used
     153# Whatever is specified here will be relative to INUNDATION_HOME/.cache
     154# If nothing is specified, local cache will be used.
     155cachedir = '.python_cache_phII'
    147156
    148157
     
    187196home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
    188197muxhome = os.getenv(ENV_MUXHOME)
     198
     199# Create absolute pathname for cache directory
     200# and change caching to use it
     201if 'cachedir' in dir():
     202    cachedir = join(os.getenv(ENV_INUNDATIONHOME), '.cache', cachedir)
     203    from anuga.caching import caching
     204    caching.set_option('cachedir', cachedir)
    189205   
    190206# check various directories/files that must exist
    191 anuga_folder = join(home, state, scenario_folder, 'anuga')
     207anuga_folder = join(home, state, scenario_name, 'anuga')
    192208topographies_folder = join(anuga_folder, 'topographies')
    193209polygons_folder = join(anuga_folder, 'polygons')
     
    249265
    250266# sts gauge with desired index number - used for wave 'Tb'
    251 boundary_csv = join(event_folder, 'sts_gauge_' + str(index) +'.csv')
     267boundary_csv = join(event_folder, 'sts_gauge_' + str(index) + '.csv')
     268
     269
Note: See TracChangeset for help on using the changeset viewer.