Giter Site home page Giter Site logo

harmonica's Introduction

#harmonica

API and CLI to get amplitude, phase, and speed of tidal harmonics from various tidal models (expandable, but currently TPXO 7.2, TPXO 8 and TPXO 9). Builds water surface time series utilizing pytides reconstruction and also provides access to pytides deconstruction.

harmonica's People

Contributors

kajiglet avatar

Stargazers

Bryce Corlett avatar James Taylor avatar  avatar Gabriel avatar Lachlan avatar Andrew Villeneuve avatar Alexandre Erich Sébastien Georges avatar JJC avatar Michael avatar Nguyen Quang Chien avatar  avatar Noah Spahn avatar Mason Wang avatar

Watchers

Dharhas Pothina avatar Chris Kees avatar James Cloos avatar Alex Crosby avatar  avatar Drew Allan Loney avatar  avatar Kim Pevey avatar Mason Wang avatar  avatar

harmonica's Issues

Failed to install

Traceback (most recent call last):
File "setup.py", line 8, in
raise RuntimeError(version_dict["error"])
RuntimeError: no suitable tags

xarray auto_combine will be deprecated in version 0.13.

Hi,

The new version of xarray (0.13) will no longer use the auto_combine option.

C:\ProgramData\Anaconda3\lib\site-packages\xarray\backends\api.py:783: FutureWarning: In xarray version 0.13 `auto_combine` will be deprecated.
  coords=coords)
C:\ProgramData\Anaconda3\lib\site-packages\xarray\backends\api.py:783: FutureWarning: Also `open_mfdataset` will no longer accept a `concat_dim` argument.
To get equivalent behaviour from now on please use the new
`combine_nested` function instead (or the `combine='nested'` option to
`open_mfdataset`).The datasets supplied have global dimension coordinates. You may want
to use the new `combine_by_coords` function (or the
`combine='by_coords'` option to `open_mfdataset` to order the datasets
before concatenation. Alternatively, to continue concatenating based
on the order the datasets are supplied in in future, please use the
new `combine_nested` function (or the `combine='nested'` option to
open_mfdataset).
  coords=coords)

incorrect cli doc string for deconstruct

The cli doc string for harmonic deconstruct -h shows the lat/lon being included:

harmonica deconstruct 38.375789 -74.943915 -C M2 K1 -M tpxo8

Which is not accurate.

API catch for short signal

The catch for failing to converge on a solution (and the note to provide a longer signal) is not included in the API call. With the API, this will fail with only the scipy error Number of calls to function has reached maxfev and no other info. Something similar to what's below should be mimicked in the API

main_deconstruct.py Line 106:  
  
    try:
        tide = harmonica.Tide().deconstruct_tide(df[wl], df['datetimes'], cons=args.cons,
            n_period=args.num_periods, positive_ph=args.positive_phase)
    except RuntimeWarning as w:
        if 'Number of calls to function has reached maxfev' in str(w):
            print("\nThe solver failed to converge to a solution. Provide a longer signal.")
        else:
            print(str(w))
        print('\nFailed.\n')
        return

resource download fails in develop install

If you 'python setup.py develop' install harmonica into your environment, then an egg-link in site-packages is added to point to the code and therefore, the data directory for downloaded resources also.

After downloading a new resource, the file or extracted files are not written into the data directory. I surmise that the egg-link is breaking this. harmonica will fail when xarray attempts to read the non-existent data files.

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.