Python interface with client set to Google

Hi,

I’m using the ecmwf-opendata Python client to download ensemble precipitation probability data (parameter ep, stream enfo). The same script works correctly against source=“azure” but fails consistently against source=“google”. I’d appreciate an explanation of the expected behaviour.

from ecmwf.opendata import Client

steps = [f"{12 * i}-{12 * i + 24}" for i in range(29)]
client = Client(source=“google”)

client.retrieve(
date=0,
time=“00”,
type=“ep”,
step=steps,
stream=“enfo”,
param=[“tpg1”],
target=“tpg1.grib2”,
)

ERROR - URL https://storage.googleapis.com/ecmwf-open-data/20260517/00z/ifs/0p25/enfo/20260517000000-240h-enfo-ep.grib2:

<?xml version='1.0' encoding='UTF-8'?> InvalidArgument Invalid argument.
Multiple ranges are not supported; Range:bytes=0-451593,971655-1471811,2064925-2509663,7498335-8000346, …
ERROR - tpg1: Download failed - HTTPError: 400 Client Error: Bad Request

Is the Google source intended to work with multi-message retrievals like this, or is it only supported for single-message requests (e.g. the README example step=240, param=“msl”)?

Brian

Hi Brian,
this is a known issue with the Google source when using byte ranges. There is some work on this but there is no timeline at the moment on when the fix will be available.

Thanks