Overview¶
Users with NCAR HPC access (Derecho, Casper) can read GDEX datasets directly from the POSIX filesystem without downloading them, enabling fast local I/O at petabyte scale.
Locate a GDEX dataset on the NCAR filesystem
Read data directly with xarray
Understand path conventions
Prerequisites¶
| Concepts | Importance | Notes |
|---|---|---|
| NCAR HPC account (Derecho or Casper) | Necessary | Filesystem access |
| xarray | Necessary | Reading netCDF/GRIB data |
| gdex_intro | Helpful | Dataset ID conventions |
Time to learn: 15 minutes
Imports¶
import os
from pathlib import Path
import xarray as xrGDEX POSIX Path Conventions¶
GDEX datasets are mounted at /gdex/data/ on NCAR systems. Each dataset occupies a directory named by its ID (e.g., ds633000/).
# set the path to your target dataset
# RDA_ROOT = Path("/gdex/data")
# DS_PATH = RDA_ROOT / "ds633000" # ERA5 0.25-degree
# print(list(DS_PATH.iterdir())[:10])Reading Data with xarray¶
Once you know the path to a file or directory, open it with xr.open_dataset or xr.open_mfdataset for lazy, memory-efficient access.
# open a dataset file directly
# ds = xr.open_dataset(DS_PATH / "e5.oper.an.pl/197901/e5.oper.an.pl.128_129_z.ll025sc.1979010100_1979010123.nc")
# dsSelecting a Subset in Memory¶
Use xarray’s .sel() and .isel() to extract the region and time period you need before loading into memory.
# select a spatial/temporal subset
# subset = ds["Z"].sel(latitude=slice(60, 20), longitude=slice(-30, 40), level=500)
# subset.load()Summary¶
POSIX access on NCAR HPC systems eliminates download time for GDEX datasets. Pair it with xarray lazy loading to work with datasets far larger than available RAM.
What’s next?¶
See zarr_intro.ipynb for cloud-optimized access from outside NCAR, or tds_intro.ipynb for remote OPeNDAP access.