Merge pull request #4 from Unidata/master

Bring fork up to latest code in master repo
This commit is contained in:
srcarter3 2020-09-09 11:35:12 -06:00 committed by GitHub
commit 57d2189dfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 30 deletions

View file

@ -80,7 +80,11 @@
"request.addIdentifier(\"source\", \"GLMgr\")\n", "request.addIdentifier(\"source\", \"GLMgr\")\n",
"request.setParameters(\"intensity\")\n", "request.setParameters(\"intensity\")\n",
"times = DataAccessLayer.getAvailableTimes(request)\n", "times = DataAccessLayer.getAvailableTimes(request)\n",
"response = DataAccessLayer.getGeometryData(request, [times[-1]])" "response = DataAccessLayer.getGeometryData(request, [times[-1]])\n",
"glm_points = []\n",
"for data in response:\n",
" glm_points.append(data.getGeometry())\n",
"ob = response[0]"
] ]
}, },
{ {
@ -120,8 +124,8 @@
"ax.gridlines()\n", "ax.gridlines()\n",
"ax.scatter([point.x for point in glm_points],\n", "ax.scatter([point.x for point in glm_points],\n",
" [point.y for point in glm_points],\n", " [point.y for point in glm_points],\n",
" transform=ccrs.Geodetic(),marker=\"+\",facecolor='red')\n", " transform=ccrs.PlateCarree(),marker=\"+\",facecolor='red')\n",
"ax.set_title(str(response[-1].getDataTime().getRefTime()) + \" | \" + ob.getAttribute('source') + \" | \" + edexServer)" "ax.set_title(str(response[-1].getDataTime().getRefTime()) + \" | \" + ob.getAttribute('source') + \" | \" + edexServer)\n"
] ]
} }
], ],

View file

@ -901,6 +901,7 @@
"import numpy as np\n", "import numpy as np\n",
"import numpy.ma as ma\n", "import numpy.ma as ma\n",
"from scipy.io import loadmat\n", "from scipy.io import loadmat\n",
"from scipy.constants import convert_temperature\n",
"def make_map(bbox, projection=ccrs.PlateCarree()):\n", "def make_map(bbox, projection=ccrs.PlateCarree()):\n",
" fig, ax = plt.subplots(figsize=(16, 9),\n", " fig, ax = plt.subplots(figsize=(16, 9),\n",
" subplot_kw=dict(projection=projection))\n", " subplot_kw=dict(projection=projection))\n",
@ -913,7 +914,7 @@
" return fig, ax\n", " return fig, ax\n",
"\n", "\n",
"#convert temp from K to F\n", "#convert temp from K to F\n",
"dataf = data*1.8-459.67\n", "dataf = convert_temperature(data, 'K', 'F')\n",
"\n", "\n",
"cmap = plt.get_cmap('rainbow')\n", "cmap = plt.get_cmap('rainbow')\n",
"bbox = [lons.min(), lons.max(), lats.min(), lats.max()]\n", "bbox = [lons.min(), lons.max(), lats.min(), lats.max()]\n",

File diff suppressed because one or more lines are too long

View file

@ -21,6 +21,7 @@
"import cartopy.crs as ccrs\n", "import cartopy.crs as ccrs\n",
"import numpy as np\n", "import numpy as np\n",
"from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER\n", "from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER\n",
"%matplotlib inline\n",
"\n", "\n",
"DataAccessLayer.changeEDEXHost(\"edex-cloud.unidata.ucar.edu\")\n", "DataAccessLayer.changeEDEXHost(\"edex-cloud.unidata.ucar.edu\")\n",
"request = DataAccessLayer.newDataRequest(\"radar\")\n", "request = DataAccessLayer.newDataRequest(\"radar\")\n",
@ -507,7 +508,7 @@
" ax.set_extent(bbox)\n", " ax.set_extent(bbox)\n",
" ax.coastlines(resolution='50m')\n", " ax.coastlines(resolution='50m')\n",
" gl = ax.gridlines(draw_labels=True)\n", " gl = ax.gridlines(draw_labels=True)\n",
" gl.xlabels_top = gl.ylabels_right = False\n", " gl.top_labels = gl.right_labels = False\n",
" gl.xformatter = LONGITUDE_FORMATTER\n", " gl.xformatter = LONGITUDE_FORMATTER\n",
" gl.yformatter = LATITUDE_FORMATTER\n", " gl.yformatter = LATITUDE_FORMATTER\n",
" return fig, ax\n", " return fig, ax\n",
@ -577,7 +578,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.6" "version": "3.8.5"
} }
}, },
"nbformat": 4, "nbformat": 4,

File diff suppressed because one or more lines are too long