Component List for various utilities

Calculator

Component to perform calculations with the variables of other components.

Parameters

Variables

The component will generate a variable for each of the input variables specified in "input_variables" and "output_variables" using the mathematical expressions for the calculation in each time step.

Example:


...

calc = osm.new_component("Calculator","unit_change")
param = {
    "input_variables": ["T = met.temperature", "w = met.abs_humidity"],
    "output_variables": ["T_F","W_kg"],
    "output_units": ["ºF","kg/kg a.s."],
    "output_expressions": ["T * 9/5 + 32", "w / 1000"]
}
calc.set_parameters(param)

Four variables will be created with names: T, w, T_F and W_kg, two from input_variables and two from output_variables.