Browse Source

Fix mdbz on cheyenne.

Xarray doesn't work with np.amax on cheyenne for some reason.
lon0
Bill Ladwig 8 years ago
parent
commit
411cfd17cf
  1. 2
      doc/source/new.rst
  2. 6
      src/wrf/g_dbz.py

2
doc/source/new.rst

@ -12,6 +12,8 @@ v1.1.1 @@ -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

6
src/wrf/g_dbz.py

@ -6,7 +6,7 @@ import numpy as np @@ -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", @@ -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)

Loading…
Cancel
Save