restructure cesm interface script to handle state file timestep in accordance with image driver
@@ -138,6 +138,10 @@ vic_cesm_run(vic_clock *vclock)
// Write history files
vic_write_output(&dmy_current);
+ // advance the clock
+ advance_time();
+ assert_time_insync(vlock, &dmy_current);
+
// if save:
if (vclock->state_flag) {
// write state file
@@ -148,10 +152,6 @@ vic_cesm_run(vic_clock *vclock)
// reset x2l fields
initialize_x2l_data();
- // advance the clock
- advance_time();
- assert_time_insync(vclock, &dmy_current);
-
// stop vic run timer
timer_stop(&(global_timers[TIMER_VIC_RUN]));
// stop vic all timer
