New Postgres Database


Currently the v2 api is available as the ‘postgres’ branch of the repository:

git checkout
cd ARCCSSive
git checkout -b postgres
conda env create -f conda/dev-environment
source activate arccssive-dev
pip install .

You could also use virtualenv if preferred


Connect to the database:

from ARCCSSive.db import connect, Session

This will prompt you for your NCI password (it gets your username from $USER). Probably best not to use this in ipython notebook for the moment.

Create a session:

session = Session()

The session used to perform actual queries to the database (see


Models represent tables in the database, you can feed them to session.query()

Each model has a number of available relationships that can be used to join() to other models

Models are in the ARCCSSive.model package, divided into sub-packages by category (eg. the cmip5 package holds cmip5 related models)


A CMIP5 file’s metadata

  • dataset: cmip5.Dataset The dataset this file is part of
  • version: cmip5.Version: This file’s dataset version
  • warnings: list[cmip5.Warning]: Warnings associated with this file
  • timeseries: cmip5.Timeseries Holds all files in the dataset with the same variable at different time periods
  • variables: list[cfnetcdf.Variable]: CF variables in the file (excluding axes)


A CMIP5 dataset, pretty much what you’d find listed on ESGF, with the exception that there’s no version field (this is held separately in the cmip5.Version class)

  • versions: list[cmip5.Version]: Available versions of this dataset
  • variables: list[cmip5.Timeseries]: The latest version of each of the variables in the dataset


A single version of a specific cmip5.Dataset. Different versions exist due to bugfixes after publication.

  • dataset: cmip5.Dataset: The dataset this version is associated with
  • files: list[cmip5.File]: Files belonging to this version
  • warnings: list[cmip5.Warning]: Warnings for this version
  • variables: list[cmip5.Timeseries]: Collects the files by variable into timeseries


All files for a single dataset, version and variable. The full output is often split into multiple files covering different time periods, the timeseries model joins these files back together again.



Base class for CF compliant netcdf files



A CF compliant variable


Old-style models

These models are from the previous ARCCSSive iteration. They are mostly the same as the new version, however they also contain the variable name rather than this being a separate ‘timeseries’ table.

It’s intended that these be moved to the new top-level model namespace


Equivalent to the newer cmip5.Dataset class but also has the variable name



Equivalent to the newer cmip5.Version class but also has the variable name