mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
Merge pull request #120 from srcarter3/main
Small updates to the accumulated precip roi notebook
This commit is contained in:
commit
284d3e92ca
1 changed files with 4 additions and 4 deletions
|
@ -201,7 +201,7 @@
|
||||||
" print(data.min(), data.max(), grid.getDataTime().getFcstTime()/3600)\n",
|
" print(data.min(), data.max(), grid.getDataTime().getFcstTime()/3600)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # Convert from mm to inches\n",
|
" # Convert from mm to inches\n",
|
||||||
" result = data * (0.0393701)\n",
|
" result = (data * units.mm).to(units.inch)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" ii,jj = np.where(result==result.max())\n",
|
" ii,jj = np.where(result==result.max())\n",
|
||||||
" i=ii[0]\n",
|
" i=ii[0]\n",
|
||||||
|
@ -383,7 +383,7 @@
|
||||||
"fig, ax = make_map(bbox=bbox)\n",
|
"fig, ax = make_map(bbox=bbox)\n",
|
||||||
"cs = ax.pcolormesh(lons, lats, tp_inch, cmap=cmap)\n",
|
"cs = ax.pcolormesh(lons, lats, tp_inch, cmap=cmap)\n",
|
||||||
"cbar = fig.colorbar(cs, shrink=0.7, orientation='horizontal')\n",
|
"cbar = fig.colorbar(cs, shrink=0.7, orientation='horizontal')\n",
|
||||||
"cbar.set_label(grid.getLocationName() + \" Total precipitation in inches, \" \\\n",
|
"cbar.set_label(grid.getLocationName() + \" Total accumulated precipitation in inches, \" \\\n",
|
||||||
" + str(fcstHr) + \"-hr fcst valid \" + str(grid.getDataTime().getRefTime()))\n",
|
" + str(fcstHr) + \"-hr fcst valid \" + str(grid.getDataTime().getRefTime()))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"ax.scatter(maxPoint.x, maxPoint.y, s=300,\n",
|
"ax.scatter(maxPoint.x, maxPoint.y, s=300,\n",
|
||||||
|
@ -437,7 +437,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"cs = ax.pcolormesh(lons, lats, tp_inch, cmap=cmap)\n",
|
"cs = ax.pcolormesh(lons, lats, tp_inch, cmap=cmap)\n",
|
||||||
"cbar = fig.colorbar(cs, shrink=0.7, orientation='horizontal')\n",
|
"cbar = fig.colorbar(cs, shrink=0.7, orientation='horizontal')\n",
|
||||||
"cbar.set_label(grid.getLocationName() + \" Total precipitation in inches, \" \\\n",
|
"cbar.set_label(grid.getLocationName() + \" Total accumulated precipitation in inches, \" \\\n",
|
||||||
" + str(fcstHr) + \"-hr fcst valid \" + str(grid.getDataTime().getRefTime()))\n",
|
" + str(fcstHr) + \"-hr fcst valid \" + str(grid.getDataTime().getRefTime()))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"ax.scatter(maxPoint.x, maxPoint.y, s=300,\n",
|
"ax.scatter(maxPoint.x, maxPoint.y, s=300,\n",
|
||||||
|
@ -598,7 +598,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"cs = ax.pcolormesh(roiLons, roiLats, roi_data, cmap=cmap)\n",
|
"cs = ax.pcolormesh(roiLons, roiLats, roi_data, cmap=cmap)\n",
|
||||||
"cbar = fig.colorbar(cs, shrink=0.7, orientation='horizontal')\n",
|
"cbar = fig.colorbar(cs, shrink=0.7, orientation='horizontal')\n",
|
||||||
"cbar.set_label(roiGrid.getLocationName() + \" Total precipitation in inches, \" \\\n",
|
"cbar.set_label(roiGrid.getLocationName() + \" Total accumulated precipitation in inches, \" \\\n",
|
||||||
" + str(roiFcstHr) + \"-hr fcst valid \" + str(roiGrid.getDataTime().getRefTime()))\n",
|
" + str(roiFcstHr) + \"-hr fcst valid \" + str(roiGrid.getDataTime().getRefTime()))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"ax.scatter(maxPoint.x, maxPoint.y, s=300,\n",
|
"ax.scatter(maxPoint.x, maxPoint.y, s=300,\n",
|
||||||
|
|
Loading…
Add table
Reference in a new issue