Giter Club home page Giter Club logo

pygtide's Introduction

PyGTide

DOI

A Python module and wrapper for ETERNA PREDICT to compute gravitational tides on Earth

PyGTide is a Python module that wraps around ETERNA PREDICT 3.4 which is compiled from Fortran into an executable using f2py. The original ETERNA PREDICT 3.3 was written by the late Prof. H.-G. Wenzel (Wenzel, 1996) in a mix of Fortran 77 and 90. This was updated by Kudryavtsev (2004) to include the latest tidal catalogue. Note that the original Fortran code was comprehensively revised in order to facilitate integration into Python. The original Fortran code for ETERNA PREDICT can be downloaded from the International Geodynamics and Earth Tide Service (IGETS).

How to use

There are two options:

  • Download and install on your system (see below instructions)
  • Via our online calculator: groundwater.app

How to install and run

Instructions:

  • Download and install Anaconda or Miniconda

  • Make sure the following packages are installed:
    conda install numpy pandas requests git

  • Download and install pygtide:

    • Linux or MacOS:
      NOTE: Make sure suitable C++ and Fortran compilers are available.

      pip install pygtide
      

      NOTE by Roman Sermiagin (2024-07-11): Since distutils was removed in NumPy >= 1.26, the Meson build system was used. I could not create a correct meson.build script for the assembly, after which the Fortran-modules would be added to the etpred module. Therefore, to install a package via Mason, you must first compile the etpred module in the build directory, and then install the package. This only works correctly with numpy 1.2.x, not 2.0.x. The previous setup.py and setup.cfg settings files have been moved to the backup directory. pyproject.toml was added instead of setup.py

      python -m numpy.f2py -c -m etpred src/etpred.f90 --build-dir build
      pip instal pygtide
      
    • Windows:
      Download the correct wheel for your Python version (available for 3.8 to 3.11) from the subfolder "windows" onto your system. Then navigate your Anaconda explorer to the download location and execute:

      pip install [wheel_name_depending_on_python_version]
      
  • Run tests:

python -c "import pygtide; pygtide.test(msg=True)"
  • The internal database files can be updated as follows:
python -c "import pygtide; pygtide.update()"
  • See pygtide/tests.py for example usage:
from pygtide import predict_series
args = (-20.82071, -70.15288, 830.0, '2020-01-01', 6, 600)
series = predict_series(*args, statazimut=90, tidalcompo=8)
  • Development version: This can be installed by downloading the Github repository and running: pip install download_path.
    Alternatively, in one step as:
    pip install git+https://github.com/hydrogeoscience/pygtide.git
    

How to use

An updated user guide is currently in progress ...

How to cite

If you use PyGTide, please cite the work as:

Rau, Gabriel C. (2018) hydrogeoscience/pygtide: PyGTid. Zenodo. https://doi.org/10.5281/zenodo.1346260

Example

This image shows Earth tides calculated for the city Karlsruhe (Germany) in the year 2018.

References

  • Hartmann, T., and H.-G. Wenzel (1995), The HW95 tidal potential catalogue, Geophysical Research Letters, 22(24), 3553–3556, https://doi.org/10.1029/95GL03324.
  • Kudryavtsev, S. M. (2004), Improved harmonic development of the Earth tide-generating potential, Journal of Geodesy, 17(12), 829-838, https://doi.org/10.1007/s00190-003-0361-2.
  • Wenzel, H.-G. (1996), The nanogal software: Earth tide data processing package ETERNA 3.30, Bulletin d’Informations des Marées Terrestres, 124, 9425–9439.
  • McMillan, T. C., and Rau, G. C., and Timms, W. A., and Andersen, M. S. (2019), Utilizing the impact of Earth and atmospheric tides on groundwater systems: A review reveals the future potential, Reviews of Geophysics, https://dx.doi.org/10.1029/2018RG000630.

License

PyGTide is released by Gabriel C. Rau and Tom Eulenfeld under the Mozilla Public License 2.0

pygtide's People

Contributors

hydrogeoscience avatar trichter avatar onewhaleid avatar skimprem avatar strawpants avatar jnsebgosselin avatar scottstanie avatar taylordixonhd avatar

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.