Giter Site home page Giter Site logo

bandit's Introduction

Bandit

Interface for working with the National Hydrologic Model for PRMS

bandit's People

Contributors

pnorton-usgs avatar paknorton avatar

Stargazers

 avatar 00545 avatar Theo Barnhart avatar Sudershan Gangrade avatar

Watchers

James Cloos avatar  avatar  avatar

bandit's Issues

Add ability to pull non-global nhmparamdb repository

Currently bandit works with a global nhmparamdb repository. In other words, there is a single copy of the nhmparamdb that is used by all bandit jobs. It would be useful to extend bandit to allow the use of local nhmparamdb copies on a per-job basis without affecting the nhmparamdb that is used globally. This would be particularly useful for calibration jobs.

Handling non-POI gages

Right now if a streamgage is not a POI in the NHM paramDb then is can be used or included as part of a model extraction. It would be useful to be able to attach non-POI streamgages to stream segments during a model extraction.

Need method of recovery when a proxy error occurs downloading streamgage data

When a proxy error occurs while downloading streamgage data the program crashes (see output example below). Should add logic to attempt recovery when this happens and provide a better error message when the program must exit.

========
Generating stream network from tosegment_nhm
Extracting model subset
Parameter file written: /cxfs/projects/usgs/water/mows/NHM/bandit/jobs/20170620_GCPO/myparam.param
Processing CBH files
Downloading NWIS streamgage observations for 1235 stations
Streamgage: 08073500 (6/1235) ERROR: More than one Q-col returned
Streamgage: 08075000 (22/1235) Traceback (most recent call last):
File "../../Bandit/bandit.py", line 581, in
main()
File "../../Bandit/bandit.py", line 548, in main
streamflow.get_daily_streamgage_observations()
File "/cxfs/projects/usgs/water/mows/NHM/bandit/Bandit/prms_nwis.py", line 153, in get_daily_streamgage_observations
streamgage_obs_page = urlopen('{}/dv/{}'.format(BASE_NWIS_URL, url_final))
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 654, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/home/pnorton/.conda/envs/bandit/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 502: Proxy Error

Add readme to bandit extractions

Add a readme file to bandit extractions that describes the files included, the GIS layers, how to get PRMS. Could also add boilerplate information about the NHM application.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.