From 76bff04246bedf77ace2d964d853f7725a9a93fa Mon Sep 17 00:00:00 2001 From: Klaus Wyser Date: Thu, 26 Mar 2026 11:02:16 +0100 Subject: [PATCH] address #876 and #872 - fix errors related to newer version of python, numpy, cmor,... - change URL for submodule for CMIP7 tables --- .gitmodules | 2 +- ece2cmor3/cmor_utils.py | 2 +- environment.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index a7356800..9d8e1963 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,4 +3,4 @@ url = https://github.com/PCMDI/cmip6-cmor-tables.git [submodule "ece2cmor3/resources/cmip7-cmor-tables"] path = ece2cmor3/resources/cmip7-cmor-tables - url = git@github.com:WCRP-CMIP/cmip7-cmor-tables.git + url = https://github.com/WCRP-CMIP/cmip7-cmor-tables.git diff --git a/ece2cmor3/cmor_utils.py b/ece2cmor3/cmor_utils.py index 03a2d894..57e9039c 100644 --- a/ece2cmor3/cmor_utils.py +++ b/ece2cmor3/cmor_utils.py @@ -452,7 +452,7 @@ def apply_mask(array, factor, term, mask, missval_in, missval_out): if mask is not None: numpy.putmask(array, numpy.broadcast_to(numpy.logical_not(mask), array.shape), new_miss_val) if factor != 1.0 or term != 0.0: - numpy.putmask(array, array != new_miss_val, factor * array + term) + numpy.putmask(array, array != new_miss_val, numpy.float32(factor * array + term)) return array diff --git a/environment.yml b/environment.yml index e21c8b74..87af2656 100644 --- a/environment.yml +++ b/environment.yml @@ -42,7 +42,7 @@ dependencies: - pip # - pyngl # See #862, #828 & #&31 - pytest - - python + - python<3.14 - python-cdo - python-eccodes - python-dateutil