Code Monkey home page Code Monkey logo

tidepredict's People

Contributors

onewhaleid avatar windcrusader avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tidepredict's Issues

Add support for imperial

Currently output is always in metres. It would be good to output data in feet for those folks in the USA.

Tide graph should obey the timespan specified as options

At present the tidegraph generates a graph for a length depending on the constant "GRAPHSPAN". This should rather be the default but if the user gives a time interval as per the textual output then the graph should be for that interval.

Some sensible error checks should take place also.

No such file or directory: 'C:\\Users\\Jerry\\.tidepredict\\stations.csv'

(tidepredict) λ python tidepredict -l Lyttelton
Refreshing stations list from online source.
ftp request:RETR /uhslc/rqds/pacific/pacific.lst
ftp request:RETR /uhslc/rqds/indian/indian.lst
ftp request:RETR /uhslc/rqds/atlantic/atlantic.lst
Traceback (most recent call last):
File "tidepredict_main_.py", line 66, in process_args
stations = pd.read_csv(constants.STATIONFILE)
File "C:\Users\Jerry\New_Python_Projects\tidepredict\lib\site-packages\pandas\io\parsers.py", line 686, in read_csv
return _read(filepath_or_buffer, kwds)
File "C:\Users\Jerry\New_Python_Projects\tidepredict\lib\site-packages\pandas\io\parsers.py", line 452, in _read
parser = TextFileReader(fp_or_buf, **kwds)
File "C:\Users\Jerry\New_Python_Projects\tidepredict\lib\site-packages\pandas\io\parsers.py", line 936, in init
self._make_engine(self.engine)
File "C:\Users\Jerry\New_Python_Projects\tidepredict\lib\site-packages\pandas\io\parsers.py", line 1168, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "C:\Users\Jerry\New_Python_Projects\tidepredict\lib\site-packages\pandas\io\parsers.py", line 1998, in init
self._reader = parsers.TextReader(src, **kwds)
File "pandas_libs\parsers.pyx", line 382, in pandas._libs.parsers.TextReader.cinit
File "pandas_libs\parsers.pyx", line 674, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Jerry\.tidepredict\stations.csv'

Better processing of command line options is required

At the moment, I have implemented the skeleton of command line processing using the Python "argparse" package. The idea is to eventually implement most of the options in xtide, but at the moment not all these are implemented.

I think I should remove the command line options not currently supported to make the tool more user friendly.

string index out of range, error when generating data for "La Jolla"

$ python tidepredict -harmgen -l "La Jolla"
ftp request:RETR /uhslc/rqds/pacific/hourly/h554a.zip
Opening data file:i554a15.dat
Traceback (most recent call last):
File "/home/dlarue/miniconda3/envs/envPyTides/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/dlarue/miniconda3/envs/envPyTides/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "tidepredict/main.py", line 183, in
process_args(args)
File "tidepredict/main.py", line 99, in process_args
loc_code = loc_code)
File "/home/dlarue/tidepredict/tidepredict/processdata.py", line 179, in process_unhw_data
if dateraw[8] == "1":
IndexError: string index out of range

process station data QA doc

I need to write a method to read the station QA doc online when grabbing the station data and in particular make sure I get the local time zone for presenting the results. Other useful information should also be gleaned from this file.

This will affect the format of the saved file for harmonics constants.

refactor handling of timezones

At the moment the tool handles timezones in a mostly ok manner, just not that generically. Ideally, in the WeeWx tradition, all time processing should be done in UTC, and conversion to local time handled at the last second before output processing.

What needs to happen is that there should be a new "pre/post-processor" module that converts the passed time into UTC before passing to any tide generation function. The module could then convert to local as a final step when required.

It should be able to:

  1. convert a single date time to/from local time from/to UTC
  2. convert a list of date times to/from local time from/to UTC

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.