Changeset 6805


Ignore:
Timestamp:
Apr 15, 2009, 8:54:37 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/wyndham/project.py

    r6731 r6805  
    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 = 'wyndham'
    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 # Central meridian for projection (optional)
    30 event_number = 64962    # the event number or the mux file name
     27
     28central_meridian = 128.0 # 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 = 64962    # the event number or the mux file name
     35
     36event_number_list = [17918, 64962, 70920] # To piggy back multiple events
    3137# contributing events: 17918 (Flores), 64962 (Seram), 70920 (Sumba_normal),
    3238# others: 27308 (java)
     39
     40tide = 0                # difference between MSL and HAT
    3341alpha = 0.1             # smoothing parameter for mesh
    3442friction=0.01           # manning's friction coefficient
    3543starttime=0             # start time for simulation
    36 finaltime=80000          # final time for simulation
    37 
    38 # index is only used when wave = Tb
    39 index = 1823            # index from the PTHA - Y2000 = 0.452m
    40 wave = 'Bf'             # Bf (sts wave) Tb (index wave)
    41 
    42 setup = 'final'         # This can be one of three values
     44finaltime=1000         # final time for simulation
     45setup = 'trial'         # This can be one of three values
    4346                        #    trial - coarsest mesh, fast
    4447                        #    basic - coarse mesh
    4548                        #    final - fine mesh, slowest
     49
     50# index is only used when wave = Tb
     51index = 1823            # index from the PTHA - Y2000 0.257m
     52wave = 'Tb'             # Bf (sts wave) Tb (index wave)
     53
    4654
    4755internal_polygon = False
     
    6169    internal_poly_comment = 'internal'
    6270else:
    63     internal_poly_comment = None
     71    internal_poly_comment = ''
    6472
    6573output_comment = [setup, tide, event_number, index, wave, internal_poly_comment]
     
    7280# Used in build_elevation.py
    7381# Format for ascii grids, as produced in ArcGIS + a projection file
    74 ascii_grid_filenames = [] # 250m grid 2005
    75 
    76 # Format for point is x,y,elevation (with header)
    77 point_filenames = ['darwin_grid250m_wyndham.txt',
    78                    'derby_grid250m_wyndham.txt'] # 250m grid 2005
     82ascii_grid_filenames = ['grid250m_simple']
     83
     84# Format for points is x,y,elevation (with header)
     85point_filenames = []               
    7986
    8087### Add csv header list to all files in point_filenames
     
    8390##    add_csv_header(join(topographies_folder, f), headerlist)
    8491
    85     # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
     92# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
    8693# Used in build_elevation.py
    87 # Format for points easting,northing (no header)
    88 bounding_polygon_filename = 'bounding_polygon.csv'
    89 bounding_polygon_maxarea = 100000
     94# Format for points: easting,northing (no header)
     95bounding_polygon_filename = 'bounding_polygon_simple.csv'
     96bounding_polygon_maxarea = 125000
    9097
    9198# INTERIOR REGIONS -  for designing the mesh
     
    114121# Used in run_building_inundation.py
    115122# Format latitude,longitude etc (geographic)
    116 building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
     123building_exposure_filename = '.csv' # from NEXIS
    117124
    118125# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
     
    123130# Thinned ordering file from Hazard Map (geographic)
    124131# Format is index,latitude,longitude (with header)
    125 urs_order_filename = 'urs_order.csv'
     132urs_order_filename = 'urs_order_simple.csv'
    126133
    127134# Landward bounding points
    128135# Format easting,northing (no header)
    129 landward_boundary_filename = 'landward_boundary.csv'
     136landward_boundary_filename = 'landward_boundary_simple.csv'
    130137
    131138# MUX input filename.
    132139# If a meta-file from EventSelection is used, set 'multi-mux' to True.
    133140# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
    134 ##mux_input_filename = event_number # to be found in event_folder
    135                                     # (ie boundaries/event_number/)
     141##mux_input_filename = 'Java-0016-z.grd'
    136142##multi_mux = False
    137143mux_input_filename = 'event.list'
    138144multi_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'
    139150
    140151
     
    179190home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
    180191muxhome = 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)
    181199   
    182200# check various directories/files that must exist
    183 anuga_folder = join(home, state, scenario_folder, 'anuga')
     201anuga_folder = join(home, state, scenario_name, 'anuga')
    184202topographies_folder = join(anuga_folder, 'topographies')
    185203polygons_folder = join(anuga_folder, 'polygons')
     
    238256
    239257# sts gauge with desired index number - used for wave 'Tb'
    240 boundary_csv = join(event_folder, 'sts_gauge_' + str(index) +'.csv')
     258boundary_csv = join(event_folder, 'sts_gauge_' + str(index) + '.csv')
     259
     260
Note: See TracChangeset for help on using the changeset viewer.