mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
convert the temp using scipy instead of a formula
This commit is contained in:
parent
ce780ef933
commit
e7c93b3a1f
1 changed files with 2 additions and 1 deletions
|
@ -901,6 +901,7 @@
|
|||
"import numpy as np\n",
|
||||
"import numpy.ma as ma\n",
|
||||
"from scipy.io import loadmat\n",
|
||||
"from scipy.constants import convert_temperature\n",
|
||||
"def make_map(bbox, projection=ccrs.PlateCarree()):\n",
|
||||
" fig, ax = plt.subplots(figsize=(16, 9),\n",
|
||||
" subplot_kw=dict(projection=projection))\n",
|
||||
|
@ -913,7 +914,7 @@
|
|||
" return fig, ax\n",
|
||||
"\n",
|
||||
"#convert temp from K to F\n",
|
||||
"dataf = data*1.8-459.67\n",
|
||||
"dataf = convert_temperature(data, 'K', 'F')\n",
|
||||
"\n",
|
||||
"cmap = plt.get_cmap('rainbow')\n",
|
||||
"bbox = [lons.min(), lons.max(), lats.min(), lats.max()]\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue