Package Contents

We have written this python package with the intent that it be easy to use on a variety of levels. For the researcher who just wants to setup basic model-benchmark confrontations using our mean-state analysis, they may never need to program in python. For those who wish to perform more complicated comparisons or pose their own analysis, we present the package contents with some underlying philosophy concerning the purpose of each object.

Variable

This class encapsulates data defined in space/time with common analysis capabilities. You can think of it as a netCDF variable with analysis routines that are aware of the spatial/temporal nature of the data. It is the basic building block on which the analysis portion of the package is built.

Variable

A class for managing variables and their analysis.

ModelResults

This model result class aims to handle model queries efficiently and uniformly without requiring the user to interface with the source netCDF files themselves.

ModelResult

A class for exploring model results.

Confrontations

In the ILAMB parlance, a confrontation is a observational benchmark dataset and its accompanying analysis. Thus we have implemented the Confrontation base class which will automatically handle the querying of data from the model and perform our mean-state analysis. In anticipation that users will want to write their own analysis, or have benchmark datasets which compare to a non-algebraic combination of model inputs, we support confrontation classes which derive from the base class. The other classes listed here are examples of how this may be accomplished.

Confrontation

A generic class for confronting model results with observational data.

ConfNBP

A confrontation for examining the global net ecosystem carbon balance.

Regions

This class unifies treatment of regions in ILAMB by allowing regions to be defined by latitude and longitude bounds as well by netCDF4 files containing integer indices.

Regions

A class for unifying the treatment of regions in ILAMB.

ilamblib

This module collects many routines which may be helpful but do not belong with any of the above objects.

GenerateDistinctColors(N[, saturation, value])

Generates a series of distinct colors.

ClipTime(v, t0, tf)

Remove time from a variable based on input bounds.

ConvertCalendar(t, units, calendar)

ComposeSpatialGrids(var1, var2)

Creates a grid which conforms the boundaries of both variables.

CellAreas(lat, lon[, lat_bnds, lon_bnds])

Given arrays of latitude and longitude, return cell areas in square meters.

GlobalLatLonGrid(res, **keywords)

Generates a latitude/longitude grid at a desired resolution

NearestNeighborInterpolation(lat1, lon1, …)

Interpolates globally grided data at another resolution

TrueError(lat1_bnd, lon1_bnd, lat1, lon1, …)

Computes the pointwise difference between two sets of gridded data

SympifyWithArgsUnits(expression, args, units)

Uses symbolic algebra to determine the final unit of an expression.

FromNetCDF4(filename, variable_name[, …])

Extracts data from a netCDF4 datafile for use in a Variable object.

CombineVariables(V)

Combines a list of variables into a single variable.

Score(var, normalizer)

Remaps a normalized variable to the interval [0,1].

ScoreSeasonalCycle(phase_shift)

Computes the seasonal cycle score from the phase shift.

MakeComparable(ref, com, **keywords)

Make two variables comparable.

Post

Finally we provide a module with many ways of presenting these results. While we want to keep data formats open such that researchers may use plotting code of their own in their own language, we also want to provide a robust set of tools for generating different views and organizations of the confrontation results.

ColorBar(ax, **keywords)

Plot a colorbar.

TaylorDiagram(stddev, corrcoef, refstd, fig, …)

Plot a Taylor diagram.

RegisterCustomColormaps()

Adds some new colormaps to matplotlib’s database.