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_steps and whole assume 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 read whole=True here with a misleading n_steps or step. arlmet.File.check() reads every index record and catches that; probe does not, so treat a probe’s result as unverified until check() 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 None when the file holds fewer than two (by n_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) – True when the file’s size is an exact multiple of the first time step’s length; False when it leaves a remainder, which means the file is truncated partway through a time step.

See also

probe

Builds a Probe.

arlmet.File.check

Full validation, by reading every index record.

arlmet.index

Indexes every time step of a whole directory.