arlmet.DataRecord#
- class arlmet.DataRecord(recordset, position, level, variable, forecast=None, checksum=None, reserved=None)[source]#
One ARL data record representing a single 2D variable slice.
- Parameters:
recordset (RecordSet) – Parent record set for the record.
position (int) – Byte offset of the record on disk, or
-1for a writable in-memory record.level (int) – ARL vertical level index.
variable (str) – Four-character ARL variable name.
forecast (int, optional) – Forecast hour required when constructing a writable record.
checksum (int, optional) – Stored ARL checksum from the index record.
reserved (str, optional) – Reserved one-character metadata from the index record.
- data#
Cached unpacked data, loaded lazily on first access.
- Type:
array-like
Methods
|
Initializes the array representation. |
|
Read and unpack this record eagerly. |
|
Convert this DataRecord to an xarray.DataArray. |
Verify the packed payload against the checksum stored in metadata. |
Attributes
|
Get the packed bytes for this data record. |
|
Get the stored checksum for this data record. |
Get the data for this record. |
|
|
Return the attached DIF record when present. |
|
|
|
Get the forecast hour for this data record. |
|
Get the grid associated with this data record. |
|
|
|
|
|
Get the number of bytes in the packed data record (including the header). |
Return the shape of the data grid. |
|
|
Get the source associated with this data record. |
|
Get the time associated with this data record. |
|
Get the vertical axis associated with this data record. |