[cmor] 108/190: 2011-04-27 : fixed file name for climatologies, last bounds was set improperly 2011-04-26 : was setting coordinates attribute multiple times, now first check if the bit we are trying to add is already in

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository cmor.

commit aa964f46418ea22eaaf6589f3160e3aa70d8701d
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date:   Wed Apr 27 16:14:08 2011 -0700

    2011-04-27 : fixed file name for climatologies, last bounds was set improperly
    2011-04-26 : was setting coordinates attribute multiple times, now first check if the bit we are trying to add is already in
---
 RELEASE-NOTES        | 1 +
 Src/cmor_variables.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 8cbb6e7..846498b 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,4 @@
+2011-04-27 : fixed file name for climatologies, last bounds was set improperly
 2011-04-26 : was setting coordinates attribute multiple times, now first check if the bit we are trying to add is already in
 2011-04-11 : releasing 2.5.8
 2011-04-07 : only adding extra time precision in file names if it is < 6hr instead of 1 day
diff --git a/Src/cmor_variables.c b/Src/cmor_variables.c
index f8d8e22..a58c4e8 100644
--- a/Src/cmor_variables.c
+++ b/Src/cmor_variables.c
@@ -1738,7 +1738,7 @@ int cmor_write_var_to_file(int ncid,cmor_var_t *avar,void *data,char itype, int
 	if (avar->ntimes_written==0) {
 	  avar->first_bound=cmor_axes[avar->axes_ids[0]].bounds[starts[0]*2];
 	}
-	avar->last_bound=cmor_axes[avar->axes_ids[0]].bounds[(starts[0]+counts[0])*2];
+	avar->last_bound=cmor_axes[avar->axes_ids[0]].bounds[(starts[0]+counts[0])*2-1];
       }
       else {
 	/* checks wether you need bounds or not */
@@ -1784,7 +1784,7 @@ int cmor_write_var_to_file(int ncid,cmor_var_t *avar,void *data,char itype, int
 	ierr = nc_put_vara_double(ncid,avar->time_bnds_nc_id,starts,counts2,&cmor_axes[avar->axes_ids[0]].bounds[starts[0]*2]);
 	if (ierr != NC_NOERR) {snprintf(msg,CMOR_MAX_STRING,"NCError (%i: %s) writting time bounds values for variable '%s' (table: %s)",ierr,nc_strerror(ierr),avar->id,cmor_tables[avar->ref_table_id].table_id);cmor_handle_error(msg,CMOR_CRITICAL);}
 	avar->first_bound=cmor_axes[avar->axes_ids[0]].bounds[0];
-	avar->last_bound=cmor_axes[avar->axes_ids[0]].bounds[counts[0]*2];
+	avar->last_bound=cmor_axes[avar->axes_ids[0]].bounds[counts[0]*2-1];
       }
       ierr = nc_put_vara_double(ncid,avar->time_nc_id,starts,counts,&cmor_axes[avar->axes_ids[0]].values[starts[0]]);
       if (ierr != NC_NOERR) {snprintf(msg,CMOR_MAX_STRING,"NCError (%i: %s) writting time values for variable '%s' (table: %s)",ierr,nc_strerror(ierr),avar->id,cmor_tables[avar->ref_table_id].table_id);cmor_handle_error(msg,CMOR_CRITICAL);}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cmor.git



More information about the debian-science-commits mailing list