Skip to content

Commit

Permalink
Merge pull request #393 from lizaclark/hotfix/output_force
Browse files Browse the repository at this point in the history
Update write_data.c for binary output when OUTPUT_FORCE=TRUE
  • Loading branch information
Joe Hamman committed Mar 17, 2016
2 parents 744fb0a + 1385c1d commit bdd64b5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/write_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ void write_data(out_data_file_struct *out_data_files,
tmp_fptr = (float *)calloc(N_OUTVAR_TYPES*options.Nlayer*options.SNOW_BAND,sizeof(float));
tmp_dptr = (double *)calloc(N_OUTVAR_TYPES*options.Nlayer*options.SNOW_BAND,sizeof(double));

// Time
tmp_iptr[0] = dmy->year;
tmp_iptr[1] = dmy->month;
tmp_iptr[2] = dmy->day;
tmp_iptr[3] = dmy->hour;
if (!options.OUTPUT_FORCE) {

// Time
tmp_iptr[0] = dmy->year;
tmp_iptr[1] = dmy->month;
tmp_iptr[2] = dmy->day;
tmp_iptr[3] = dmy->hour;

}

// Loop over output files
for (file_idx = 0; file_idx < options.Noutfiles; file_idx++) {
Expand Down

0 comments on commit bdd64b5

Please sign in to comment.