Changeset 6723


Ignore:
Timestamp:
Apr 6, 2009, 10:52:05 AM (15 years ago)
Author:
ole
Message:

Implemented shared caching for PhaseII

File:
1 edited

Legend:

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

    r6672 r6723  
    1919scenario_name = 'albany'
    2020scenario_folder = scenario_name
     21
    2122
    2223#-------------------------------------------------------------------------------
     
    3738friction=0.01           # manning's friction coefficient
    3839starttime=0             # start time for simulation
    39 finaltime=80000          # final time for simulation
     40finaltime=10000          # final time for simulation
    4041
    4142# index is only used when wave = Tb
     
    4344wave = 'Tb'             # Bf (sts wave) Tb (index wave)
    4445
    45 setup = 'final'         # This can be one of three values
     46setup = 'trial'         # This can be one of three values
    4647                        #    trial - coarsest mesh, fast
    4748                        #    basic - coarse mesh
     
    143144
    144145
     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'
     150
     151
    145152################################################################################
    146153################################################################################
     
    162169ENV_MUXHOME = 'MUXHOME'
    163170
     171
    164172#-------------------------------------------------------------------------------
    165173# Output Elevation Data
     
    183191home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
    184192muxhome = os.getenv(ENV_MUXHOME)
     193
     194# Create absolute pathname for cache directory
     195# and change caching to use it
     196if 'cachedir' in dir():
     197    cachedir = join(os.getenv(ENV_INUNDATIONHOME), '.cache', cachedir)
     198    from anuga.caching import caching
     199    caching.set_option('cachedir', cachedir)
     200
    185201   
    186202# check various directories/files that must exist
Note: See TracChangeset for help on using the changeset viewer.