Adding 2 Data Array's Math Operation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Adding 2 Data Array's Math Operation

Benson, Randall

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(uwindc*uwindc+vwindc*vwindc)

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

Description: cid:image001.jpg@01D34737.23261CB0

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
[hidden email]


Description: cid:image002.png@01D34737.23261CB0


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

 

 

 

==============================================================

Please consider the environment before printing this email.

If you have received this message in error, please notify the sender and immediately delete this message and any attachment hereto and/or copy hereof, as such message contains confidential information intended solely for the individual or entity to whom it is addressed. The use or disclosure of such information to third parties is prohibited by law and may give rise to civil or criminal liability.

The views presented in this message are solely those of the author(s) and do not necessarily represent the opinion of Avangrid Renewables, LLC. or any company of its group. Neither Avangrid Renewables, LLC. nor any company of its group guarantees the integrity, security or proper receipt of this message. Likewise, neither Avangrid Renewables, LLC. nor any company of its group accepts any liability whatsoever for any possible damages arising from, or in connection with, data interception, software viruses or manipulation by third parties.

 ==============================================================

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users