diff --git a/build/source/file_access_actor/file_access_actor.cpp b/build/source/file_access_actor/file_access_actor.cpp index 6b3abf34bced32cc32df684712bc4718eb7f2602..0b2ededc077e37daedb6a79a44ab59cecf87305e 100644 --- a/build/source/file_access_actor/file_access_actor.cpp +++ b/build/source/file_access_actor/file_access_actor.cpp @@ -178,7 +178,7 @@ behavior file_access_actor(stateful_actor<file_access_state>* self, self->state.file_access_timing.updateEndPoint("write_duration"); }, - [=] (write_restart, int gru, int gru_timestep, int gru_checkpoint, int year, int month, int day, int hour){ + [=] (write_restart, int gru, int gru_timestep, int gru_checkpoint, int output_stucture_index, int year, int month, int day, int hour){ // update hru progress vecs int gru_index = abs(self->state.start_gru - gru); self->state.hru_timesteps[gru_index] = gru_timestep; @@ -191,7 +191,7 @@ behavior file_access_actor(stateful_actor<file_access_state>* self, // if the slowest hru is past the ith checkpoint (current threshold) if ( slowest_checkpoint >= (self->state.completed_checkpoints)){// temp for dubuging Output_Partition *output_partition = self->state.output_container->getOutputPartition(gru-1); - writeRestart(self, output_partition, self->state.start_gru, self->state.hru_timesteps.size(), gru_checkpoint, + writeRestart(self, output_partition, self->state.start_gru, self->state.hru_timesteps.size(), output_stucture_index, year, month, day, hour); // update checkpint counter self->state.completed_checkpoints++; diff --git a/build/source/hru_actor/hru_actor.cpp b/build/source/hru_actor/hru_actor.cpp index 56207af968f485d47566f4ad584e31add22d05d9..061e313c773775396f4bb45cc9f592d1f974564a 100644 --- a/build/source/hru_actor/hru_actor.cpp +++ b/build/source/hru_actor/hru_actor.cpp @@ -442,9 +442,10 @@ int Run_HRU(stateful_actor<hru_state>* self) { // send an update to the FAA if (isCheckpoint(self)){ self->state.checkpoint++; + hru_writeRestart(&self->state.indxHRU, &self->state.indxGRU, - &self->state.checkpoint, + &self->state.output_structure_step_index, &self->state.output_structure_step_index, //unused self->state.hru_data, &self->state.err); @@ -454,6 +455,7 @@ int Run_HRU(stateful_actor<hru_state>* self) { self->state.refGRU, self->state.timestep, self->state.checkpoint, + self->state.output_structure_step_index, self->state.currentDate.y, self->state.currentDate.m, self->state.currentDate.d, @@ -471,8 +473,8 @@ bool isCheckpoint(stateful_actor<hru_state>* self){ switch(self->state.restartFrequency){ case 0: // restart not enabled break; - case 1: // hourly, not supported, would need to extract minute info from hru_data - break; + case 1: // every timestep + return true; case 2: // daily if (self->state.startDate.h == self->state.currentDate.h){ return true;