arlmet.File#
- class arlmet.File(path, mode='r', source=None, grid=None, vertical_axis=None)[source]#
Read or write an ARL meteorology file.
- Parameters:
path (path-like) – Location of the ARL file on disk.
mode ({"r", "w"}, default "r") – File mode. Read mode scans the file immediately; write mode expects the caller to provide
source,grid, andvertical_axisbefore creating records.source (str, optional) – Four-character ARL source identifier used when writing.
grid (Grid, optional) – Horizontal grid metadata used when writing.
vertical_axis (VerticalAxis, optional) – Vertical axis metadata used when writing.
- path#
Filesystem path for the ARL file.
- Type:
- mode#
Active file mode.
- Type:
{“r”, “w”}
- times#
Sorted valid times discovered in the file.
- Type:
- vertical_axis#
Vertical coordinate metadata.
- Type:
- variables#
Lazy accessor for variable-wise views inherited from RecordCollection.
- Type:
VariableAccessor
- sample_points(points, variables, ...)[source]#
Interpolate fields at arbitrary lon/lat/z sample points.
Examples
>>> import arlmet >>> with arlmet.File("met.arl") as met: ... met.times[0] Timestamp('2024-07-18 00:00:00')
Methods
|
|
|
Add one writable DataRecord, creating its RecordSet if needed. |
Flush pending writes and close the managed binary file handle. |
|
|
Create and attach the horizontal grid metadata for a writable file. |
|
Create a writable RecordSet for one valid time. |
|
Record and validate the explicit parent binding for a generated DIF name. |
|
Sample fields from this file at arbitrary lon/lat/z points. |
|
Project this file into the simplified analysis Dataset representation. |
Attributes
|
|
|
|
|
List of all DataRecords in the file across all RecordSets. |
|
|
Return a sorted list of timestamps in the file. |
|