Changeset 6796


Ignore:
Timestamp:
Apr 15, 2009, 8:51:00 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/ceduna/project.py

    r6726 r6796  
    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 = 'ceduna'
    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 ##zone = 53               # specify zone of model
    30 central_meridian = 133.0 # nonstandard projection
    31 
     27
     28central_meridian = 133 # Central meridian for projection (optional)
     29zone = None
    3230import sys
    3331if len(sys.argv) > 1:
    3432    event_number = int(sys.argv[1])
    3533else:   
    36     event_number = 27347    # the event number or the mux file name
     34 event_number = 27347    # the event number or the mux file name
    3735
    3836event_number_list = [27347, 64448, 58331] # To piggy back multiple events
     
    4341# 57483 (peru), 65304 (shetland), 68792 (sumatra)
    4442
     43tide = 0                # difference between MSL and HAT
    4544alpha = 0.1             # smoothing parameter for mesh
    4645friction=0.01           # manning's friction coefficient
    4746starttime=0             # start time for simulation
    48 finaltime=1000          # final time for simulation
    49 
    50 # index is only used when wave = Tb
    51 index = 1889            # index from the PTHA
    52 wave = 'Bf'             # Bf (sts wave) Tb (index wave)
    53 
    54 setup = 'trial'         # This can be one of three values
     47finaltime=60000   #60000 # final time for simulation
     48setup = 'final'         # This can be one of three values
    5549                        #    trial - coarsest mesh, fast
    5650                        #    basic - coarse mesh
    5751                        #    final - fine mesh, slowest
     52
     53# index is only used when wave = Tb
     54index = 1884            # index from the PTHA - Y2000 0.257m
     55wave = 'Tb'             # Bf (sts wave) Tb (index wave)
     56
    5857
    5958internal_polygon = False
     
    7372    internal_poly_comment = 'internal'
    7473else:
    75     internal_poly_comment = None
     74    internal_poly_comment = ''
    7675
    7776output_comment = [setup, tide, event_number, index, wave, internal_poly_comment]
     
    8483# Used in build_elevation.py
    8584# Format for ascii grids, as produced in ArcGIS + a projection file
    86 ascii_grid_filenames = [] # 250m grid 2005
    87 
    88 # Format for point is x,y,elevation (with header)
    89 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 = []
     89##point_filenames = ['brisbane_250m.txt',
     90##                   'GBR_250m.txt',
     91##                   'Sydney_250m.txt'] # 250m grid 2005
    9092
    9193### Add csv header list to all files in point_filenames
     
    9496##    add_csv_header(join(topographies_folder, f), headerlist)
    9597
    96     # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
     98# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
    9799# Used in build_elevation.py
    98 # Format for points easting,northing (no header)
    99 bounding_polygon_filename = 'bounding_polygon.csv'
    100 bounding_polygon_maxarea = 100000
     100# Format for points: easting,northing (no header)
     101bounding_polygon_filename = 'bounding_polygon_simple.csv'
     102bounding_polygon_maxarea = 125000
    101103
    102104# INTERIOR REGIONS -  for designing the mesh
     
    125127# Used in run_building_inundation.py
    126128# Format latitude,longitude etc (geographic)
    127 building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
     129building_exposure_filename = '.csv' # from NEXIS
    128130
    129131# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
     
    134136# Thinned ordering file from Hazard Map (geographic)
    135137# Format is index,latitude,longitude (with header)
    136 urs_order_filename = 'urs_order.csv'
     138urs_order_filename = 'urs_order_simple.csv'
    137139
    138140# Landward bounding points
    139141# Format easting,northing (no header)
    140 landward_boundary_filename = 'landward_boundary.csv'
     142landward_boundary_filename = 'landward_boundary_simple.csv'
    141143
    142144# MUX input filename.
    143145# If a meta-file from EventSelection is used, set 'multi-mux' to True.
    144146# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
    145 ##mux_input_filename = event_number # to be found in event_folder
    146                                     # (ie boundaries/event_number/)
     147##mux_input_filename = 'Java-0016-z.grd'
    147148##multi_mux = False
    148149mux_input_filename = 'event.list'
    149150multi_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'
    150156
    151157
     
    175181# Output filename for elevation
    176182# this is a combination of all the data generated in build_elevation.py
    177 combined_elevation_basename = scenario_name + '_combined_elevation'
     183combined_elevation_basename = scenario_name + 'simple_combined_elevation'
    178184
    179185#-------------------------------------------------------------------------------
     
    190196home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
    191197muxhome = 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)
    192205   
    193206# check various directories/files that must exist
    194 anuga_folder = join(home, state, scenario_folder, 'anuga')
     207anuga_folder = join(home, state, scenario_name, 'anuga')
    195208topographies_folder = join(anuga_folder, 'topographies')
    196209polygons_folder = join(anuga_folder, 'polygons')
     
    229242event_sts = join(event_folder, scenario_name)
    230243
    231 
    232 
    233244# The absolute pathname for the output folder names
    234245# Used for build_elevation.py
Note: See TracChangeset for help on using the changeset viewer.