Skip to article frontmatterSkip to article content

Data Access Instructions

Data are accessible via an object store system, which enables easy, scalable web access!

Imports

import fsspec
import urllib.request
from pathlib import Path
import xradar as xd
import pyart

## You are using the Python ARM Radar Toolkit (Py-ART), an open source
## library for working with weather radar data. Py-ART is partly
## supported by the U.S. Department of Energy as part of the Atmospheric
## Radiation Measurement (ARM) Climate Research Facility, an Office of
## Science user facility.
##
## If you use this software to prepare a publication, please cite:
##
##     JJ Helmus and SM Collis, JORS 2016, doi: 10.5334/jors.119

Find Data in the Bucket

It is stored on the jetstream cloud bucket, under the /pythia/radar/erad2024 space.

# Set the URL and path for the cloud
URL = "https://js2.jetstream-cloud.org:8001/"
path = f"pythia/radar/erad2024"


fs = fsspec.filesystem("s3", anon=True, client_kwargs=dict(endpoint_url=URL))

fs.glob(f"{path}/*")
['pythia/radar/erad2024/.DS_Store', 'pythia/radar/erad2024/20240522_MeteoSwiss_ARPA_Lombardia', 'pythia/radar/erad2024/baltrad', 'pythia/radar/erad2024/dda_data', 'pythia/radar/erad2024/gpm_api', 'pythia/radar/erad2024/lrose', 'pythia/radar/erad2024/pyrad', 'pythia/radar/erad2024/wradlib', 'pythia/radar/erad2024/zarr_radar']

Find Data to Stream

We can easily stream the data with xradar

files = fs.glob("pythia/radar/erad2024/dda_data/*")[:1]
files
['pythia/radar/erad2024/dda_data/ARPA_Lombardia.20240522.151546_dealiased.nc']
local_files = [
    fsspec.open_local(
        f"simplecache::{URL}{i}", s3={"anon": True}, filecache={"cache_storage": "."}
    )
    for i in files
]
dt = xd.io.open_cfradial1_datatree(local_files[0])
radar = pyart.io.read_cfradial(local_files[0])
dt
Loading...

Download the Data Locally

We can also use the url of the data to download the data locally if neccessary!

for file in files:
    urllib.request.urlretrieve(f"{URL}{file}", Path(file).name)