Skip to content

Add open-meteo iotools function #2285

Open

Description

@AdamRJensen

Open-meteo offers easy access of several meteorological datasets such as ERA5: https://open-meteo.com/

Note, it requires a paid plan for commercial usage.

See previous discussion here:
Originally posted by @williamhobbs in #1484 (reply in thread)

Activity

  1. aman-coder03 commented on Dec 28, 2025

    @aman-coder03
    Contributor

    Can i work on this issue?

  2. JoooDev-TPP commented on Oct 7, 2026

    @JoooDev-TPP

    @aman-coder03, you asked about this last December. Are you still working on it? If so I'll step back. Otherwise I'd like to pick it up.

    Here is the scope I have in mind. Since forecast data in iotools is still an open question (#1528), I'd start with only the Historical Weather API (/v1/archive). That's one function, which also gives ERA5 without a CDS account:

    get_open_meteo_historical_weather(
        latitude, longitude, start, end,
        variables=['ghi', 'dni', 'dhi', 'temp_air', 'wind_speed'], *,
        model='era5', map_variables=True, api_key=None, timeout=60, url=None)

    It returns (data, meta) with a UTC index. With map_variables=True, Open-Meteo names are mapped to ghi, dni, dhi, bhi, temp_air, temp_dew, relative_humidity, wind_speed/wind_direction (10 m, requested in m/s) and pressure (hPa converted to Pa). Radiation is the mean of the preceding hour, so the index marks the end of the interval, as in get_era5. Temperature and wind are instantaneous. I checked one day against the CDS values in test_era5.py, and values and timestamps agree within rounding. The docstring would state that the free API is non-commercial only, that the data are CC BY 4.0, and that api_key switches to the customer server. Tests would use a stored JSON response, plus a few remote_data tests.

    Out of scope for now: the Historical Forecast, Previous Runs and Single Runs APIs, GTI, and multiple locations.

    Two questions:

    1. Is model='era5' an acceptable default, instead of the API's best_match, which blends in IFS runs?
    2. Should the index keep end-of-interval labels like get_era5, or shift to mid-interval like get_merra2?
  3. kandersolar commented on Oct 7, 2026

    @kandersolar
    Member

    @Zhaohh0706 this topic needs more discussion between the pvlib maintainers before any implementation. Please do not work on it.

    By the way, may I ask how pvlib came to your attention, and why you are interested in contributing to this project? Many people have been trying to contribute (via LLM, I think) to pvlib recently, and I would like to understand why that is.

  4. JoooDev-TPP commented on Oct 7, 2026

    @JoooDev-TPP

    Yeah ofc.



    But idk what’s going on with the others; can't speak for them.( I thought trying to contribute should be a good thing?


    I picked this up because I use pvlib for clear-sky irradiance and solar position in a PV power forecasting project of mine.

    The comparison with the ERA5 values in test_era5.py that I mentioned was run by opus 5.5. I have rerun it myself and verified the numbers.

    Personally speaking, I studied atmospheric science and did my MSc in energy and renewable energy, which focusing on climate change mitigation, and I'm thinking about working in renewable energy forecasting. Visible contributions to the tools I use would be a bonus for me, but I'd rather leave things alone than add noise. I'm sorry if this added to the load.

  5. cwhanse commented on Oct 7, 2026

    @cwhanse
    Member

    @Zhaohh0706 it has been noisy in here :)

    Thanks for introducing yourself and letting us know you aren't someone's coding assistant spamming PRs for resume points. And thanks for your patience!

  6. williamhobbs commented on Oct 7, 2026

    @williamhobbs
    Contributor

    Now that we have iotools.get_era5, is there a need for interfacing with open-meteo for ERA5? There's the benefit of not needing an API key for open-meteo (I think), but there's also the issue of commercial use restrictions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions