arlmet.open_dataset#
- arlmet.open_dataset(filename_or_obj, *, drop_variables=None, bbox=None, levels=None)[source]#
Open an ARL meteorology file as an xarray Dataset.
Surface-only variables (e.g.
SHGT,T02M,PRSS) have dimensions(time, lat, lon)with noleveldimension. Upper-air variables (e.g.UWND,VWND,TEMP) have dimensions(time, level, lat, lon). An upper-air variable stored on only some levels (or times) is NaN where the file has no record for it;write_dataset()writes no record for such all-NaN slices.The
levelcoordinate holds the file’s ARL level indices (surface is 0, so upper-air levels start at 1). Withlevels=the kept levels keep their original indices, which may therefore have gaps.ARL metadata is accessible via the
.arlaccessor:ds = arlmet.open_dataset("met.arl") ds.arl.grid # Grid object (survives isel/sel) ds.arl.vertical_axis # VerticalAxis ds.isel(level=0) # selects level 0 for upper vars; sfc vars unchanged
- Parameters:
filename_or_obj (path-like) – Path to the ARL file.
drop_variables (sequence of str, optional) – Variable names to omit from the resulting dataset.
bbox (tuple[float, float, float, float], optional) – Geographic bounding box
(west, south, east, north)in degrees.levels (iterable of int, optional) – ARL level indices to keep.
- Return type: