arlmet.pack#
- arlmet.pack(unpacked)[source]#
Pack a 2D field using the ARL differential byte encoding.
This is the inverse of
unpack()and mirrors the HYSPLITPAKOUTroutine.- Parameters:
unpacked (np.ndarray) – The 2D numpy array of shape (ny, nx) to be packed.
- Returns:
Tuple of
(packed, precision, exponent, initial_value).packedis the byte payload,precisionandexponentare the ARL packing parameters, andinitial_valueis the reference value at the first grid cell.- Return type: