Skip to content

Add Ireland OPW#96

Open
thiagovmdon wants to merge 6 commits intomainfrom
ireland-opw
Open

Add Ireland OPW#96
thiagovmdon wants to merge 6 commits intomainfrom
ireland-opw

Conversation

@thiagovmdon
Copy link
Copy Markdown
Collaborator

Summary

Related to issue #95

Implemented:

  • new IrelandOPWFetcher
  • integration in rivretrieve/__init__.py
  • fetcher documentation
  • cached station metadata
  • example script
  • unit tests with local sample fixtures

Data source

Source:

Endpoints used:

  • station metadata:
    https://waterlevel.ie/hydro-data/data/internet/stations/stations.json
  • time series archive:
    https://waterlevel.ie/hydro-data/data/internet/stations/0/{station_id}/{parameter}/year.json

Supported variables

The new fetcher supports RivRetrieve-native daily mean variables only:

  • constants.DISCHARGE_DAILY_MEAN
  • constants.STAGE_DAILY_MEAN
  • constants.WATER_TEMPERATURE_DAILY_MEAN

Parameter mapping:

  • Q -> discharge daily mean
  • S -> stage daily mean
  • TWater -> water temperature daily mean

When OPW returns min / mean / max products in the same response, the fetcher explicitly selects the daily mean series.

Implementation notes

The implementation follows the existing RivRetrieve fetcher patterns used for:

  • Belgium Flanders
  • Germany Berlin
  • Switzerland

Key points:

  • metadata is fetched live from stations.json
  • cached metadata is stored in rivretrieve/cached_site_data/ireland_opw_sites.csv
  • gauge IDs use OPW station_no
  • padded and non-padded station IDs are both accepted
  • metadata is filtered to station IDs in the 1..41000 republication-safe range from the original OPW logic
  • date filtering is done client-side after reading the yearly archive payload

Files added / updated

Added:

  • rivretrieve/ireland_opw.py
  • docs/fetchers/ireland_opw.rst
  • examples/test_ireland_opw_fetcher.py
  • rivretrieve/cached_site_data/ireland_opw_sites.csv
  • tests/test_ireland_opw.py
  • Ireland OPW test fixtures in tests/test_data/

@thiagovmdon thiagovmdon requested a review from kratzert as a code owner March 13, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant