Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
removed duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcd-mscb committed Sep 24, 2019
1 parent fdf7e0e commit b05f213
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pkg/Gridmet_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def getxml(url):
return data


# tmaxurl = "http://thredds.northwestknowledge.net:8080/thredds/ncss/grid/agg_met_tmmx_1979_CurrentYear_CONUS.nc/dataset.xml"
# "http://thredds.northwestknowledge.net:8080/thredds/ncss/grid/agg_met_tmmx_1979_CurrentYear_CONUS.nc/dataset.xml"
# http://thredds.northwestknowledge.net:8080/thredds/ncss/grid/agg_met_tmmn_1979_CurrentYear_CONUS.nc/dataset.xml
# http://thredds.northwestknowledge.net:8080/thredds/ncss/grid/agg_met_pr_1979_CurrentYear_CONUS.nc/dataset.xml
# http://thredds.northwestknowledge.net:8080/thredds/ncss/grid/agg_met_rmin_1979_CurrentYear_CONUS.nc/dataset.xml
Expand All @@ -38,13 +38,3 @@ def getxml(url):
if gm_date != yesterday:
print(f'Gridmet data {data} is not available - process exiting')
sys.exit(1)

def getxml(url):
http = urllib3.PoolManager()

response = http.request('GET', url)
try:
data = xmltodict.parse(response.data)
except:
print("Failed to parse xml from response (%s)" % traceback.format_exc())
return data

0 comments on commit b05f213

Please sign in to comment.