Skip to content

GliderDataModel API

John Kerfoot edited this page Dec 8, 2020 · 7 revisions

WikiGliderDataModel API

Contents

Introduction

The gdm package contains the GliderDataModel class, which is responsible for the conversion of a raw glider data file into into either a NetCDF-like trajectory or trajectoryProfile xarray Dataset. The following is brief explanation of the process of configuration, parsing and exporting. Working examples are found in the Cookbook.

Configuration

The instance is created by specifying a configuration directory that contains up to 4 yaml configuration files:

Examples of each of these files can be found here.

Parsing Raw Glider Data Files

Once configured, the instance requires a pandas DataFrame containing the file contents and, optionally, another pandas DataFrame containing indexed profile metadata. The gdm package contains routines for parsing the raw data and indexing profiles. These routines are specific to the glider platform and are found in:

./gdm/gliders

Parsing routines are currently available for the following glider platforms:

Exporting Datasets

There are 2 methods that export the data to an xarray Dataset:

The objects returned by any of these methods are xarray Datasets which can be used for downstream data processing, analysis or exported to CF, ACDD or IOOS Metadata Profile compliant NetCDF files.

Another method:

returns an iterator to loop through all the profiles, provided via the indexed profile metadata DataFrame, and return an xarray Dataset for each profile.

GliderDataModel

Utilities