Skip to content

move ModelChain.times, weather to ModelChainResult #1164

Closed
@wholmgren

Description

@wholmgren

ModelChain.__init__ sets attributes times and weather to None. The ModelChain.run_* methods store the input weather data on weather and they store the index of the input weather data on times.

The weather data may be a tuple of DataFrames, so times provides convenient access to the common index (other functions enforce the common index requirement) for computing solar position. ModelChain.times is not otherwise used.

I think these attributes should move to ModelChainResults. While it's fair to question if the input weather can be called "results", the bigger picture is that moving the weather/times data to the ModelChainResults object puts all of the mutable data in a single place. The remaining ModelChain attributes would be nominally immutable model specifications. I think that's worth the slight inconsistency in naming.

Discussion started in #1162.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions