convert the temp using scipy instead of a formula

This commit is contained in:
srcarter3 2020-09-04 16:18:36 -06:00 committed by GitHub
parent ce780ef933
commit e7c93b3a1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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",