warn/warn notebook updates for python3 string fix

This commit is contained in:
mjames-upc 2017-04-07 13:54:21 -06:00
parent 712f4c1be7
commit 5be6a37ad0

View file

@ -134,7 +134,7 @@
" \n", " \n",
"if parameters['phensig'][i]:\n", "if parameters['phensig'][i]:\n",
" print(parameters['phensig'][i]) \n", " print(parameters['phensig'][i]) \n",
"print(siteid[i] +\": \"+ parameters['wmoid'][i] \\\n", "print(siteid[i] +\": \"+ str(parameters['wmoid'][i]) \\\n",
" + \"\\nissued \" + issue \\\n", " + \"\\nissued \" + issue \\\n",
" + \"\\nstart \" + start \\\n", " + \"\\nstart \" + start \\\n",
" + \"\\nend \" + end \\\n", " + \"\\nend \" + end \\\n",
@ -171,7 +171,7 @@
"import cartopy.feature as cfeat\n", "import cartopy.feature as cfeat\n",
"from cartopy.feature import ShapelyFeature,NaturalEarthFeature\n", "from cartopy.feature import ShapelyFeature,NaturalEarthFeature\n",
"from shapely.geometry import Polygon\n", "from shapely.geometry import Polygon\n",
"from awips.Tables import vtec\n", "from awips.tables import vtec\n",
"\n", "\n",
"def warning_color(phensig):\n", "def warning_color(phensig):\n",
" if vtec[phensig]['color']:\n", " if vtec[phensig]['color']:\n",
@ -200,7 +200,7 @@
" \n", " \n",
" # For now do not plot SPS\n", " # For now do not plot SPS\n",
" if (parameters['phensig'][i]):\n", " if (parameters['phensig'][i]):\n",
" color = warning_color(parameters['phensig'][i])\n", " color = warning_color(parameters['phensig'][i].astype('U13'))\n",
" shape_feature = ShapelyFeature(geoms,ccrs.PlateCarree(), \n", " shape_feature = ShapelyFeature(geoms,ccrs.PlateCarree(), \n",
" facecolor='none', edgecolor=color)\n", " facecolor='none', edgecolor=color)\n",
" ax.add_feature(shape_feature)\n", " ax.add_feature(shape_feature)\n",
@ -392,9 +392,9 @@
" +nexrad[code]['unit']+\" \" \\\n", " +nexrad[code]['unit']+\" \" \\\n",
" +str(record.getDataTime()))\n", " +str(record.getDataTime()))\n",
"\n", "\n",
" # Zoom to within +-2 deg of center\n", " # Zoom to within +- some value deg of center\n",
" ax.set_xlim(lon-2., lon+2.)\n", " ax.set_xlim(lon-4., lon+4.)\n",
" ax.set_ylim(lat-2., lat+2.)\n", " ax.set_ylim(lat-4., lat+4.)\n",
" for i, geom in enumerate(geometries):\n", " for i, geom in enumerate(geometries):\n",
" bounds = Polygon(geom)\n", " bounds = Polygon(geom)\n",
" intersection = bounds.intersection\n", " intersection = bounds.intersection\n",
@ -404,7 +404,7 @@
"\n", "\n",
" # For now do not plot SPS\n", " # For now do not plot SPS\n",
" if (parameters['phensig'][i]):\n", " if (parameters['phensig'][i]):\n",
" color = warning_color(parameters['phensig'][i])\n", " color = warning_color(parameters['phensig'][i].astype('U13'))\n",
" shape_feature = ShapelyFeature(geoms,ccrs.PlateCarree(),\n", " shape_feature = ShapelyFeature(geoms,ccrs.PlateCarree(),\n",
" linewidth=2,\n", " linewidth=2,\n",
" facecolor='none', edgecolor=color)\n", " facecolor='none', edgecolor=color)\n",