You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Potential solution:
use a different mechanism for internally storing current time, either
a higher-precision Float64
an integer, either number of time steps or number of seconds (or equivalently using a DateTime object, which internally uses milliseconds since an epoch)
From Tapio: Standard solution is to use an integer step counter j, then write output every n steps. Of course, this only works with constant dt, but every climate model I know has that anyway.
The text was updated successfully, but these errors were encountered:
Standard solution: Specify start time tstart (in seconds since epoch, e.g., obtained from DateTime object), end time tend, and timestep dt. Calculate number of integer time steps needed to get from tstart to tend. Write output every n steps. Increment step counter jstep and calculate time at jstep as tstart + jstep * dt.
When using float32, there may be roundoff errors in model time, which could cause problems. For example:
Potential solution:
use a different mechanism for internally storing current time, either
From Tapio: Standard solution is to use an integer step counter j, then write output every n steps. Of course, this only works with constant dt, but every climate model I know has that anyway.
The text was updated successfully, but these errors were encountered: