RT 2011: Screencast 18 - Python: Reading HDF5 BAG bathymetry using ipython, h5py, numpy, matplotlib
Channel: Kurt Schwehr
Date: 08/11/2011

Loading up a NOAA Hydrographic Survey Bathymetric Attributed Grid (BAG) downloaded from the National Geophysical Data Center (NGDC) in ipython.  I use the h5py module to access the hdf5 data and then manipulate the data using numpy.  I plot the data (single beam/vertical beam, not multibeam sonar) as a 2D image and as a histogram.  The key is working to convert the no data values of 1 million to "not a number" (NAN) for the image.  Then totally removing the NAN cells completely to make a 1D array to plot a histogram and calculate basic statistics.