ARCO Data Hub (2010 to now)¶
dpc_radar.arco ¶
The DPC radar archive of the ARCO Data Hub: any frame since 2010, and the last one.
The ARCO Data Hub <https://arcodatahub.com/>_ (Fondazione Bruno Kessler on
DPC data, for the IT4LIA AI Factory) keeps the national radar mosaics as Zarr
stores that grow every five minutes: the history the DPC API does not give
(it keeps about five months) and products it does not publish as open data.
:class:ArcoClient reads one frame at a time, as a
:class:~dpc_radar.grid.RainGrid:
================ ========================================== ============
name what it is since
================ ========================================== ============
SRI rain intensity, mm/h 2010
SRT1 rain of the last hour, mm July 2018
VMI highest reflectivity in the column, dBZ 2018
CAPPI2-8 reflectivity at 2000 to 8000 m, dBZ 2018 to 2022
VIL liquid water in the column, mm (kg/m²) July 2018
ETM height of the echo top, m July 2018
OPERA VMI of Europe at 2 km, with the DPC's July 2024
================ ========================================== ============
It is not open like the DPC API: it needs a free account and the
subscription to each dataset, and it asks for fair use. The user name and the
access key come from ARCODATAHUB_USERNAME and ARCODATAHUB_ACCESS_KEY,
or from the arguments. The data are CC BY-SA 4.0: credit «FBK in cooperation
with Dipartimento Protezione Civile Nazionale» (and OPERA for OPERA).
It is read here without zarr or xarray: one request for a frame of SRI
(a Zarr v2 store, one object per frame), two for the others (Zarr v3, 288
frames in one object: the index at its end, then the bytes of the frame). The
codecs come with the extra arco (pip install "dpc-radar[arco]").
What a value means. Three states, as in the rest of the library:
- a number: measured;
NaN: not measured (outside the radars' range, or a frame with a hole),-9999in the store;- no echo: measured, and nothing there (
-9998in the store). It becomes-infin a reflectivity (0 dBZ is a weak echo, not an absence) and0in a height or a quantity of water.
The traps.
- The time axis is not regular:
SRIhas a frame every 15 minutes in 2010, every 5 today;SRT1is hourly until July 2020. Ask :meth:ArcoClient.timeswhich frames exist, never compute them from a step. - Before 30 April 2026 (and not in all of 2025) no echo in a reflectivity is written as 0 dBZ, which cannot be told from a weak echo: it stays 0.
VILbetween August 2019 and October 2025 has no 0.5 bin in some frames: it was merged into 0 when two encodings were made one.SRT1here is the same frame the DPC API serves asSRT1, pixel by pixel (checked on 30 hours of 2026).OPERAis on another grid (2 km, ETRS89-LAEA) and is reflectivity, not rain: it does not compare withSRIas it is.- The frame of a time not yet published, or lost, is
None: not an error.
The client keeps the description of a store and its time axis in memory. With
cache it also keeps them, and every frame it reads, in a folder: a frame on
disk is not asked again.
ArcoDataset
dataclass
¶
One store of the hub, and what its frames become.
Store
dataclass
¶
ArcoClient ¶
The radar stores of the ARCO Data Hub, a frame at a time.
client, send, retries and backoff_s are those of
:class:~dpc_radar.client.RadarClient: your own httpx.AsyncClient, or
your own HTTP layer, which then does the retrying. The credentials go with
every request as HTTP Basic, never in the URL.
store
async
¶
store(name: str | ArcoDataset, *, refresh: bool = False) -> Store
The description of a store; read once, and again with refresh.
last
async
¶
last(name: str | ArcoDataset) -> datetime
The time of the newest frame of a store, asked again at every call.
times
async
¶
times(name: str | ArcoDataset, start: datetime, end: datetime) -> list[datetime]
The times of the frames from start to end, both included.
Only frames already written: nothing after the last one the store knew
of when this client read its description (:meth:last reads it again).
frame
async
¶
frame(name: str | ArcoDataset, time: datetime) -> RainGrid | None
The frame of time (aware); None if the store has no frame at that time.
frames
async
¶
frames(name: str | ArcoDataset, start: datetime, end: datetime, *, limit: int = MAX_FRAMES) -> list[RainGrid]
The frames from start to end, both included, the oldest first.
A frame the store lost is left out. More than limit frames raise
before anything is downloaded: the hub asks to be told before a large
pull, and a year asked by mistake is 100,000 frames.
parse_store ¶
parse_store(payload: dict[str, Any], name: str | ArcoDataset) -> Store
A :class:Store from the consolidated metadata of a store.
payload is the zarr.json of a Zarr v3 store or the .zmetadata
of a v2 one. A layout this module does not read (another codec, frames
grouped in another way) raises :class:~dpc_radar.errors.DpcRadarError:
better than a frame of noise.
index_range ¶
index_range(store: Store) -> str
The Range of the index at the end of a sharded object.
Sixteen bytes per frame (where it starts, how long it is) and four of checksum.
chunk_range ¶
chunk_range(store: Store, index: bytes, i: int) -> str | None
The Range of frame i inside its object; None if the object does not hold it.
decode_frame ¶
decode_frame(store: Store, raw: bytes) -> np.ndarray
The values of a frame from its compressed bytes: see the module for what they mean.