[cmor] 01/05: Upstream release 3.2.7

Alastair McKinstry mckinstry at moszumanska.debian.org
Wed Sep 20 15:21:11 UTC 2017


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

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

commit 8d2a98b8bdc47f1bc3bf30107733fab6a58e0683
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Sep 18 10:06:10 2017 +0100

    Upstream release 3.2.7
---
 INSTALL                            |  4 +--
 Lib/pywrapper.py                   | 23 ++++++++-----
 Makefile.in                        |  6 ++--
 README.md                          |  2 +-
 RELEASE-NOTES                      |  1 +
 Src/cmor.c                         | 14 ++++----
 Test/test_python_joerg_4.py        |  2 +-
 configure                          | 18 +++++-----
 configure.ac                       |  2 +-
 include/cmor.h                     |  2 +-
 include/cmor_locale.h              |  2 +-
 recipes/cmor/build.sh              | 32 ++++++++++++++++++
 recipes/cmor/meta.yaml             | 33 ++++++++++++++++++
 recipes/cmor/meta.yaml.in          | 40 ++++++++++++++++++++++
 recipes/cmor/scripts/activate.sh   | 10 ++++++
 recipes/cmor/scripts/deactivate.sh |  9 +++++
 recipes/conda-envs/cmor.yml        | 69 ++++++++++++++++++++++++++++++++++++++
 17 files changed, 235 insertions(+), 34 deletions(-)

diff --git a/INSTALL b/INSTALL
index 698ccf3..4dfe841 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,6 @@
 INSTALLATION INSTRUCTIONS  
 ------------------------- 
-Climate Model Output Rewriter (CMOR) version 3.2.6 installation instructions.
+Climate Model Output Rewriter (CMOR) version 3.2.7 installation instructions.
 
  
 DOWNLOAD 
@@ -13,7 +13,7 @@ cd CMOR
 
 INSTALLATION
 ------------ 
-CMOR 3.2.6 requires external packages that need to be installed first. 
+CMOR 3.2.7 requires external packages that need to be installed first. 
 It can be compiled/linked against either NetCDF3 or NetCDF4. If you
 decide to go with NetCDF4 be sure to build NetCDF4 with the
  --enable-netcdf-4 option! 
diff --git a/Lib/pywrapper.py b/Lib/pywrapper.py
index 58f4ff0..451c0f2 100644
--- a/Lib/pywrapper.py
+++ b/Lib/pywrapper.py
@@ -1,5 +1,6 @@
 import numpy
 import os
+import warnings
 
 import cmor_const
 import _cmor
@@ -722,16 +723,20 @@ def write(var_id, data, ntimes_passed=None, file_suffix="",
         sh.remove(1)
     while goodshape.count(1) > 0:
         goodshape.remove(1)
+    while goodshape.count(0) > 0:
+        if( len(goodshape) == len(sh)):
+            index = goodshape.index(0)
+            del sh[index]
+            del goodshape[index]
+        else:  # assume time==1 was removed
+            goodshape.remove(0)
+
     for i in range(len(goodshape)):
-        if goodshape[i] != 0:
-            if sh[j] != goodshape[i]:
-                if goodshape[i] != 1:
-                    raise Exception(
-                        "Error: your data shape (%s) does not match the expected variable shape (%s)\nCheck your variable dimensions before caling cmor_write" %
-                        (str(osh), str(ogoodshape)))
-            j += 1
-        else:
-            j += 1
+        if sh[j] != goodshape[i]:
+            if goodshape[i] != 1:
+                msg = "Error: your data shape (%s) does not match the expected variable shape (%s)\nCheck your variable dimensions before caling cmor_write" % (str(osh), str(ogoodshape))
+                warnings.warn(msg)
+        j += 1
 
     data = numpy.ascontiguousarray(numpy.ravel(data))
 
diff --git a/Makefile.in b/Makefile.in
index 2b1dde5..636650a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -179,16 +179,16 @@ test_python: python
 	env TEST_NAME=Test/test_python_memory_check.py make test_a_python
 	env TEST_NAME=Test/test_python_open_close_cmor_multiple.py make test_a_python
 	env TEST_NAME=Test/test_python_jamie_7.py make test_a_python
-	env TEST_NAME=Test/test_python_joerg_1.py make test_a_python
+#	env TEST_NAME=Test/test_python_joerg_1.py make test_a_python
 	env TEST_NAME=Test/test_python_joerg_2.py make test_a_python
 	env TEST_NAME=Test/test_python_joerg_3.py make test_a_python
-	@env TEST_NAME=Test/test_python_joerg_4.py make test_a_python
+#	env TEST_NAME=Test/test_python_joerg_4.py make test_a_python
 	env TEST_NAME=Test/test_python_joerg_5.py make test_a_python
 	env TEST_NAME=Test/test_python_joerg_6.py make test_a_python
 	env TEST_NAME=Test/test_python_joerg_7.py make test_a_python
 	env TEST_NAME=Test/test_python_joerg_8.py make test_a_python
 #	@env TEST_NAME=Test/test_python_joerg_9.py make test_a_python
-	env TEST_NAME=Test/test_python_joerg_10.py make test_a_python
+#	env TEST_NAME=Test/test_python_joerg_10.py make test_a_python
 	env TEST_NAME=Test/test_python_joerg_11.py make test_a_python
 	env TEST_NAME=Test/test_python_joerg_12.py make test_a_python
 	env TEST_NAME=Test/test_python_YYYMMDDHH_exp_fmt.py make test_a_python
diff --git a/README.md b/README.md
index 6f18568..066dc11 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ CMOR 3.2 documentation can be found here: http://cmor.llnl.gov
 
 
 [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.827366.svg)](https://doi.org/10.5281/zenodo.827366)
-[![stable version](https://img.shields.io/badge/stable%20version-3.2.6-brightgreen.svg)](https://github.com/PCMDI/cmor/releases/tag/3.2.6)
+[![stable version](https://img.shields.io/badge/stable%20version-3.2.7-brightgreen.svg)](https://github.com/PCMDI/cmor/releases/tag/3.2.7)
 ![platforms](https://img.shields.io/badge/platforms-linux%20|%20osx-lightgrey.svg)
 [![Anaconda-Server Badge](https://anaconda.org/pcmdi/cmor/badges/installer/conda.svg)](https://conda.anaconda.org/pcmdi)
 [![Anaconda-Server Badge](https://anaconda.org/pcmdi/cmor/badges/downloads.svg)](https://anaconda.org/pcmdi)
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 2e3f155..b489920 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,4 @@
+2018-09-14 : Release 3.2.7
 2018-08-31 : Release 3.2.6
 2017-00-00 : Release 3.2.5
 2017-06-16 : Release 3.2.4
diff --git a/Src/cmor.c b/Src/cmor.c
index ad161f2..afb0827 100644
--- a/Src/cmor.c
+++ b/Src/cmor.c
@@ -2664,9 +2664,14 @@ int cmor_setGblAttr(int var_id)
     if (did_history == 0) {
         snprintf(ctmp, CMOR_MAX_STRING,
                  "%s CMOR rewrote data to be consistent with CF standards"
-                 " and %s requirements.", msg,
-                 cmor_tables[nVarRefTblID].mip_era);
-
+                 , msg);
+        if (cmor_has_cur_dataset_attribute(GLOBAL_IS_CMIP6) == 0) {
+            char CMIP6msg[CMOR_MAX_STRING];
+            snprintf(CMIP6msg, CMOR_MAX_STRING, " and %s requirements",
+                    cmor_tables[nVarRefTblID].mip_era);
+            strcat(ctmp, CMIP6msg);
+        }
+        strcat(ctmp,".");
         if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_HISTORY) == 0) {
             cmor_get_cur_dataset_attribute(GLOBAL_ATT_HISTORY, msg);
             snprintf(ctmp2, CMOR_MAX_STRING, "%s ; %s", msg, ctmp);
@@ -5825,9 +5830,6 @@ int cmor_close_variable(int var_id, char *file_name, int *preserve)
     cdCalenType icalo;
     cdCompTime starttime, endtime;
     int i, j, n;
-    // struct stat buf;
-    // off_t sz;
-    // long maxsz = (long)pow(2, 32) - 1;
 
     cmor_add_traceback("cmor_close_variable");
     cmor_is_setup();
diff --git a/Test/test_python_joerg_4.py b/Test/test_python_joerg_4.py
index 205aff2..daf75ec 100644
--- a/Test/test_python_joerg_4.py
+++ b/Test/test_python_joerg_4.py
@@ -55,7 +55,7 @@ except BaseException:
 var3d_ids = cmor.variable(
     table_entry='co3',
     units='mol m-3',
-    axis_ids=numpy.array((ilon, ilat, itim)),
+    axis_ids=numpy.array([ilon, ilat, itim]),
     missing_value=numpy.array([1.0e28, ], dtype=numpy.float32)[0],
     original_name='cloud')
 
diff --git a/configure b/configure
index e4e353b..43a4fb6 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.69 for cmor 3.2.6.
+# Generated by GNU Autoconf 2.69 for cmor 3.2.7.
 #
 # Report bugs to <nadeau1 at llnl.gov>.
 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='cmor'
 PACKAGE_TARNAME='cmor'
-PACKAGE_VERSION='3.2.6'
-PACKAGE_STRING='cmor 3.2.6'
+PACKAGE_VERSION='3.2.7'
+PACKAGE_STRING='cmor 3.2.7'
 PACKAGE_BUGREPORT='nadeau1 at llnl.gov'
 PACKAGE_URL=''
 
@@ -1261,7 +1261,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 3.2.6 to adapt to many kinds of systems.
+\`configure' configures cmor 3.2.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1328,7 +1328,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cmor 3.2.6:";;
+     short | recursive ) echo "Configuration of cmor 3.2.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1430,7 +1430,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cmor configure 3.2.6
+cmor configure 3.2.7
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1648,7 +1648,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 3.2.6, which was
+It was created by cmor $as_me 3.2.7, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4982,7 +4982,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 3.2.6, which was
+This file was extended by cmor $as_me 3.2.7, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5035,7 +5035,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-cmor config.status 3.2.6
+cmor config.status 3.2.7
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index e1bf230..43c9486 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl
 dnl Process this file with autoconf to produce a configure script.
 
 dnl AC_PREREQ(2.59)
-AC_INIT(cmor, 3.2.6, nadeau1 at llnl.gov)
+AC_INIT(cmor, 3.2.7, nadeau1 at llnl.gov)
 
 GIT_TAG=`./get_git_version.sh`
 
diff --git a/include/cmor.h b/include/cmor.h
index be68ca3..fa03058 100644
--- a/include/cmor.h
+++ b/include/cmor.h
@@ -3,7 +3,7 @@
 
 #define CMOR_VERSION_MAJOR 3
 #define CMOR_VERSION_MINOR 2
-#define CMOR_VERSION_PATCH 6
+#define CMOR_VERSION_PATCH 7
 
 #define CMOR_CF_VERSION_MAJOR 1
 #define CMOR_CF_VERSION_MINOR 6
diff --git a/include/cmor_locale.h b/include/cmor_locale.h
index c1f828d..afcdf79 100644
--- a/include/cmor_locale.h
+++ b/include/cmor_locale.h
@@ -1,4 +1,4 @@
 #ifndef _CMOR_LOCALE
 #define _CMOR_LOCALE
-#define CMOR_PREFIX  "/software/anaconda2/envs/cmor3"
+#define CMOR_PREFIX  "/software/anaconda2/envs/cmor3.2.6"
 #endif
diff --git a/recipes/cmor/build.sh b/recipes/cmor/build.sh
new file mode 100644
index 0000000..a517043
--- /dev/null
+++ b/recipes/cmor/build.sh
@@ -0,0 +1,32 @@
+export CFLAGS="-Wall -g -m64 -pipe -O2  -fPIC"
+export CXXLAGS="${CFLAGS}"
+export CPPFLAGS="-I${PREFIX}/include"
+export LDFLAGS="-L${PREFIX}/lib"
+CONDA_LST=`conda list`
+if [[ ${CONDA_LST}'y' == *'openmpi'* ]]; then
+    export CC=mpicc
+    export CXX=mpicxx
+    export LC_RPATH="${PREFIX}/lib"
+    export DYLD_FALLBACK_LIBRARY_PATH=${PREFIX}/lib
+fi
+
+
+./configure \
+    --with-python=${PREFIX}   \
+    --with-uuid=${PREFIX} \
+    --with-udunits2=${PREFIX} \
+    --with-netcdf=${PREFIX} \
+    --with-libjson-c=${PREFIX} \
+    --prefix=${PREFIX}
+make
+make install
+# Make sure CMOR UDNITS2 env is still present in the package
+ACTIVATE_DIR=$PREFIX/etc/conda/activate.d
+DEACTIVATE_DIR=$PREFIX/etc/conda/deactivate.d
+mkdir -p $ACTIVATE_DIR
+mkdir -p $DEACTIVATE_DIR
+
+cp $RECIPE_DIR/scripts/activate.sh $ACTIVATE_DIR/cmor-activate.sh
+cp $RECIPE_DIR/scripts/deactivate.sh $DEACTIVATE_DIR/cmor-deactivate.sh
+## END BUILD
+
diff --git a/recipes/cmor/meta.yaml b/recipes/cmor/meta.yaml
new file mode 100644
index 0000000..b1aa178
--- /dev/null
+++ b/recipes/cmor/meta.yaml
@@ -0,0 +1,33 @@
+package:
+    name: cmor
+    version: 3.2.7
+
+source:
+    git_rev: master
+    git_url: git://github.com/PCMDI/cmor.git
+
+build:
+  number: 0
+
+requirements:
+  build:
+    - python
+    - ossuuid 1.6.2
+    - udunits2
+    - hdf5 1.8.18
+    - libnetcdf  4.4.*
+    - numpy x.x
+    - gcc [osx]
+  run:
+    - python
+    - ossuuid 1.6.2
+    - udunits2
+    - libnetcdf 4.4.*
+    - numpy x.x
+    - cdms2
+    - libgcc [osx]
+    - hdf5 1.8.18
+
+about:
+    home:  http://gitub.com/PCMDI
+
diff --git a/recipes/cmor/meta.yaml.in b/recipes/cmor/meta.yaml.in
new file mode 100644
index 0000000..b7bb952
--- /dev/null
+++ b/recipes/cmor/meta.yaml.in
@@ -0,0 +1,40 @@
+package:
+    name: cmor
+    version: @VERSION@
+
+source:
+    git_rev: @UVCDAT_BRANCH@
+    git_url: git://github.com/PCMDI/cmor.git
+
+build:
+  number: @BUILD_NUMBER@
+
+test:
+  requires:
+    - python
+    - gcc [osx]
+  imports:
+    - cmor
+
+requirements:
+  build:
+    - python
+    - ossuuid 1.6.2
+    - udunits2
+    - hdf5 1.8.17
+    - libnetcdf 4.4.1
+    - numpy x.x
+    - gcc [osx]
+  run:
+    - python
+    - ossuuid 1.6.2
+    - udunits2
+    - libnetcdf 4.4.1
+    - numpy x.x
+    - cdms2
+    - gcc [osx]
+    - hdf5 1.8.17
+
+about:
+    home:  http://gitub.com/PCMDI
+
diff --git a/recipes/cmor/scripts/activate.sh b/recipes/cmor/scripts/activate.sh
new file mode 100755
index 0000000..22db373
--- /dev/null
+++ b/recipes/cmor/scripts/activate.sh
@@ -0,0 +1,10 @@
+#!/bin/bash -x
+
+# Store existing UDUNITS2 env vars and set to this conda env
+# so other CMOR installs don't pollute the environment
+
+if [[ -n "$UDUNITS2_XML_PATH" ]]; then
+    export _CONDA_SET_UDUNITS2_XML_PATH=${UDUNITS2_XML_PATH}
+fi
+export UDUNITS2_XML_PATH=${CONDA_PREFIX}/share/udunits/udunits2.xml
+
diff --git a/recipes/cmor/scripts/deactivate.sh b/recipes/cmor/scripts/deactivate.sh
new file mode 100755
index 0000000..a2463b1
--- /dev/null
+++ b/recipes/cmor/scripts/deactivate.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+# Restore previous CMOR env vars if they were set
+
+unset UDUNITS2_XML_PATH
+if [[ -n "$_CONDA_SET_UDUNITS2_XML_PATH" ]]; then
+    export UDUNITS2_XML_PATH=${_CONDA_SET_UDUNITS2_XML_PATH}
+    unset _CONDA_SET_UDUNITS2_XML_PATH
+fi
+
diff --git a/recipes/conda-envs/cmor.yml b/recipes/conda-envs/cmor.yml
new file mode 100644
index 0000000..84febb7
--- /dev/null
+++ b/recipes/conda-envs/cmor.yml
@@ -0,0 +1,69 @@
+name: cmor3.2.6
+channels:
+- conda-forge
+- pcmdi
+- uvcdat
+- !!python/unicode
+  'defaults'
+dependencies:
+- conda-forge::asn1crypto=0.22.0=py27_0
+- conda-forge::ca-certificates=2017.7.27.1=0
+- conda-forge::cdat_info=2.12=py27_1
+- conda-forge::cdms2=2.12=np113py27_0
+- conda-forge::cdtime=2.12=np113py27_2
+- conda-forge::certifi=2017.7.27.1=py27_0
+- conda-forge::cffi=1.10.0=py27_0
+- conda-forge::chardet=3.0.4=py27_0
+- conda-forge::clapack=3.2.1=0
+- conda-forge::cryptography=2.0.3=py27_0
+- conda-forge::curl=7.54.1=0
+- conda-forge::distarray=2.12=py27_0
+- conda-forge::enum34=1.1.6=py27_1
+- conda-forge::esmf=7.0.0=6
+- conda-forge::esmpy=7.0.0=py27_1
+- conda-forge::expat=2.2.1=0
+- conda-forge::future=0.16.0=py27_0
+- conda-forge::g2clib=1.6.0=3
+- conda-forge::hdf4=4.2.12=0
+- conda-forge::hdf5=1.8.17=11
+- conda-forge::idna=2.5=py27_0
+- conda-forge::ipaddress=1.0.18=py27_0
+- conda-forge::jasper=1.900.1=4
+- conda-forge::jpeg=9b=0
+- conda-forge::krb5=1.14.2=0
+- conda-forge::lapack=3.6.1=1
+- conda-forge::libcdms=2.10=2
+- conda-forge::libcf=1.0.1=py27_0
+- conda-forge::libdrs=2.12=0
+- conda-forge::libdrs_f=2.12=1
+- conda-forge::libffi=3.2.1=3
+- conda-forge::libnetcdf=4.4.1.1=4
+- conda-forge::libpng=1.6.28=0
+- conda-forge::libssh2=1.8.0=1
+- conda-forge::libtiff=4.0.6=7
+- conda-forge::mpich=3.2=4
+- conda-forge::ncurses=5.9=10
+- conda-forge::netcdf-fortran=4.4.4=3
+- conda-forge::openssl=1.0.2l=0
+- conda-forge::ossuuid=1.6.2=0
+- conda-forge::pycparser=2.18=py27_0
+- conda-forge::pyopenssl=17.2.0=py27_0
+- conda-forge::pysocks=1.6.7=py27_0
+- conda-forge::python=2.7.13=1
+- conda-forge::readline=6.2=0
+- conda-forge::requests=2.18.4=py27_1
+- conda-forge::setuptools=36.3.0=py27_0
+- conda-forge::six=1.10.0=py27_1
+- conda-forge::sqlite=3.13.0=1
+- conda-forge::tk=8.5.19=2
+- conda-forge::udunits2=2.2.23=0
+- conda-forge::urllib3=1.22=py27_0
+- conda-forge::xz=5.2.3=0
+- conda-forge::zlib=1.2.11=0
+- libgcc=5.2.0=0
+- libgfortran=3.0.0=1
+- mkl=2017.0.3=0
+- numpy=1.13.1=py27_0
+- pcmdi::cmor=3.2.6=np113py27_0
+prefix: /software/anaconda2/envs/cmor3.2.6
+

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