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

Fixed a bug when calculating steps of forcing to skip #639

Merged
merged 2 commits into from
Oct 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/Development/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ To check which release of VIC you are running:

After the fix, the timestamp appeared in the image driver output history filename is the beginning time of the time period in the file.

2. Fixed forceskip rounding bug ([GH#639](https://github.com/UW-Hydro/VIC/pull/639))

After the fix, the `forceskip` variable in the global parameter structure (i.e., the number of timesteps to skip in the forcing data for the simulatin period) is rounded correctly (before the fix, rounding error might cause 1-timestep offset in the simulation results).

------------------------------

## VIC 5.0.0 [![DOI](https://zenodo.org/badge/7766/UW-Hydro/VIC.svg)](https://zenodo.org/badge/latestdoi/7766/UW-Hydro/VIC)
Expand Down
4 changes: 2 additions & 2 deletions vic/drivers/shared_all/src/make_dmy.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ make_dmy(global_param_struct *global)
global->calendar, global->time_units);

global->forceskip[i] =
(unsigned int) ((start_num - force_num) *
(double) param_set.force_steps_per_day[i]);
(unsigned int) round((start_num - force_num) *
(double) param_set.force_steps_per_day[i]);
}
}

Expand Down