ClimaLand.jl icon indicating copy to clipboard operation
ClimaLand.jl copied to clipboard

Add `save_init` flag to SavingCallback

Open juliasloan25 opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. We have implemented a saving callback, NonInterpSavingCallback, which saves the cache state p at the end of each timestep. The callback currently saves the state of p at the beginning of the simulation (before the first timestep). This information isn't really valuable since it's just the value we set p to in initialize.

Describe the solution you'd like We should add a flag save_init::Bool to the NonInterpSavingCallback function to make this initial save optional. Perhaps we could make the default false since this behavior is probably not usually desired. We also need to update the usage of NonInterpSavingCallback, and decrease the length by one of the saved_values array it fills in.

Along the way Investigate if the value of p returned by the callback is consistent with what we would get from running update_aux(p, Y, t) for the value of Y at that time t.

juliasloan25 avatar Jun 15 '23 18:06 juliasloan25