Time offset for scheduling output on TimeInterval
#2686
-
Hello, I would like to save average fields every x-seconds. The averages will be computed over a period T (T<=0.5x). Then I would like to also store full fields every x-seconds, but staggered such that I have a full field in the middle of the period over which the average is computed.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
For this application I think you can use For the unaveraged, "centered" fields, there's a few options. One is to provide the second (undocumented) argument to schedule = TimeInterval(600, -60) # assuming that the model starts at t=0. You may also use the If you find the "offset" method useful, we may want to document it (and perhaps clarify the naming of that second property, which is now called If you want to understand how this works in the code, see here: Oceananigans.jl/src/Utils/schedules.jl Lines 17 to 54 in 2234f02 |
Beta Was this translation helpful? Give feedback.
For this application I think you can use
AveragedTimeInterval
as is for the averaged fields.For the unaveraged, "centered" fields, there's a few options. One is to provide the second (undocumented) argument to
TimeInterval
, which allows you to offset the interval:You may also use the
SpecifiedTimes
schedule (for which you explicitly specify all the times where you'd like output).If you find the "offset" method useful, we may want to document it (and perhaps clarify the naming of that second property, which is now called
previous_actuation_time
).If you want to understand how this works in the code, see here:
O…