#------------------------------------------------------------------------------------------
[project:ipcc4_drs]

# IPCC4 experiments
# project | experiment_name | experiment_description
experiment_options = 
  ipcc4_drs | 20c3m | climate of the 20th century
  ipcc4_drs | 1pctto2x | 1 percent/year CO2 increase experiment (to doubling)
  ipcc4_drs | 1pctto4x | 1 percent/year CO2 increase experiment (to quadrupling)
  ipcc4_drs | picntrl | pre-industrial control
  ipcc4_drs | pdcntrl | present-day control
  ipcc4_drs | 2xco2 | doubled CO2 equilibrium 
  ipcc4_drs | commit | committed climate change
  ipcc4_drs | sresa1b | 720 ppm stabilization
  ipcc4_drs | sresa2 | SRES A2
  ipcc4_drs | sresb1 | 550 ppm stabilization
  ipcc4_drs | amip | AMIP
  ipcc4_drs | slabcntl | slab ocean control

# Define the categories to be used for this project:
#   name | category_type | is_mandatory | is_thredds_property | display_order
# 
# name: category name
# category_type: one of:
#    enum: enumerated value. There must be a corresponding <name>_options option
#    text: multi-line text string
#    string: single-line text string
#    fixed: a fixed value, can be displayed but not modified
# is_mandatory: the category must be defined
# is_thredds_property: the category will be represented in the THREDDS output as a <property> element
# display_order: ordering in the dataset display, with the smallest value first
#
categories =
  project | enum | true | true | 0
  experiment | enum | true | true | 1
  model | enum | true | true | 2
  time_frequency | enum | true | true | 3
  realm | enum | true | true | 4
  run_name | string | true | true | 5
  institute | enum | true | true | 6
  title | string | false | true | 7
  creator | enum | false | false | 8
  publisher | enum | false | false | 9
  creation_time | string | false | true | 10
  format | fixed | false | true | 11
  source | text | false | false | 13
  description | text | false | false | 99

# category_defaults = 
#   creator | created_by_%(experiment)s_%(model)s
#   publisher | Karl Taylor

# Enumerated values
creator_options =
  Contact_1 | Contact_1@samp.org | http://sample.samp.org
  Contact_2 | Contact_2@foo.net | 
time_frequency_options = 3hourly, daily, fixed, monthly, yearly
publisher_options =
  Publisher_1 | Publisher_1@samp.org | http://sample.samp.org
  Publisher_2 | Publisher_2@foo.net | http://sample.foo.net
  Karl Taylor | taylor13@llnl.gov | http://www-pcmdi.llnl.gov
realm_options = atm, ocn, land, ice, fixed
institute_options = BCC, BCCR, CCCMA, CNRM, CSIRO, GFDL, GISS, IAP, INMCM, INGV, IPSL, MIROC, MIUB, MPI, MRI, NCAR, UKMO

# Class name of the IPCC4 project handler.
#   handler = module.class_name
handler = esgcet.config.ipcc4_handler:IPCC4Handler

# Format of generated dataset IDs
# The parent ID is the location into which the dataset will be published
# dataset_id = %(root_id)s.%(project)s.%(model)s.%(experiment)s.%(run)s.%(time_frequency)s.%(submodel_combined)s
# dataset_id = %(root_id)s.%(project)s.%(model)s.%(experiment)s.%(run)s.%(time_frequency)s.%(table_id)s.%(variable)s
# dataset_id = %(root_id)s\.%(project)s\.%(model)s\.%(experiment)s\.%(run_name)s\.%(time_frequency)s

dataset_id = %(root_id)s.%(project)s.%(institute)s.%(model)s.%(experiment)s.%(time_frequency)s.%(realm)s.%(variable)s.%(run_name)s
parent_id = %(root_id)s.ipcc4.%(model)s

# Maps
maps = time_frequency_map, cmor_table_map, realm_combined_map, institute_map

time_frequency_map = map(time_frequency_short : time_frequency)
  3h    | 3hourly
  da    | daily
  fixed | monthly
  mo    | monthly
  yr    | yearly

realm_combined_map = map(realm : realm_combined)
  atm   | atm
  ocn   | ocn
  land  | atm
  ice   | ocn

cmor_table_map = map(realm, time_frequency_short : cmor_table_id)
  atm | mo | A1
  atm | da | A2
  atm | 3h | A3
  atm | yr | A4
  atm | forcing | A5
  ice | mo | A1
  land | fixed | A1
  land | mo | A1
  ocn | fixed | A1
  ocn | mo | O1

institute_map = map(model : institute)
  bcc_cm1 | BCC
  bccr_bcm2_0 | BCCR
  cccma_cgcm3_1 | CCCMA
  cccma_cgcm3_1_t63 | CCCMA
  cnrm_cm3 | CNRM
  csiro_mk3_0 | CSIRO
  csiro_mk3_5 | CSIRO
  gfdl_cm2_0 | GFDL
  gfdl_cm2_1 | GFDL
  giss_aom | GISS
  giss_model_e_h | GISS
  giss_model_e_r | GISS
  iap_fgoals1_0_g | IAP
  inmcm3_0 | INMCM
  ingv_echam4 | INGV
  ipsl_cm4 | IPSL
  miroc3_2_hires | MIROC
  miroc3_2_medres | MIROC
  miub_echo_g | MIUB
  mpi_echam5 | MPI
  mri_cgcm2_3_2a | MRI
  ncar_ccsm3_0 | NCAR
  ncar_pcm1 | NCAR
  ukmo_hadcm3 | UKMO
  ukmo_hadgem1 | UKMO

# Directory format. This is used to determine field values by matching directory names.
#   May be a single pattern or a list of patterns separated by vertical bars (|)
#   If more than one pattern is specified, the first matching pattern is used. Consequently, if more than one
#   pattern could be matched, make sure the most specific is listed first, otherwise it will never be used.
#   The order is significant!
directory_format = /ipcc/%(experiment)s/%(realm)s/%(time_frequency_short)s/%(variable)s/%(model)s/%(run_name)s |
		   /nersc/projects/pcmdi/GDO/ipcc4/%(experiment)s/%(realm)s/%(time_frequency_short)s/%(variable)s/%(model)s/%(run_name)s | 
                   /data/publish_test/%(experiment)s/%(realm)s/%(time_frequency_short)s/%(variable)s/%(model)s/%(run_name)s
# directory_format = /ipcc/%(experiment)s/%(realm)s/%(time_frequency_short)s/%(variable)s/%(model)s/%(run_name)s

# Format of generated descriptions. These comprise the THREDDS catalog names that
# are actually displayed
dataset_name_format = project=%(project_description)s, <br/>model=%(model_description)s, <br/>experiment=%(experiment_description)s, <br/>run=%(run_name)s, <br/>time_frequency=%(time_frequency)s, <br/>variable=%(variable_standard_name)s, <br/>version=%(version)s

# THREDDS will map aggregation URLs of the form:
#   http://hostname/<service_base><thredds_aggregations_root_path><aggregation_path>
# to the physical location:
#   <thredds_aggregations_root_location><aggregation_path>
#
# For example:
#   http://hostname:8080/thredds/dodsC/ipcc4/aggregates/somepath/ps_A1.xml
# maps to:
#   /var/www/html/aggregates/ipcc4/somepath/ps_A1.xml
#
# See DEFAULT section for service_base definitions
thredds_aggregations_root_path = ipcc4/aggregates
thredds_aggregations_root_location = /var/www/html/aggregates/ipcc4/

# Exclude these variables from THREDDS catalogs. They are still added to the database.
thredds_exclude_variables = a, a_bnds, b, b_bnds, bounds_lat, bounds_lon, height, lat_bnds, lev_bnds, lon_bnds, p0, time_bnds, lat, lon, longitude, latitude, time, lev, depth, depth_bnds, plev, geo_region, plev_bnds, tau_bnds, longitude_bnds, latitude_bnds, tau, region, layer, pressure1, bnds

# Variable ps is located in files ps_XX.nc
variable_locate = ps,ps_

# Set true if files follow the IPCC standard of one variable per file.
# If set, the THREDDS metadata is organized as per-variable datasets.
# Otherwise, the datasets are assumed to be per-time.
variable_per_file = true
