This module provides the framework for output from Carousel. It is similar to the data layer except output sources are always calculations.

Output Parameter

class carousel.core.outputs.OutputParameter(*args, **kwargs)[source]

Fields for outputs.

  • units – output units
  • init – initial value
  • size – array size
  • isconstant (bool) – constant value flag
  • isproperty (bool) – material property flag
  • timeseries – name of corresponding timeseries output

Output Registry

class carousel.core.outputs.OutputRegistry[source]

A registry for output from calculations.

Output Base

class carousel.core.outputs.OutputBase[source]

Metaclass for outputs.

Setting the __metaclass__ attribute to OutputBase adds the full path to the specified output parameter file as param_file or adds parameters with outputs specified. Also checks that outputs is a subclass of Output. Sets output_path and output_file as the class attributes that specify the parameter file full path.


class carousel.core.outputs.Output[source]

A class for formatting outputs.

Do not use this class directly. Instead subclass it in your output model and list the path and file of the outputs parameters or provide the parameters as class members.

Example of specified output parameter file:

import os

PROJ_PATH = os.path.join('project', 'path')  # project path

class PVPowerOutputs(Output):
    outputs_file = 'pvpower.json'
    outputs_path = os.path.join(PROJ_PATH, 'outputs')

Example of specified output parameters:

class PVPowerOutputs(Output):
    hourly_energy = {'init': 0, 'units': 'Wh', 'size': 8760}
    yearly_energy = {'init': 0, 'units': 'kWh'}