You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
So far, the reasoning has simply been that it seems obvious that the model run will change the atmospheric state. However, I see that one might expect the initial state and the internal model state to be independent.
I think it is fine to just do a deep copy at initialization (this needs to be done for the surface as well). It might actually break scripts of users who have adapted to the current behavior, i.e. expecting the atmosphere to change. But the output files aren't affected, and the change from atmosphere to rce.atmosphere seems doable.
The
RCE
class changes the values of the input atmosphere:konrad/konrad/core.py
Line 409 in 21e6c81
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 theRCE
class:konrad/konrad/core.py
Line 157 in 21e6c81
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.
The text was updated successfully, but these errors were encountered: