Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ice_calendar: fix hourly outputs with 'histfreq_n /= 1'
In b720380 (Update Time Manager (CICE-Consortium#566), 2021-03-16), the computation of 'elapsed_hours' in ice_calendar::calendar was changed from elapsed_hours = int(ttime/3600) to elapsed_hours = elapsed_days * hours_per_day In the previous version, 'ttime' held the total number of seconds since the beginning of the run, such that 'elapsed_hours' correctly held the number of elapsed hours since the beginning of the run. Howeve, the new computation is incorrect; it does not take into account the hours elapsed into the current date, nor the fact that the run may have started at a different time than 00:00. This in turn leads to hourly outputs being written each hour even if 'histfreq_n /= 1'. Fix the computation.
- Loading branch information