[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #VFZ-653243]: I have some problems of metpy calculations



Greetings!

Sorry to hear you're having problems. Unfortunately, I've been unable to 
reproduce your issues with a dataframe of my own data. Can you share a 
complete, minimal example of code + data that reproduces the problem on your 
system?

Also, can you share the full error traceback?

Thanks!

Ryan

> I have a problem using metpy library. So can you help me.
> wind_dir = mpcalc.wind_direction(u, v) When I try to use this method I have
> this kind of error:
> `wind_direction` given arguments with incorrect units: `u` requires
> "[speed]" but given "none", `v` requires "[speed]" but given "none"
> 
> A xarray DataArray or numpy array `x` can be assigned a unit as follows:
> from metpy.units import units
> x = x * units("m/s").
> 
> u = (interpolated_df_2['wind_u'].values * units('m/s'))
> v = (interpolated_df_2['wind_v'].values * units('m/s'))
> 
> When I add units, have such error:
> 
> 
> AttributeError: 'float' object has no attribute 'arctan2'.
> 
> Help me Please.


Ticket Details
===================
Ticket ID: VFZ-653243
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.