Changeset 6794


Ignore:
Timestamp:
Apr 15, 2009, 8:50:14 AM (16 years ago)
Author:
kristy
Message:

change project.py to reflect 'simple' model

File:
1 edited

Legend:

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

    r6715 r6794  
    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 = 'carnarvon'
    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
     27
     28central_meridian = 113.5 # Central meridian for projection (optional)
     29zone = None
     30
     31import sys
     32if len(sys.argv) > 1:
     33    event_number = int(sys.argv[1])
     34else:   
     35    event_number = 27285    # the event number or the mux file name
     36
     37event_number_list = [27285, 68754, 70881] # To piggy back multiple events
     38# events: 27285 (java), 68794 (sumatra), 70375 (sumba)
     39
    2840tide = 0                # difference between MSL and HAT
    29 central_meridian = 111.0 # Central meridian for projection (optional)
    30 event_number = 27285    # the event number or the mux file name
    31 # events: 27285 (java), 68794 (sumatra), 70375 (sumba)
    3241alpha = 0.1             # smoothing parameter for mesh
    3342friction=0.01           # manning's friction coefficient
    3443starttime=0             # start time for simulation
    35 finaltime=80000          # final time for simulation
    36 
    37 # index is only used when wave = Tb
    38 index = 109            # index from the PTHA - Y2000 1.6275m
    39 wave = 'Tb'             # Bf (sts wave) Tb (index wave)
    40 
    41 setup = 'final'         # This can be one of three values
     44finaltime=1000   #60000 # final time for simulation
     45setup = 'trial'         # This can be one of three values
    4246                        #    trial - coarsest mesh, fast
    4347                        #    basic - coarse mesh
    4448                        #    final - fine mesh, slowest
    4549
    46 internal_polygon = True
     50# index is only used when wave = Tb
     51index = 84            # index from the PTHA - Y2000 0.257m
     52wave = 'Tb'             # Bf (sts wave) Tb (index wave)
     53
     54
     55internal_polygon = False
    4756
    4857#-------------------------------------------------------------------------------
     
    6069    internal_poly_comment = 'internal'
    6170else:
    62     internal_poly_comment = None
     71    internal_poly_comment = ''
    6372
    6473output_comment = [setup, tide, event_number, index, wave, internal_poly_comment]
     
    7180# Used in build_elevation.py
    7281# Format for ascii grids, as produced in ArcGIS + a projection file
    73 ascii_grid_filenames = [] # 250m grid 2005
    74 
    75 # Format for point is x,y,elevation (with header)
    76 point_filenames = ['buss_grid250m.txt',
    77                    'exmouth_grid250m.txt'] # 250m grid 2005
     82ascii_grid_filenames = ['grid250m_simple']
     83
     84# Format for points is x,y,elevation (with header)
     85point_filenames = []               
    7886
    7987### Add csv header list to all files in point_filenames
     
    8290##    add_csv_header(join(topographies_folder, f), headerlist)
    8391
    84     # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
     92# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
    8593# Used in build_elevation.py
    86 # Format for points easting,northing (no header)
    87 bounding_polygon_filename = 'bounding_polygon.csv'
    88 bounding_polygon_maxarea = 100000
     94# Format for points: easting,northing (no header)
     95bounding_polygon_filename = 'bounding_polygon_simple.csv'
     96bounding_polygon_maxarea = 125000
    8997
    9098# INTERIOR REGIONS -  for designing the mesh
     
    108116# Used in get_timeseries.py. 
    109117# Format easting,northing,name,elevation (with header)
    110 gauges_filename = 'MH_gauges_10m.csv'
     118gauges_filename = 'gauges.csv'
    111119
    112120# BUILDINGS EXPOSURE - for identifying inundated houses
    113121# Used in run_building_inundation.py
    114122# Format latitude,longitude etc (geographic)
    115 building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
     123building_exposure_filename = '.csv' # from NEXIS
    116124
    117125# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
     
    122130# Thinned ordering file from Hazard Map (geographic)
    123131# Format is index,latitude,longitude (with header)
    124 urs_order_filename = 'urs_order.csv'
     132urs_order_filename = 'urs_order_simple.csv'
    125133
    126134# Landward bounding points
    127135# Format easting,northing (no header)
    128 landward_boundary_filename = 'landward_boundary.csv'
     136landward_boundary_filename = 'landward_boundary_simple.csv'
    129137
    130138# MUX input filename.
    131139# If a meta-file from EventSelection is used, set 'multi-mux' to True.
    132140# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
    133 ##mux_input_filename = event_number # to be found in event_folder
    134                                     # (ie boundaries/event_number/)
     141##mux_input_filename = 'Java-0016-z.grd'
    135142##multi_mux = False
    136143mux_input_filename = 'event.list'
    137144multi_mux = True
     145
     146# Specify if share cache is to be used
     147# Whatever is specified here will be relative to INUNDATION_HOME/.cache
     148# If nothing is specified, local cache will be used.
     149cachedir = '.python_cache_phII'
    138150
    139151
     
    178190home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
    179191muxhome = os.getenv(ENV_MUXHOME)
     192
     193# Create absolute pathname for cache directory
     194# and change caching to use it
     195if 'cachedir' in dir():
     196    cachedir = join(os.getenv(ENV_INUNDATIONHOME), '.cache', cachedir)
     197    from anuga.caching import caching
     198    caching.set_option('cachedir', cachedir)
    180199   
    181200# check various directories/files that must exist
    182 anuga_folder = join(home, state, scenario_folder, 'anuga')
     201anuga_folder = join(home, state, scenario_name, 'anuga')
    183202topographies_folder = join(anuga_folder, 'topographies')
    184203polygons_folder = join(anuga_folder, 'polygons')
     
    238257# sts gauge with desired index number - used for wave 'Tb'
    239258boundary_csv = join(event_folder, 'sts_gauge_' + str(index) + '.csv')
     259
     260
Note: See TracChangeset for help on using the changeset viewer.