Skip to content

Writing Glider Trajectory NetCDF Files

kerfoot edited this page Oct 9, 2013 · 5 revisions

WikiCookbookTrajectory NetCDF Files

Discussion and examples for preparing and writing glider Trajectory NetCDF files for submission to the United States National Glider Data Assembly Center using the Slocum Power Tools toolbox.

###Background### The Dbd and DbdGroup classes are the base classes used for loading and preparing glider datasets for export to Trajectory NetCDF files. Routines for performing the export to NetCDF are located here:

./slocum/matlab/spt/export/nc/IOOS/trajectory

This process involves the following steps, details of which will be discussed in below:

  1. Create and instance of the Dbd class for each new native Slocum glider data file (merged sbd/tbd files).
  2. Perform sensor QA/QC checks on the raw data and, optionally, adding QC'd sensors to the Dbd instance.
  3. Add the Dbd instance to an existing (or new) DbdGroup instance.
  4. Map the NetCDF variables to the native Dbd instance sensors.
  5. Create an instance of the GTrajectoryNc.m class.
  6. Write the NetCDF file(s) using the GTrajectoryNc.toNc method.

The toolbox contains a script, DbdGroup2TrajectoryNc.m, which takes an instance of the DbdGroup class as an input, and writes NetCDF files for all glider data segments contained in DbdGroup.newSegments . We've already covered creating DbdGroup instances, so let's get on to preparing the segments and writing them to NetCDF Trajectory files.

Clone this wiki locally