Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on invalid time interval + time window combinations for AveragedTimeInterval #1288

Closed
sandreza opened this issue Jan 5, 2021 · 1 comment
Labels
cleanup 🧹 Paying off technical debt feature 🌟 Something new and shiny testing 🧪 Tests get priority in case of emergency evacuation

Comments

@sandreza
Copy link
Collaborator

sandreza commented Jan 5, 2021

For

 schedule = AveragedTimeInterval(a, window=b)

It must be the case that a > b. If a = b or a < b the end result will produce NaNs.

@sandreza sandreza added feature 🌟 Something new and shiny cleanup 🧹 Paying off technical debt testing 🧪 Tests get priority in case of emergency evacuation labels Jan 5, 2021
@glwagner glwagner changed the title Error Message to AveragedTimeInterval Error on invalid time interval + time window combinations for AveragedTimeInterval Jan 7, 2021
@glwagner
Copy link
Member

julia> AveragedTimeInterval(1, window=2)
ERROR: ArgumentError: Averaging window 2 is greater than the output interval 1.
Stacktrace:
 [1] #AveragedTimeInterval#19
   @ ~/.julia/packages/Oceananigans/tqmFU/src/OutputWriters/windowed_time_average.jl:85 [inlined]
 [2] top-level scope
   @ REPL[6]:1
 [3] top-level scope
   @ ~/.julia/packages/CUDA/BbliS/src/initialization.jl:52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup 🧹 Paying off technical debt feature 🌟 Something new and shiny testing 🧪 Tests get priority in case of emergency evacuation
Projects
None yet
Development

No branches or pull requests

2 participants