APIs to download PMs, Precipitation, Irradiance...etc from Copernicus

76 views
Skip to first unread message

Mounir Abraim

unread,
Dec 27, 2024, 5:03:39 PM12/27/24
to pvlib-...@googlegroups.com

Hi everyone,

Does anyone have experience or suggestions for directly downloading and reading NetCDF data files (e.g., for PM2.5, PM10, irradiance, precipitation, etc.) using APIs, and then processing the data in Python?

Currently, I’m using the following code to download PM data, but the output is a zip file containing a NetCDF. My goal is to download the NetCDF file directly and process it into a DataFrame.

Any help or insights would be appreciated!

Best regards,

----------------------------------------------------------------------------------------------------
import cdsapi

dataset = "cams-global-reanalysis-eac4"
request = {
    "variable": [
        "particulate_matter_2.5um",
        "particulate_matter_10um"
    ],
    "date": ["2023-01-01/2023-12-31"],
    "time": [
        "00:00", "03:00", "06:00",
        "09:00", "12:00", "15:00",
        "18:00", "21:00"
    ],
    "data_format": "netcdf_zip",
    "area": [32.27, -7.83, 23.26, -7.82]
}

client = cdsapi.Client()
client.retrieve(dataset, request).download()

----------------------------------------------------------------------------------------------------

Will Hobbs

unread,
Dec 27, 2024, 5:33:05 PM12/27/24
to Mounir Abraim, pvlib-...@googlegroups.com
I’m not familiar with the EAC4 dataset, but if what you are looking for is in ERA5, this might have some useful info: 

It’s not a full solution, though. 

Open-meteo (discussed at the GitHub link above) is one of the easier solutions I’ve seen for accessing ECMWF data, but commercial use requires a license. 

There’s also Herbie for ECMWF open forecast data, but it doesn’t look like PM is included in the open IFS dataset. 

Will

--
You received this message because you are subscribed to the Google Groups "pvlib-python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pvlib-python...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pvlib-python/CAJJA1W4%2BV3kDM0PoiiOBm1xoYgQ8SgPUwMDY9i%3DC8HQKLn1EmQ%40mail.gmail.com.

Adam R. Jensen

unread,
Mar 23, 2025, 6:36:07 PMMar 23
to pvlib-python
There's a new API for single-point time series that is much easier to use. More information and further discussion available here: https://github.com/pvlib/pvlib-python/issues/2420
Reply all
Reply to author
Forward
0 new messages