[cmor] 93/190: 2011-02-25 : fixed bug for dims of length one where bounds needed to be flliped, it used to raise an unwarranted error
Alastair McKinstry
mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:41 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 d46de257ac87a4176242f416cffc5a29c9cf591b
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date: Fri Feb 25 08:07:25 2011 -0800
2011-02-25 : fixed bug for dims of length one where bounds needed to be flliped, it used to raise an unwarranted error
---
RELEASE-NOTES | 2 ++
Src/cmor_axes.c | 12 +++++++++---
configure | 18 +++++++++---------
configure.ac | 2 +-
include/cmor.h | 2 +-
5 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 6087f4d..e25ae6e 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,5 @@
+2011-02-25 : releasing 2.5.7
+2011-02-25 : fixed bug for dims of length one where bounds needed to be flliped, it used to raise an unwarranted error
2011-02-23 : releasing 2.5.6
2011-02-23 : got cmor_set_variable_attribute to actually do something and not raise error all the time, thx to Larry Solheim to spot this.
2011-02-23 : fixed issue when writing 1 time step at a time for climatological means, issue could led to seg fault and bad final file names, thx to Koji Ogochi to spot this one.
diff --git a/Src/cmor_axes.c b/Src/cmor_axes.c
index 7d30999..325052f 100644
--- a/Src/cmor_axes.c
+++ b/Src/cmor_axes.c
@@ -305,7 +305,7 @@ int cmor_check_monotonic(double *values,int length, char *name,int isbounds, int
int mono;
int nloop;
double *values2,tmp;
-/* for (i=0;i<length;i++) printf("in monotonic: %i, %lf, %i\n",i,values[i],isbounds); */
+ /* for (i=0;i<length;i++) printf("in monotonic: %i, %lf, %i\n",i,values[i],isbounds); */
cmor_add_traceback("cmor_check_monotonic");
refaxis = &cmor_tables[cmor_axes[axis_id].ref_table_id].axes[cmor_axes[axis_id].ref_axis_id];
@@ -387,7 +387,8 @@ int cmor_check_monotonic(double *values,int length, char *name,int isbounds, int
free(values2);
/* stored_direction*/
- /* printf("------length: %i, storeddir: %c, vlue-1, vlaue0: %lf and %lf\n",length,refaxis->stored_direction,values[length-1],values[0]); */
+ /* printf("------length: %i, storeddir: %c, vlue-1, vlaue0: %lf and %lf\n",length,refaxis->stored_direction,values[length-1],values[0]); */
+
if ((length>1) && (((refaxis->stored_direction=='i') && (values[length-1]<values[0])) || ((refaxis->stored_direction=='d') && (values[0]<values[length-1])))) { /* need to flip that axis */
if (cmor_axes[axis_id].revert==1) {
snprintf(msg,CMOR_MAX_STRING, "bounds of axis %s (table: %s) need to be flipped but axis values did not need to. This is inconsistent",name,cmor_tables[cmor_axes[axis_id].ref_table_id].table_id);
@@ -713,8 +714,10 @@ int cmor_treat_axis_values(int axis_id, double *values, int length, int n_reques
/* stored_direction*/
if ((length>1) && (((refaxis->stored_direction=='i') && (values[length-1]<values[0])) || ((refaxis->stored_direction=='d') && (values[0]<values[length-1])))) { /* need to flip that axis */
if ((isbounds==1) && (axis->revert==1)) {
+ if (length>2) {
snprintf(msg,CMOR_MAX_STRING, "bounds of axis %s (table: %s) need to be flipped but axis values did not need to. This is inconsistent",name,cmor_tables[cmor_axes[axis_id].ref_table_id].table_id);
cmor_handle_error(msg,CMOR_CRITICAL);
+ }
}
axis->revert=-1;
for (i=0;i<length/2;i++) {
@@ -1164,7 +1167,7 @@ int cmor_axis(int *axis_id, char *name,char *units, int length,void *coord_vals,
snprintf(msg,CMOR_MAX_STRING,"axis: %s (table: %s) converting to \"standard_hybrid_sigma\" from unknown type: %s",cmor_axes[cmor_naxes].id,cmor_tables[CMOR_TABLE].table_id,name);
cmor_handle_error(msg,CMOR_CRITICAL);
}
- printf("yep we are copnverting to: %s\n",refaxis.convert_to);
+ /* printf("yep we are copnverting to: %s\n",refaxis.convert_to); */
ierr = cmor_axis(axis_id,refaxis.convert_to,units,length,coord_vals,type,cell_bounds,cell_bounds_ndim,interval);
cmor_axes[cmor_naxes].hybrid_in=i;
cmor_axes[cmor_naxes].hybrid_out=1;
@@ -1262,7 +1265,9 @@ int cmor_axis(int *axis_id, char *name,char *units, int length,void *coord_vals,
return 0;
}
+ /* printf("Ok is this the problematic place?\n"); */
ierr = cmor_treat_axis_values(cmor_naxes, &cmor_axes[cmor_naxes].values[0],length,refaxis.n_requested, units, name, 0 );
+ /* printf("nope\n"); */
/* puts bounds on 2d array */
if ((cell_bounds!=NULL) && (cell_bounds_ndim!=0)) {
cmor_axes[cmor_naxes].bounds=malloc(2*length*sizeof(double));
@@ -1286,6 +1291,7 @@ int cmor_axis(int *axis_id, char *name,char *units, int length,void *coord_vals,
}
/* for (i=0;i<length;i++) printf("bounds: %i -> %lf,%lf\n",i,cmor_axes[cmor_naxes].bounds[2*i],cmor_axes[cmor_naxes].bounds[2*i+1]); */
ierr = cmor_treat_axis_values(cmor_naxes, &cmor_axes[cmor_naxes].bounds[0],2*length,0,units, name, 1 );
+ /* printf("nope again\n"); */
/* At this point we are checking that the axis values are within bounds */
/* for (i=0;i<length;i++) printf("check bounds: %i -> %lf,%lf,%lf\n",i,cmor_axes[cmor_naxes].bounds[2*i],cmor_axes[cmor_naxes].values[i],cmor_axes[cmor_naxes].bounds[2*i+1]); */
ierr = cmor_check_values_inside_bounds(&cmor_axes[cmor_naxes].values[0],&cmor_axes[cmor_naxes].bounds[0], length, name);
diff --git a/configure b/configure
index 52270e5..8e511d1 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for cmor 2.5.5.
+# Generated by GNU Autoconf 2.61 for cmor 2.5.7.
#
# Report bugs to <doutriaux1 at llnl.gov>.
#
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='cmor'
PACKAGE_TARNAME='cmor'
-PACKAGE_VERSION='2.5.5'
-PACKAGE_STRING='cmor 2.5.5'
+PACKAGE_VERSION='2.5.7'
+PACKAGE_STRING='cmor 2.5.7'
PACKAGE_BUGREPORT='doutriaux1 at llnl.gov'
ac_default_prefix=/usr/local/cmor
@@ -1185,7 +1185,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures cmor 2.5.5 to adapt to many kinds of systems.
+\`configure' configures cmor 2.5.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1251,7 +1251,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of cmor 2.5.5:";;
+ short | recursive ) echo "Configuration of cmor 2.5.7:";;
esac
cat <<\_ACEOF
@@ -1350,7 +1350,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-cmor configure 2.5.5
+cmor configure 2.5.7
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1364,7 +1364,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by cmor $as_me 2.5.5, which was
+It was created by cmor $as_me 2.5.7, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -4989,7 +4989,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by cmor $as_me 2.5.5, which was
+This file was extended by cmor $as_me 2.5.7, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5032,7 +5032,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-cmor config.status 2.5.5
+cmor config.status 2.5.7
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index f6775c8..4f07e05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script.
dnl AC_PREREQ(2.59)
-AC_INIT(cmor, 2.5.5, doutriaux1 at llnl.gov)
+AC_INIT(cmor, 2.5.7, doutriaux1 at llnl.gov)
GIT_TAG=`./get_git_version.sh`
diff --git a/include/cmor.h b/include/cmor.h
index 0c27ac2..0b1790e 100644
--- a/include/cmor.h
+++ b/include/cmor.h
@@ -3,7 +3,7 @@
#define CMOR_VERSION_MAJOR 2
#define CMOR_VERSION_MINOR 5
-#define CMOR_VERSION_PATCH 6
+#define CMOR_VERSION_PATCH 7
#define CMOR_CF_VERSION_MAJOR 1
#define CMOR_CF_VERSION_MINOR 4
--
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