Skip to content

RCE class modifies input atmosphere #224

Description

@olemke

The RCE class changes the values of the input atmosphere:

self.atmosphere["T"] += self.radiation["net_htngrt"] * self.timestep_days

This can have unexpected side effects if a user wants to do several RCE runs (even with newly created RCE instances) consecutively with the same input atmosphere.

To prevent side effects, it would be preferable to make a deepcopy of the input atmosphere when initializing the RCE class:

self.atmosphere = atmosphere

If this is not desirable for other reasons, the documentation of the atmosphere parameter should at least contain a clear warning that this class will modify the input variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions