
Figure 1
Components of agrid: accessory methods, the class Grid() and example-specific code (feature methods). A class object (brown) contains functions for e.g. import and export. It also contains the xarray dataset (gray) and attributes. Various data formats (left) are converted to numpy arrays and incorporated as data arrays in an xarray dataset. Each data array can be associated to coordinates. The dataset also contains metadata (green). Data can be exported or visualized (right). Accessory methods include a download function to link the Grid() class directly to the data source if required, e.g. for dynamic updating. A few example-specific methods are also distributed together with the module [22, 33, 34].

Figure 2
Data input and visualisation examples generated by code Listings 1 and 2. (a) Vector polygon data (drainage systems [40]). (b) Subset of raster data (ice thickness [7]) Polygon vector data [40] is used to select a part of the continuous raster. (c) 3D layered plot of seismic data [1]. (d) Example of 3D rendering. Supplied tutorials and SCons script contain further details. The code may be used for any geographic area, at any scale.
