mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
fixed import error and units errors
This commit is contained in:
parent
a7cb7c55ee
commit
19bab374b9
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@
|
|||
"from mpl_toolkits.axes_grid1.inset_locator import inset_axes\n",
|
||||
"from math import exp, log\n",
|
||||
"import numpy as np\n",
|
||||
"from metpy.calc import get_wind_components, lcl, dry_lapse, parcel_profile, dewpoint\n",
|
||||
"from metpy.calc import wind_components, lcl, dry_lapse, parcel_profile, dewpoint\n",
|
||||
"from metpy.calc import wind_speed, wind_direction, thermo, vapor_pressure\n",
|
||||
"from metpy.plots import SkewT, Hodograph\n",
|
||||
"from metpy.units import units, concatenate\n",
|
||||
|
@ -1154,8 +1154,8 @@
|
|||
"p = prs/100 * units.mbar\n",
|
||||
"\n",
|
||||
"u,v = uc*1.94384,vc*1.94384 # m/s to knots\n",
|
||||
"spd = wind_speed(u, v) * units.knots\n",
|
||||
"dir = wind_direction(u, v) * units.deg"
|
||||
"spd = wind_speed(u*units.knots, v*units.knots)\n",
|
||||
"dir = wind_direction(u*units.knots, v*units.knots) * units.deg"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1264,7 +1264,7 @@
|
|||
"\n",
|
||||
"# Draw hodograph\n",
|
||||
"ax_hod = inset_axes(skew.ax, '40%', '40%', loc=2)\n",
|
||||
"h = Hodograph(ax_hod, component_range=wind_speed(u, v).max())\n",
|
||||
"h = Hodograph(ax_hod, component_range=wind_speed(u*units.knots, v*units.knots).max()/units.knots)\n",
|
||||
"h.add_grid(increment=20)\n",
|
||||
"h.plot_colormapped(u, v, spd)\n",
|
||||
"\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue