diff -r 978f4510987d -r d3122367777b h1_summary2.c --- a/h1_summary2.c Mon Oct 01 15:49:25 2007 -0400 +++ b/h1_summary2.c Wed Oct 03 11:23:02 2007 -0400 @@ -788,7 +788,7 @@ double *tbounds) { int i, j; - float hr[HOURS_PER_DAY]; + float hr[HOURS_PER_DAY], mean_time; struct var *in_vnode, *out_vnode; void *val; @@ -823,6 +823,12 @@ val = read_timeslice(in_ncid, in_vnode->ncvarid, in_vnode->nctype, in_vnode->ndims, in_vnode->dimids, in_dim_idx, ((input_dim_idx[in_vnode->dimids[0]])->len - 1)); if (!strcmp(in_vnode->name, time_bounds_name)) write_timeslice(out_ncid, out_vnode->ncvarid, out_vnode->nctype, in_vnode->ndims, in_vnode->dimids, in_dim_idx, tbounds, 0); + else if (!strcmp(in_vnode->name, time_name)) { + /* force the timestamp to be the + * mean of the time bounds */ + mean_time = (tbounds[0] + tbounds[1]) / 2.0; + write_timeslice(out_ncid, out_vnode->ncvarid, out_vnode->nctype, in_vnode->ndims, in_vnode->dimids, in_dim_idx, &mean_time, 0); + } else write_timeslice(out_ncid, out_vnode->ncvarid, out_vnode->nctype, in_vnode->ndims, in_vnode->dimids, in_dim_idx, val, 0); }