Ignore:
Timestamp:
Apr 8, 2009, 7:48:21 AM (16 years ago)
Author:
myall
Message:
 
Location:
anuga_work/production/australia_ph2/eucla_motel
Files:
1 added
1 edited

Legend:

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

    r6617 r6755  
    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 = 'eucla_motel'
    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 = 129.0 # Central meridian for projection (optional)
     29#zone =
     30import sys
     31if len(sys.argv) > 1:
     32    event_number = int(sys.argv[1])
     33else:   
     34    event_number = 64449    # the event number or the mux file name
     35
     36event_number_list = [58332, 64449, 68755] # To piggy back multiple events
     37
    2838tide = 0                # difference between MSL and HAT
    29 central_meridian = 129.0 # Central meridian for projection (optional)
    30 event_number = 64449    # the event number or the mux file name
    31 # sources: 64449 (sandwich), 68755 (sumatra), 58332 (Puysegur)
    32 # others: 7859 (altiplano), 11016 (andaman), 17017 (columbia), 27252 (java), 46699 (midamerica)
    33 # 53961 (puna), 57582 (peru), 58332 (Puysegur), 64449 (sandwich), 68755 (sumatra)
    3439alpha = 0.1             # smoothing parameter for mesh
    3540friction=0.01           # manning's friction coefficient
    3641starttime=0             # start time for simulation
    37 finaltime=80000          # final time for simulation
    38 
    39 # index is only used when wave = Tb
    40 index = 1837            # index from the PTHA
    41 wave = 'Bf'             # Bf (sts wave) Tb (index wave)
    42 
    43 setup = 'final'         # This can be one of three values
     42finaltime=1000   #60000 # final time for simulation
     43setup = 'trial'         # This can be one of three values
    4444                        #    trial - coarsest mesh, fast
    4545                        #    basic - coarse mesh
    4646                        #    final - fine mesh, slowest
     47
     48# index is only used when wave = Tb
     49index = 1837            # index from the PTHA - Y2000 0.257m
     50wave = 'Tb'             # Bf (sts wave) Tb (index wave)
     51
    4752
    4853internal_polygon = False
     
    6267    internal_poly_comment = 'internal'
    6368else:
    64     internal_poly_comment = None
     69    internal_poly_comment = ''
    6570
    6671output_comment = [setup, tide, event_number, index, wave, internal_poly_comment]
     
    7378# Used in build_elevation.py
    7479# Format for ascii grids, as produced in ArcGIS + a projection file
    75 ascii_grid_filenames = [] # 250m grid 2005
    76 
    77 # Format for point is x,y,elevation (with header)
    78 point_filenames = ['grid250m_pts.txt'] # 250m grid 2005
     80ascii_grid_filenames = []
     81
     82# Format for points is x,y,elevation (with header)
     83point_filenames = ['grid250m_pts.txt']   # 250m grid 2005
    7984
    8085### Add csv header list to all files in point_filenames
     
    8388##    add_csv_header(join(topographies_folder, f), headerlist)
    8489
    85     # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
     90# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
    8691# Used in build_elevation.py
    87 # Format for points easting,northing (no header)
     92# Format for points: easting,northing (no header)
    8893bounding_polygon_filename = 'bounding_polygon.csv'
    8994bounding_polygon_maxarea = 100000
     
    114119# Used in run_building_inundation.py
    115120# Format latitude,longitude etc (geographic)
    116 building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
     121building_exposure_filename = '.csv' # from NEXIS
    117122
    118123# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
     
    132137# If a meta-file from EventSelection is used, set 'multi-mux' to True.
    133138# 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/)
     139##mux_input_filename = 'Java-0016-z.grd'
    136140##multi_mux = False
    137141mux_input_filename = 'event.list'
    138142multi_mux = True
     143
     144# Specify if share cache is to be used
     145# Whatever is specified here will be relative to INUNDATION_HOME/.cache
     146# If nothing is specified, local cache will be used.
     147cachedir = '.python_cache_phII'
    139148
    140149
     
    179188home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
    180189muxhome = os.getenv(ENV_MUXHOME)
     190
     191# Create absolute pathname for cache directory
     192# and change caching to use it
     193if 'cachedir' in dir():
     194    cachedir = join(os.getenv(ENV_INUNDATIONHOME), '.cache', cachedir)
     195    from anuga.caching import caching
     196    caching.set_option('cachedir', cachedir)
    181197   
    182198# check various directories/files that must exist
    183 anuga_folder = join(home, state, scenario_folder, 'anuga')
     199anuga_folder = join(home, state, scenario_name, 'anuga')
    184200topographies_folder = join(anuga_folder, 'topographies')
    185201polygons_folder = join(anuga_folder, 'polygons')
     
    239255# sts gauge with desired index number - used for wave 'Tb'
    240256boundary_csv = join(event_folder, 'sts_gauge_' + str(index) + '.csv')
     257
     258
Note: See TracChangeset for help on using the changeset viewer.