arlmet.Header#
- class arlmet.Header(year, month, day, hour, forecast, level, grid, variable, exponent, precision, initial_value)[source]#
Fixed-width 50-byte header present at the start of every ARL record.
Headers are immutable value objects; use
dataclasses.replace()to derive a modified copy.- Parameters:
year (int) – Valid time components stored in the record header.
month (int) – Valid time components stored in the record header.
day (int) – Valid time components stored in the record header.
hour (int) – Valid time components stored in the record header.
forecast (int) – Forecast hour associated with the record.
level (int) – ARL vertical level index.
grid (tuple[int, int]) – Thousands part of the x and y grid sizes, as stored in the header’s two grid letters (
(1000, 0)for a 1799x799 grid;(0, 0)below 1000 points). The remainders live in the index record, whosenx/nyare the full sizes.variable (str) – Four-character ARL variable name.
exponent (int) – Differential packing exponent.
precision (float) – Packed-data precision used during unpacking.
initial_value (float) – Initial grid value at the start of the differential packing stream.
- time#
Timestamp reconstructed from the header date fields.
- Type:
Methods
|
|
|
Parse header from raw bytes. |
Serialize the header to its fixed-width ASCII representation. |
Attributes
|
|
Timestamp reconstructed from the header date fields. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|