-
Notifications
You must be signed in to change notification settings - Fork 191
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
Allow for DateTime
clocks
#632
Conversation
I agree that something like this would be pretty convenient. |
Codecov Report
@@ Coverage Diff @@
## master #632 +/- ##
==========================================
+ Coverage 78.03% 78.16% +0.12%
==========================================
Files 118 118
Lines 2363 2395 +32
==========================================
+ Hits 1844 1872 +28
- Misses 519 523 +4
Continue to review full report at Codecov.
|
So I modified this PR to support more general Oceananigans does not need to depend on TimesDates.jl but I added it as a test dependency so we can make sure |
clock.iteration += 1 | ||
return nothing | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could also call this “tick!” But looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
Should be useful for LESbrary simulations whose states might actually have an associated date and time from the real world.
But I'm not sure if we should merge this PR as
DateTime
fromBase.Dates
only has millisecond precision so you could get small errors in actualmodel.clock.time
after many iterations (LESbrary simulations will probably run for millions of iterations).Two small packages that might help us here
https://github.com/JeffreySarnoff/TimesDates.jl
https://github.com/FugroRoames/Chrono.jl