-
Notifications
You must be signed in to change notification settings - Fork 385
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
Feature/cesm timing #744
Feature/cesm timing #744
Conversation
@@ -160,8 +168,10 @@ vic_cesm_run(vic_clock *vclock) | |||
// if save: | |||
if (vclock->state_flag) { | |||
// write state file | |||
debug("writing state file for timestep %zu", current); |
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.
I forget how this works. Are debug()
statements always written out or only when we specify a certain logging level?
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.
Not always. Only when we specify a certain logging level, and I believe compiling with the debug
flag for an RI case does the same thing, even though we can't do that for an RBR case.
@@ -131,9 +131,6 @@ main(int argc, | |||
// start vic run timer | |||
timer_start(&(global_timers[TIMER_VIC_RUN])); | |||
|
|||
timer_init(&(global_timers[TIMER_VIC_FORCE])); | |||
timer_init(&(global_timers[TIMER_VIC_WRITE])); |
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.
Why do we not have to initialize timers? If that is done as part of timer_start()
, then we can also remove timer_init()
from:
vic/drivers/shared_all/include/vic_driver_shared_all.h
vic/drivers/shared_all/src/timing.c
tests/unit/shared/test_timing.py
(vic_lib.timer_init(timer)
)
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.
Actually timer_init()
is called from timer_start()
, so you do not have to call it separately, but you cannot delete it from the other files as I suggest above, so this should be OK.
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.
We could combine timer_init()
and timer_start()
, but just leave as is for now.
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.
Just to be clear, the reason we have separate timer_init
and timer_start
functions is for the CESM driver case where the vic_cesm_run
function needs to "continue" a previously initialized timer. I don't think the image driver has a use for the separate functions. And yes, timer_start = timer_init + timer_continue
.
I think we want these to stay as separate functions. Mostly so we can
initialize the vic_run timer in vic_init. I used this exact functionality
in my last commit.
|
What would be the use case of running |
@jhamman @bartnijssen the timing tables look good now (for what we're changing in this PR). I'll fix the
|
closes #xxxnew tests addedscience test figuresSee #743 for discussion of what this PR addresses (in part).