[cmor] 44/190: 2010-08-24 : when writing time only variables, the time_bnds would fail to write if passed at cmor_write time.

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:35 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 56b5ddc80ee3a4b841fd3b6d81838ead735aaa45
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date:   Tue Aug 24 12:19:38 2010 -0700

    2010-08-24 : when writing time only variables, the time_bnds would fail to write if passed at cmor_write time.
---
 RELEASE-NOTES        | 1 +
 Src/cmor_variables.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index a9f7531..910bc69 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,4 @@
+2010-08-24 : when writing time only variables, the time_bnds would fail to write if passed at cmor_write time.
 2010-08-23 : tagging 2.2
 2010-08-23 : DRS was wrongly constructed for table Oclim
 2010-08-23 : tagging 2.1
diff --git a/Src/cmor_variables.c b/Src/cmor_variables.c
index f38be43..d48ee0c 100644
--- a/Src/cmor_variables.c
+++ b/Src/cmor_variables.c
@@ -1480,9 +1480,9 @@ int cmor_write_var_to_file(int ncid,cmor_var_t *avar,void *data,char itype, int
       }
       
       if (time_bounds!=NULL) {
-	
 	counts2[0]=counts[0];
 	counts2[1]=2;
+	starts[1]=0;
 	cmor_get_axis_attribute(avar->axes_ids[0],"units",'c',&msg);
 	cmor_get_cur_dataset_attribute("calendar",msg2);
 	
@@ -1592,6 +1592,7 @@ int cmor_write_var_to_file(int ncid,cmor_var_t *avar,void *data,char itype, int
 	/* ok at that stage the recentering must already be done so we just need to write the bounds */
 	counts2[0]=counts[0];
 	counts2[1]=2;
+	starts[1]=0;
 	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) writting time bounds values for variable '%s'",ierr,avar->id);cmor_handle_error(msg,CMOR_CRITICAL);}
 	/* /\* ok we need to store first and last bounds *\/ */

-- 
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