ILAMB.ModelResult.ModelResult

class ILAMB.ModelResult.ModelResult(path, modelname='unamed', color=(0, 0, 0), filter='', regex='', model_year=None, paths=None, description='', group='')[source]

A class for exploring model results.

This class provides a simplified way of accessing model results. It is essentially a pointer to a top level directory and defines the model as all netCDF4 files found in its subdirectories. If this directory contains model output from several runs or experiments, you may wish to specify a string (the filter argument) which we will require to be in the filename for it to be considered part of the model.

Parameters
  • path (str) – the full path to the directory which contains the model result files

  • modelname (str, optional) – a string representing the name of the model, will be used as a label in plot legends

  • color (3-tuple, optional) – a normalized tuple representing a color in RGB color space, will be used to color line plots

  • filter (str, optional) – this string must be in file’s name for it to be considered as part of the model results

  • model_year (2-tuple of int, optional) – used to shift model times, all model years at model_year[0] are shifted to model_year[1]

ModelResult.derivedVariable(variable_name, …)

Creates a variable from an algebraic expression of variables in the model results.

ModelResult.extractTimeSeries(variable[, …])

Extracts a time series of the given variable from the model.