diff --git a/doc/source/new.rst b/doc/source/new.rst index 5197ebb..9faff79 100644 --- a/doc/source/new.rst +++ b/doc/source/new.rst @@ -12,6 +12,8 @@ v1.1.1 also included a patch for numpy.distutils. - Fixed a few unicode characters hiding in a docstring that were causing problems on Cheyenne, and also building the docs with Sphinx with Python 2.x. +- Fix issue with np.amax not working with xarray on Cheyenne, causing an error + with the mdbz product. v1.1.0 diff --git a/src/wrf/g_dbz.py b/src/wrf/g_dbz.py index 4c0e71f..f16b6bb 100755 --- a/src/wrf/g_dbz.py +++ b/src/wrf/g_dbz.py @@ -6,7 +6,7 @@ import numpy as np #from .extension import computedbz,computetk from .extension import _dbz, _tk from .constants import Constants -from .util import extract_vars +from .util import extract_vars, to_np from .metadecorators import copy_and_set_metadata @@ -194,7 +194,7 @@ def get_max_dbz(wrfin, timeidx=0, method="cat", be a :class:`numpy.ndarray` object with no metadata. """ - return np.amax(get_dbz(wrfin, timeidx, method, squeeze, cache, meta, - _key, use_varint, use_liqskin), + return np.amax(to_np(get_dbz(wrfin, timeidx, method, squeeze, cache, meta, + _key, use_varint, use_liqskin)), axis=-3)