noaa_coops

A Python wrapper for the NOAA CO-OPS Tides & Currents Data and Metadata APIs.
https://github.com/gclunies/noaa_coops

Category: Hydrosphere
Sub Category: Ocean and Hydrology Data Access

Keywords

coops currents metocean noaa python sensors-data tides water-level weather-api

Keywords from Contributors

numerical-modeling

Last synced: about 20 hours ago
JSON representation

Repository metadata

A Python wrapper for the NOAA CO-OPS Tides & Currents Data and Metadata APIs.

README.md

noaa_coops

CI
PyPI
PyPI - Python Version
License: Apache 2.0
Ruff
pre-commit.ci status

A Python wrapper for the NOAA CO-OPS Tides & Currents
Data and
Metadata APIs.

Installation

Supported on Python 3.10, 3.11, 3.12, and 3.13.

uv add noaa-coops

Or with pip:

pip install noaa-coops

Getting started

Stations

Data is accessed via Station objects identified by a NOAA station id:

>>> from noaa_coops import Station
>>> seattle = Station(id="9447130")  # Seattle, WA

Find station IDs via the NOAA
Tides & Currents mapping interface or
search by bounding box:

>>> from noaa_coops import get_stations_from_bbox, Station
>>> stations = get_stations_from_bbox(
...     lat_coords=[40.389, 40.9397],
...     lon_coords=[-74.4751, -73.7432],
... )
>>> stations
['8516945', '8518750', '8531680']
>>> Station(id="8516945").name
'Kings Point'

Metadata

Station metadata lives on the .metadata attribute, and individual fields are
also promoted to top-level attributes on the Station object:

>>> seattle = Station(id="9447130")
>>> seattle.name
'Seattle'
>>> seattle.state
'WA'
>>> seattle.lat_lon
{'lat': 47.60264, 'lon': -122.3393}

Data inventory

Per-product first/last observation dates:

>>> seattle.data_inventory["Wind"]
{'start_date': '1991-11-09 00:00', 'end_date': '...'}

Note: The data inventory comes from NOAA's legacy SOAP endpoint and is
best-effort. If the service is unreachable, data_inventory is set to {}
and a warning is logged — Station() construction still succeeds.

Data retrieval

Data is returned as a pandas DataFrame indexed by timestamp. Column names
mirror NOAA's response format.

>>> seattle = Station(id="9447130")
>>> df = seattle.get_data(
...     begin_date="20150101",
...     end_date="20150131",
...     product="water_level",
...     datum="MLLW",
...     units="metric",
...     time_zone="gmt",
... )
>>> df.head()
                         v      s        f  q
t
2015-01-01 00:00:00  1.799  0.023  0,0,0,0  v
2015-01-01 00:06:00  1.718  0.018  0,0,0,0  v
2015-01-01 00:12:00  1.639  0.013  0,0,0,0  v
2015-01-01 00:18:00  1.557  0.012  0,0,0,0  v
2015-01-01 00:24:00  1.473  0.014  0,0,0,0  v

Water levels chart

Multi-month and multi-year ranges are automatically split into 31-day (or
365-day for hourly_height / high_low) blocks and concatenated. If NOAA
fails to return data for a block, you get a partial DataFrame along with a
RuntimeWarning and a df.attrs["missing_blocks"] list describing which
ranges failed — downstream code can detect gaps instead of silently averaging
across them.

Supported arguments

Values accepted by Station.get_data(...) — see
NOAA's API docs for
the authoritative reference.

Argument Accepted values
product water_level, hourly_height, high_low, daily_mean, monthly_mean, one_minute_water_level, predictions, datums, air_gap, air_temperature, water_temperature, wind, air_pressure, conductivity, visibility, humidity, salinity, currents, currents_predictions, ofs_water_level
datum CRD, IGLD, LWD, MHHW, MHW, MTL, MSL, MLW, MLLW, NAVD, STND (case-insensitive). Required for water-level products.
units metric, english
time_zone gmt, lst, lst_ldt
bin_num Integer. Required for currents and currents_predictions. Find values on each station's info page.
interval Product-specific. predictions: h, 1, 5, 10, 15, 30, 60, hilo. currents: 6, h. currents_predictions: h, 1, 6, 10, 30, 60, max_slack. Forbidden on water_level, hourly_height, one_minute_water_level.

Accepted date formats

begin_date and end_date accept any of:

  • "20150101" — %Y%m%d
  • "20150101 12:34" — %Y%m%d %H:%M
  • "01/15/2015" — %m/%d/%Y
  • "01/15/2015 23:59" — %m/%d/%Y %H:%M

API etiquette

NOAA's CO-OPS APIs are public and free. There are no enforced rate limits but
please be reasonable — avoid tight loops against a single station and cache
results when you can. This library uses connection pooling and automatic
retries on transient failures (429 / 5xx) via a module-level
requests.Session.

Contributing

Bug reports, feature requests, and PRs welcome. See
CONTRIBUTING.md for dev-environment setup and the release
workflow.

Citation (CITATION.cff)

cff-version: 1.2.0
title: noaa_coops
message: "If you use this software, please cite it as below."
type: software
version: "0.5.0"
authors:
  - family-names: Clunies
    given-names: Gregory
    github: GClunies
repository-code: "https://github.com/GClunies/noaa_coops"
url: "https://github.com/GClunies/noaa_coops"
license: Apache-2.0
abstract: >
  A Python wrapper for the NOAA CO-OPS Tides & Currents data APIs,
  enabling easy access to oceanographic and tidal data.
keywords:
  - NOAA
  - tides
  - currents
  - oceanography
  - python
  - API

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 days ago

Total Commits: 239
Total Committers: 15
Avg Commits per committer: 15.933
Development Distribution Score (DDS): 0.297

Commits in past year: 87
Committers in past year: 8
Avg Commits per committer in past year: 10.875
Development Distribution Score (DDS) in past year: 0.586

Name Email Commits
Greg Clunies g****s@g****m 168
staree14 s****d@g****m 36
dependabot[bot] 4****] 13
Kim Pevey k****y@g****m 7
Kristen Thyng k****g@g****m 4
taataam t****i@g****m 2
wrightky k****t@u****u 1
monika128 m****8@g****m 1
github-actions[bot] 4****] 1
Tjima 4****a 1
Swayam Agrawal S****n@g****m 1
Sakshi Rohida s****6@g****m 1
Marc Mueller 3****p 1
Jacob Shufro j****b@s****o 1
Craig Harter c****r@m****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 40
Total pull requests: 78
Average time to close issues: 3 months
Average time to close pull requests: about 1 month
Total issue authors: 19
Total pull request authors: 16
Average comments per issue: 1.15
Average comments per pull request: 0.54
Merged pull request: 49
Bot issues: 2
Bot pull requests: 27

Past year issues: 15
Past year pull requests: 31
Past year average time to close issues: 2 months
Past year average time to close pull requests: 22 days
Past year issue authors: 4
Past year pull request authors: 6
Past year average comments per issue: 0.4
Past year average comments per pull request: 0.23
Past year merged pull request: 18
Past year bot issues: 2
Past year bot pull requests: 19

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/gclunies/noaa_coops

Top Issue Authors

  • GClunies (14)
  • salme146 (5)
  • wrightky (3)
  • kthyng (2)
  • github-actions[bot] (2)
  • Russ-Nasrallah (1)
  • dianamJLAB (1)
  • MehdiArmandei (1)
  • sdat2 (1)
  • DanRamage (1)
  • mauroc (1)
  • jbouwh (1)
  • cheginit (1)
  • dveith (1)
  • ArchiHowlader (1)

Top Pull Request Authors

  • GClunies (34)
  • dependabot[bot] (27)
  • kthyng (3)
  • kcpevey (2)
  • cdce8p (1)
  • CraigHarterMM (1)
  • bkposton (1)
  • alexander0042 (1)
  • YusefSyed (1)
  • monika-2906-git (1)
  • srpeiter (1)
  • Tjima (1)
  • SakshiiRohida (1)
  • cheginit (1)
  • jshufro (1)

Top Issue Labels

  • enhancement (8)
  • bug (5)
  • good first issue (3)
  • nightly-canary (2)
  • epic (1)

Top Pull Request Labels

  • dependencies (27)
  • python:uv (17)
  • github_actions (2)

Package metadata

nixpkgs-unstable: python314Packages.noaa-coops

Python wrapper for NOAA CO-OPS Tides & Currents Data and Metadata APIs

proxy.golang.org: github.com/GClunies/noaa_coops

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/GClunies/noaa_coops#section-documentation
  • Licenses: apache-2.0
  • Latest release: v1.0.0 (published 16 days ago)
  • Last Synced: 2026-10-02T19:05:01.188Z (2 days ago)
  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.999%
    • Average: 8.173%
    • Dependent repos count: 9.346%
proxy.golang.org: github.com/gclunies/noaa_coops

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/gclunies/noaa_coops#section-documentation
  • Licenses: apache-2.0
  • Latest release: v1.0.0 (published 16 days ago)
  • Last Synced: 2026-10-02T19:05:07.490Z (2 days ago)
  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.999%
    • Average: 8.173%
    • Dependent repos count: 9.346%
conda-forge.org: noaa-coops

  • Homepage: https://github.com/GClunies/noaa_coops
  • Licenses: GPL-3.0-or-later
  • Latest release: 0.1.9 (published about 4 years ago)
  • Last Synced: 2026-04-02T20:36:57.752Z (6 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Forks count: 33.247%
    • Dependent repos count: 34.025%
    • Stargazers count: 39.052%
    • Average: 39.375%
    • Dependent packages count: 51.175%
nixpkgs-unstable: python313Packages.noaa-coops

Python wrapper for NOAA CO-OPS Tides & Currents Data and Metadata APIs


Dependencies

.github/workflows/pull_request.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • snok/install-poetry v1 composite
pyproject.toml pypi
  • numpy ^1.24.1
  • pandas ^1.5.3
  • python ^3.8
  • requests ^2.28.2
  • zeep ^4.2.1
.github/workflows/nightly.yml actions
  • actions/checkout v6 composite
  • actions/github-script v9 composite
  • astral-sh/setup-uv v7 composite
.github/workflows/publish.yml actions
  • actions/checkout v6 composite
  • actions/download-artifact v8 composite
  • actions/upload-artifact v7 composite
  • astral-sh/setup-uv v7 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • softprops/action-gh-release v3 composite
.github/workflows/test-publish.yml actions
  • actions/checkout v6 composite
  • actions/download-artifact v8 composite
  • actions/upload-artifact v7 composite
  • astral-sh/setup-uv v7 composite
  • pypa/gh-action-pypi-publish release/v1 composite
uv.lock pypi
  • ast-serialize 0.3.0
  • attrs 26.1.0
  • certifi 2026.2.25
  • charset-normalizer 3.4.7
  • colorama 0.4.6
  • coverage 7.13.5
  • exceptiongroup 1.3.1
  • idna 3.12
  • iniconfig 2.3.0
  • isodate 0.7.2
  • librt 0.11.0
  • lxml 6.1.0
  • mypy 2.0.0
  • mypy-extensions 1.1.0
  • noaa-coops 0.5.0
  • numpy 2.2.6
  • numpy 2.4.4
  • packaging 26.1
  • pandas 2.3.3
  • pandas 3.0.2
  • pandas-stubs 2.3.3.260113
  • pandas-stubs 3.0.0.260204
  • pathspec 1.0.4
  • platformdirs 4.9.6
  • pluggy 1.6.0
  • pygments 2.20.0
  • pytest 9.0.3
  • pytest-cov 7.1.0
  • pytest-recording 0.13.4
  • python-dateutil 2.9.0.post0
  • pytz 2026.1.post1
  • pyyaml 6.0.3
  • requests 2.33.1
  • requests-file 3.0.1
  • requests-toolbelt 1.0.0
  • responses 0.26.0
  • ruff 0.15.12
  • six 1.17.0
  • tomli 2.4.1
  • types-pytz 2026.1.1.20260408
  • types-requests 2.33.0.20260508
  • typing-extensions 4.15.0
  • tzdata 2026.1
  • urllib3 2.7.0
  • vcrpy 8.1.1
  • wrapt 2.1.2
  • zeep 4.3.2
.github/workflows/release.yml actions
  • actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 composite
  • astral-sh/setup-uv 37802adc94f370d6bfd71619e3f0bf239e1f3b78 composite
  • googleapis/release-please-action 5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 composite

Score: 7.33302301438648