Fixed MPI error when initializing state file in vic_store.c - this part
will be updated in a follow-up PR
@@ -64,7 +64,6 @@ vic_store(dmy_struct *dmy_current,
set_nc_state_file_info(&nc_state_file);
- if (mpi_rank == VIC_MPI_ROOT) {
// advance dmy_current by one timestep since dmy_current is the
// timestep-beginning timestamp, and state file date should be
// the end of the current time step
@@ -79,7 +78,6 @@ vic_store(dmy_struct *dmy_current,
global_param.calendar, global_param.time_units,
&end_time_date);
-
// create netcdf file for storing model state
sprintf(filename, "%s.%04i%02i%02i_%05u.nc",
filenames.statefile, end_time_date.year,
@@ -88,6 +86,7 @@ vic_store(dmy_struct *dmy_current,
initialize_state_file(filename, &nc_state_file, dmy_current);
+ if (mpi_rank == VIC_MPI_ROOT) {
debug("writing state file: %s", filename);
}
