import numpy as N from atmosci.utils.config import ConfigObject # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # TOOLCFG = ConfigObject('tool', None, 'dirpaths', 'filenames') TOOLCFG.dirpaths = { 'root': { 'dev': '/Volumes/Transport/data/app_data', 'tool': '/Volumes/data/app_data' }, 'data': { 'frost': 'frost/grid/%(year)d/%(subdir)s', 'shared': 'shared/grid/%(region)s/%(source)s/%(subdir)s', 'tool': 'frapple/build/%(region)s/%(source)s/%(subdir)s' }, } TOOLCFG.filenames = { 'frost': { 'chill': '%(year)d-Frost-Apple-Chill.h5', 'tempext': '%(year)d_temperatures.h5', 'variety': '%(year)d-Frost-Apple-%(variety)s.h5', }, 'shared': { 'tempext': '%(year)d-%(source)s-%(region)s-Daily.h5', }, 'tool': { 'chill': '%(year)d-Frost-Apple-Chill.h5',
CONFIG.dev.csftool_url = 'http://localhost:8081/csftool' CONFIG.dev.server_address = 'http://localhost' CONFIG.dev.server_port = 8081 CONFIG.dev.server_url = 'http://localhost:8081' CONFIG.prod = CONFIG.demo.copy("prod") CONFIG.test = CONFIG.dev.copy("test") CONFIG.test.csftool_url = 'http://cyclone.nrcc.cornell.edu:8081/csftool' CONFIG.test.server_address = 'http://cyclone.nrcc.cornell.edu' CONFIG.test.server_url = 'http://cyclone.nrcc.cornell.edu:8081' # paths to application directories CONFIG.dirpaths = { 'package': PKG_DIRPATH, # CSF tool package directory 'resources': RESOURCE_PATH, # CSF tool resource directory 'server': SERVER_DIRPATH, # CSF tool server directory } # delete the directory path constants del PKG_DIRPATH, RESOURCE_PATH, SERVER_DIRPATH # paths to resource files CONFIG.resource_map = ConfigMap({ 'icons': ('icon', 'dir', 'icons'), 'images': ('image', 'dir', 'images'), 'js': ('file', 'dir', 'js'), 'style': ('file', 'dir', 'style'), 'pages': ('page', 'dir', 'pages'), }) CONFIG.server_port = 8081
ATMOSCFG = ConfigObject('atmosci', None) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # directory paths # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - default = { 'data': '/data2/web-app-data', 'shared': '/data2/weather-data/shared', 'static': '/data2/weather-data/shared/grid/static', 'weather': '/data2/weather-data/shared', 'working': '/data2/web-app-data' } # SET THE CONFIGURED dirpath TO THE default DIRECTORY PATHS ATMOSCFG.dirpaths = default # only set the following configuration parameter when multiple apps are # using the same data source file - set it in each application's config # file - NEVER set it in the default (global) config file. # CONFIG.dirpaths.source = CONFIG.dirpaths.shared # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # MODES ALLOW FOR DIFFERENT DIRECTORY PATHS FOR DIFFERENT PURPOSES ATMOSCFG.modes = { 'default': { 'dirpaths': default, }, 'dev': { 'dirpaths': { 'data': '/Volumes/Transport/data/app_data',