arlmet.RecordSet#

class arlmet.RecordSet(file, position, time, *, forecast=None)[source]#

Records for one valid time within an ARL file.

Parameters:
  • file (File) – Parent ARL file handle.

  • position (int) – Byte offset of the index record on disk, or -1 for a new writable record set.

  • time (pandas.Timestamp) – Valid time represented by the record set.

  • forecast (int, optional) – Forecast hour stored in the index record header.

file#

Parent ARL file.

Type:

File

position#

Byte offset of the index record.

Type:

int

time#

Valid time of the record set.

Type:

pandas.Timestamp

forecast#

Forecast hour associated with the index record.

Type:

int or None

records#

Data records stored at this time.

Type:

list[DataRecord]

variables#

Lazy variable accessor inherited from RecordCollection.

Type:

VariableAccessor

__getitem__(key)[source]#

Get a DataRecord by (level, variable) key.

__iter__()[source]#

Iterate over DataRecords in this record set.

__len__()[source]#

Get the number of records in this record set.

create_datarecord(variable, level, forecast=-1, data=None)[source]#

Create a writable data record for this time.

Methods

RecordSet.__init__(file, position, time, *)

RecordSet.create_datarecord(variable, level, ...)

Create a writable DataRecord attached to this time step.

Attributes

RecordSet.grid

RecordSet file grid

RecordSet.mode

Access mode of the record set, inferred from the position.

RecordSet.record_length

Record length in bytes for this record set, derived from the file grid.

RecordSet.records

List of DataRecords in this record set.

RecordSet.source

RecordSet file source

RecordSet.vertical_axis

RecordSet file vertical axis