Personal tools
You are here: Home IPCC AR4 Model Data Portal Configuration
Document Actions

Configuration

Configuring the ESG publishing system

The ESG publishing scripts are implemented in the python publish package. The Lib subdirectory contains two configuration files:

  • __init__.py - imports the configuration file
  • <project>_config.py - the configuration file for <project>
For example, if __init__.py contains:
"""
Define the site-specific configuration for ESG publishing
"""
import clamp_config as config
then the configuration file is clamp_config.py:
"C-LAMP site configuration for publishing"

import os, string, glob, base_config

SUBM = 0
FREQ = 1

# Root data directory
rootdir = '/data2/cces/clamp'

# Database user ID
datauser = 'someuser'
datasocket = '/var/lib/mysql/mysql.sock'

# Project ID
projectID = 'C-LAMP'

# Service ID
service = 'DISKatORNL'

# List of models, each line of the form: model_id, url, model_description
modelListLocation = "/data1/esg/etc/models.txt"

# Top-level web directory
webroot = "/var/www/html"

# THREDDS URL
threddsroot = "http://esg2.ornl.gov/metadata/pcmdi/c-lamp/thredds/"

# THREDDS web directory
fileroot = os.path.join(webroot,"metadata/pcmdi/c-lamp/thredds/")

# RLS server URL
rlsServer = 'rls://esg2.ornl.gov'

# Ogsa-dai URL
ogsaUri = 'http://esg2.ornl.gov:8080/ogsa/services/ogsadai/DAIServiceGroupRegistry'

# Authority for parameter names
authority = "C-LAMP"

# Variables that should be ignored on file scans
excludeVars = base_config.excludeVars + [
'bounds_latrof',
'bounds_lonrof',
'latrof_bnds',
'lonrof_bnds',
]

# Common root of all object IDs in the system
datasetroot = 'pcmdi.c-lamp'

# Model URL
defaultModelUrl = "http://climate.ornl.gov/bgcmip"

# Default root publishing directory
defaultRootPublishingDir = "/data1/esg/publishing"

# Top level data directory
topDataDir = rootdir

# Project ID for CatalogGenerator config files
catalogProjectId = "C-LAMP"

# Project name
catalogProjectName = "CCSM Carbon LAnd Model intercomparison Project (C-LAMP)"

# Project URL
catalogProjectUrl = "http://climate.ornl.gov/bgcmip/"

# Project title
catalogProjectTitle = "CCSM Carbon LAnd Model intercomparison Project (C-LAMP)"

# Map table ID => (submodel, frequency)
tables = {
'T1':('atm', 'MA'),
'T2':('lnd', 'MH')
}

# Map (submodel, frequency) => table ID
tabtable = {
('atm', 'MA'):'T1',
('lnd', 'MH'):'T2'
}

# Map experiment description => experiment ID
exps = {
'i01.01' : 'i01.01',
'Spin-up, Forcing with observed NCEP/NCAR reanalysis (CCSM3 I-configuration)' : 'i01.01',
'i01.02' :'i01.02',
'Control, Forcing with observed NCEP/NCAR reanalysis (CCSM3 I-configuration)' : 'i01.02',
}

# Map experiment ID => experiment descriptions
expdes = {
'i01.01':('Spin-up, Forcing with observed NCEP/NCAR reanalysis (CCSM3 I-configuration)', 'i01.01'),
'i01.02':('Control, Forcing with observed NCEP/NCAR reanalysis (CCSM3 I-configuration)', 'i01.02'),
}

# Map frequency => frequency ID
shortfreq = {
'monthly': 'MA',
'monthly_by_hour': 'MH',
}

# Map frequency ID => frequency
longfreq = {
'MA' : 'monthly',
'MH' : 'monthly_by_hour',
}

...
To  install the publish package, including configuration:
% set path = (<PYTHONHOME>/bin $path)
% cd publish-<version>
% python setup.py --verbose install

The following Python packages are required by the publishing scripts:

  • pxdom.py
  • PyXML
  • MySQLdb
These packages are installed separately. The sources are in <ESGHOME>/src.



Powered by Plone