Skip to main content

conda platforms latest-release-date license

pangeo-pytide

About

pytide allows to analyze the tidal constituents of a time series from a harmonic analysis. The definition of tidal constants and astronomical arguments is taken from FES2014 tidal prediction software.

It was developed to analyze the MIT/GCM LLC4320 model. The script "mit_gcm_detiding.py" used to perform this analysis is distributed with this distribution.

Try it for yourself

Try this library on http://binder.pangeo.io/:

How To Install

Anaconda is a free and open-source distribution of the Python programming language for scientific computing, that aims to simplify package management and deployment. Package versions are managed by the package management system conda.

The first step is to install the anaconda distribution. The installation manual for this software is detailed here.

To install the software using conda simply execute the following command:

conda install pytide -c conda-forge

This command will install the software and the necessary dependencies. More information is available on the syntax of this command on the related documentation.

If you want to build the package yourself, you can find more information on the help page of the project.

Quick Tutorial

The distribution contains a time series fes_tide_time_series.nc that will be used in this help.

The first step is to read this time series using the NetCDF4 library, for example:

import netCDF4
import pytide

with netCDF4.Dataset("tests/dataset/fes_tide_time_series.nc") as dataset:
    time = netCDF4.num2date(dataset['time'][:],
                            dataset['time'].unit,
                            only_use_cftime_datetimes=False)
    h = dataset['ocean'][:] * 1e-2      # cm to m

Then, we will create an instance of a pytide.WaveTable object:

wt = pytide.WaveTable()

By default, all components known by this object are loaded into memory. The list of components known by this object can be retrieved using the pytide.WaveTable.known_constituents method.

If you want to restrict the analysis to only a few components, you must provide a list to the constructor in order to specify the waves to be analyzed.

wt = pytide.WaveTable(["M2", "K1", "O1", "P1", "Q1", "S1"])

The pytide.WaveTable.constituents method allows to retrieve the list of waves defined during the construction of the object.

The different nodal corrections are then calculated from the time series to be analyzed:

f, vu = wt.compute_nodal_modulations(time.astype("datetime64"))
# You can also use a list of datetime.datetime objects
# wt.compute_nodal_modulations(list(time))

These coefficients are used by harmonic analysis to determine the properties of the different tidal waves defined during the construction of the instance.

w = wt.harmonic_analysis(h, f, vu)

This result can then be used to determine a tidal height for the analyzed time series:

hp = wt.tide_from_tide_series(time, w)

Metadata

Release files for pytide 1.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytide 1.2.7
File Size Uploaded
pytide-1.2.7.tar.gz 4.1 MB Details

Release files / pytide-1.2.7.tar.gz

Download URL pytide-1.2.7.tar.gz
Size 4.1 MB
Tags Source
SHA-256 checksum
How to use checksums
270ee5dfcab6f3dd967c992f14cd06c5606d06a507d57865efe8c7aa0c076c6c
BLAKE2b-256 checksum
How to use checksums
38487d955ce9388c8d5dc8b728097a87aa52989cff85cb078072d72a23f0bb90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

1.2.7 This release

1 release file

1.2.6

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page