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
datafor a cached full-grid copy. Each of the record’sdiffsis 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 missingDIF*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_stoppastnx) reads its columns in that order, wrapping from the last column to the first.- Returns:
Unpacked
float32array for the full field or the requested window, NaN where the record is flagged missing.- Return type: