[Matplotlib-users] Adding 2 Data Array's Math Operation

Hi –

I’m struggling to figure out why I am not receiving the result from trying to add 2 unique but with same shape DataArrays that look like this below:

<xarray.DataArray ‘stack-1eae019110cce9444c8807bfd58d45fb’ (variable: 1, lat: 73, lon: 144)>

dask.array<pow, shape=(1, 73, 144), dtype=float32, chunksize=(1, 73, 144), chunktype=numpy.ndarray>

Coordinates:

  • lat (lat) float32 90.0 87.5 85.0 82.5 80.0 … -82.5 -85.0 -87.5 -90.0

  • lon (lon) float32 0.0 2.5 5.0 7.5 10.0 … 350.0 352.5 355.0 357.5

month int64 2

  • variable (variable) <U4 ‘uwnd’

Doing this in my code — >
speedc = np.sqrt(uwindcuwindc+vwindcvwindc)

Gives me an empty (when I try speedc.plot()) variable that looks like this below:

speedc

Out[219]:

<xarray.DataArray (variable: 0, lat: 73, lon: 144)>

dask.array<sqrt, shape=(0, 73, 144), dtype=float32, chunksize=(0, 73, 144), chunktype=numpy.ndarray>

Coordinates:

  • variable (variable) object

  • lat (lat) float32 90.0 87.5 85.0 82.5 80.0 … -82.5 -85.0 -87.5 -90.0

  • lon (lon) float32 0.0 2.5 5.0 7.5 10.0 … 350.0 352.5 355.0 357.5

month int64 2

Thank you for any help that you can provide after I’ve exhausted my search (I must be missing something).

Randall

image001.jpg

image002.png

···

Randall P. Benson, PhD

Wind Asset Meteorologist, Energy Resource - Onshore

1125 NW Couch Street, Suite 700

Portland, Oregon, USA 97209

Telephone 503-796-7129
Cell 971-227-2477
randall.benson@avangrid.com

In the interest of the environment,
please print only if necessary and recycle.