|
25 | 25 | *****************************************************************************/
|
26 | 26 |
|
27 | 27 | #include <vic_driver_shared_image.h>
|
28 |
| -#include <vic_driver_cesm.h> |
29 | 28 |
|
30 | 29 | /******************************************************************************
|
31 | 30 | * @brief Save model state.
|
32 | 31 | *****************************************************************************/
|
33 | 32 | void
|
34 | 33 | vic_store(dmy_struct *dmy_current,
|
35 |
| - case_metadata *cmeta, |
36 | 34 | char *filename)
|
37 | 35 | {
|
38 | 36 | extern filenames_struct filenames;
|
@@ -76,20 +74,17 @@ vic_store(dmy_struct *dmy_current,
|
76 | 74 | end_time_num = time_num + offset;
|
77 | 75 |
|
78 | 76 | // allocate dmy struct for end of current time step
|
79 |
| - // end_time_date = calloc(1, sizeof(*dmy_struct)); |
80 | 77 | num2date(global_param.time_origin_num, end_time_num, 0.,
|
81 | 78 | global_param.calendar, global_param.time_units,
|
82 | 79 | &end_time_date);
|
83 | 80 |
|
84 |
| - |
85 | 81 | // only open and initialize the netcdf file on the first thread
|
86 | 82 | if (mpi_rank == VIC_MPI_ROOT) {
|
87 | 83 | // create netcdf file for storing model state
|
88 | 84 | sprintf(filename, "%s.%04i%02i%02i_%05u.nc",
|
89 |
| - cmeta->caseid, end_time_date.year, |
| 85 | + filenames.statefile, end_time_date.year, |
90 | 86 | end_time_date.month, end_time_date.day,
|
91 | 87 | end_time_date.dayseconds);
|
92 |
| - |
93 | 88 | initialize_state_file(filename, &nc_state_file, dmy_current);
|
94 | 89 |
|
95 | 90 | debug("writing state file: %s", filename);
|
|
0 commit comments