arlmet.Probe#
- class arlmet.Probe(path, first, step, n_steps, grid, source, forecast, whole)[source]#
Cheap summary of an ARL file, from its first two index records and its size.
Made by
probe().n_stepsandwholeassume every time step is as long as the first (its index record’s own count of data records); a file whose later time steps hold a different set of variables, or whose first time step is byte-identically repeated, can still readwhole=Truehere with a misleadingn_stepsorstep.arlmet.File.check()reads every index record and catches that; probe does not, so treat a probe’s result as unverified untilcheck()has run on the file.- Variables:
path (pathlib.Path) – The probed file.
first (pandas.Timestamp) – Valid time of the first time step.
step (pandas.Timedelta or None) – Time between the first and second time steps, or
Nonewhen the file holds fewer than two (byn_steps).n_steps (int) – Number of time steps the file’s size divides into, assuming each is as long as the first.
grid (Grid) – Horizontal grid read from the first index record.
source (str) – Four-character ARL source identifier.
forecast (int) – Forecast hour of the first index record.
whole (bool) –
Truewhen the file’s size is an exact multiple of the first time step’s length;Falsewhen it leaves a remainder, which means the file is truncated partway through a time step.
See also
probeBuilds a Probe.
arlmet.File.checkFull validation, by reading every index record.
arlmet.indexIndexes every time step of a whole directory.