Aronnax produces output in two formats. The full fields are saved in Fortran unformatted files, that are compact and efficient, but not particularly user friendly. Layerwise statistics are saved into one csv file per variable.
5.1. Reading the data¶
Aronnax includes a number of helper functions for dealing with the unformatted Fortran output.
The simplest of these is interpret_raw_file which loads a single output of a single variable into a numpy array.
interpret_raw_file(name, nx, ny, layers)¶
Read an output file dumped by the Aronnax core.
Each such file contains one array, whose size depends on what, exactly, is in it, and on the resolution of the simulation. Hence, the parameters nx, ny, and layers, as well as the file naming convetion, suffice to interpret the content (assuming it was generated on the same system).
Open a number of output files into an xarray dataarray. All files must contain the same variable.
Uses dask.delayed to lazily load data as required.
- files (list) – a list of file names to load
- grid – a grid object created by aronnax.Grid
xarray.DataArray of the desired variable