arlmet.DataRecord.read#

DataRecord.read(window=None)[source]#

Read and unpack this record from disk.

Each call returns a new array and nothing is cached on the record, so reading many records does not accumulate memory. Use data for a cached full-grid copy. Each of the record’s diffs is added, in stream order, as HYSPLIT does.

A record flagged missing (a negative forecast hour in its header, or the name NULL) reads as NaN, and a missing DIF* record adds nothing: HYSPLIT’s reader skips both. arlmet.File.check() lists such records.

Parameters:

window (GridWindow | None) – Spatial subset to unpack. When omitted, the full grid is read. A window across the seam of a lat/lon grid that spans 360 degrees (x_stop past nx) reads its columns in that order, wrapping from the last column to the first.

Returns:

Unpacked float32 array for the full field or the requested window, NaN where the record is flagged missing.

Return type:

NDArray[single]