Closed Sbozzolo closed 1 month ago
LGTM. I think that this is more along the lines of how the functional version will look, too, if/when we change over to using LazyBroadcast.jl.
Yes, I agree, and I don't know why I didn't think about this earlier
Yes, I agree, and I don't know why I didn't think about this earlier
This was kind of my related concern with the deepcopy (I forget which repo/PR it was from).
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 85.19%. Comparing base (
57d2261
) to head (19437cd
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Prior to this version,
ClimaDiagnostics
would directly store use the output returned bycompute!
functions the first time they are called. This leads to problems when the output is a reference to an existing object since multiple diagnostics would modify the same object. Now,ClimaDiagnostics
makes a copy of the return object so that it is no longer necessary to do so in thecompute!
function.Fixes problem found by @szy21 with radiation