diff --git a/examples/notebooks/Grid_Levels_and_Parameters.ipynb b/examples/notebooks/Grid_Levels_and_Parameters.ipynb index 1a45f77..78262f2 100644 --- a/examples/notebooks/Grid_Levels_and_Parameters.ipynb +++ b/examples/notebooks/Grid_Levels_and_Parameters.ipynb @@ -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",