Www.hdfgroup.org The HDF Group April 17-19, 2012HDF/HDF-EOS Workshop XV1 Introduction to HDF5 Barbara Jones The HDF Group The 15 th HDF and HDF-EOS Workshop.

Slides:



Advertisements
Similar presentations
A PLFS Plugin for HDF5 for Improved I/O Performance and Analysis Kshitij Mehta 1, John Bent 2, Aaron Torres 3, Gary Grider 3, Edgar Gabriel 1 1 University.
Advertisements

The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 HDF5 Advanced Topics Elena Pourmal The HDF Group The 13 th HDF and HDF-EOS.
Streaming NetCDF John Caron July What does NetCDF do for you? Data Storage: machine-, OS-, compiler-independent Standard API (Application Programming.
The Future of NetCDF Russ Rew UCAR Unidata Program Center Acknowledgments: John Caron, Ed Hartnett, NASA’s Earth Science Technology Office, National Science.
11/6/07HDF and HDF-EOS Workshop XI, Landover, MD1 Introduction to HDF5 HDF and HDF-EOS Workshop XI November 6-8, 2007.
10/15/08HDF & HDF-EOS Workshop XII11 Introduction to HDF5 HDF & HDF-EOS Workshop XII October 15, 2008.
The HDF Group Introduction to HDF5 Barbara Jones The HDF Group The 13 th HDF & HDF-EOS Workshop November 3-5, HDF/HDF-EOS Workshop.
Status of netCDF-3, netCDF-4, and CF Conventions Russ Rew Community Standards for Unstructured Grids Workshop, Boulder
Euratom – ENEA Association Commonalities and differences between MDSplus and HDF5 data systems G. Manduchi Consorzio RFX, Euratom-ENEA Association, corso.
1 of 14 Substituting HDF5 tools with Python/H5py scripts Daniel Kahn Science Systems and Applications Inc. HDF HDF-EOS Workshop XIV, 28 Sep
HDF5 Tools Update Peter Cao - The HDF Group November 6, 2007 This report is based upon work supported in part by a Cooperative Agreement.
Parallel HDF5 Introductory Tutorial May 19, 2008 Kent Yang The HDF Group 5/19/20081SCICOMP 14 Tutorial.
HDF 1 HDF5 Advanced Topics Object’s Properties Storage Methods and Filters Datatypes HDF and HDF-EOS Workshop VIII October 26, 2004.
1 High level view of HDF5 Data structures and library HDF Summit Boeing Seattle September 19, 2006.
HDF5 A new file format & software for high performance scientific data management.
The HDF Group Parallel HDF5 Design and Programming Model May 30-31, 2012HDF5 Workshop at PSI 1.
April 6, 2010GMQS Meeting1 Optional Feature Support in HDF5 Tools Albert Cheng The HDF Group.
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
February 2-3, 2006SRB Workshop, San Diego P eter Cao, NCSA Mike Wan, SDSC Sponsored by NLADR, NFS PACI Project in Support of NCSA-SDSC Collaboration Object-level.
1 Introduction to HDF5 Data Model, Programming Model and Library APIs HDF and HDF-EOS Workshop VIII October 26, 2004.
April 28, 2008LCI Tutorial1 HDF5 Tutorial LCI April 28, 2008.
May 30-31, 2012HDF5 Workshop at PSI1 HDF5 at Glance Quick overview of known topics.
The HDF Group HDF5 Datasets and I/O Dataset storage and its effect on performance May 30-31, 2012HDF5 Workshop at PSI 1.
The netCDF-4 data model and format Russ Rew, UCAR Unidata NetCDF Workshop 25 October 2012.
April 28, 2008LCI Tutorial1 Introduction to HDF5 Tools Tutorial Part II.
The HDF Group HDF5 Tools Updates Peter Cao, The HDF Group September 28-30, 20101HDF and HDF-EOS Workshop XIV.
HDF Dimension Scales in HDF5 HDF-EOS Workshop IX San Francisco, CA November 30 - December 2, 2005 Pedro Vicente Nunes THG/NCSA Champaign-Urbana, IL HDF.
The HDF Group October 28, 2010NetcDF Workshop1 Introduction to HDF5 Quincey Koziol The HDF Group Unidata netCDF Workshop October 28-29,
1 HDF5 Life cycle of data Boeing September 19, 2006.
A High performance I/O Module: the HDF5 WRF I/O module Muqun Yang, Robert E. McGrath, Mike Folk National Center for Supercomputing Applications University.
NetCDF Data Model Issues Russ Rew, UCAR Unidata NetCDF 2010 Workshop
1 Introduction to HDF5 Data Model, Programming Model and Library APIs HDF and HDF-EOS Workshop IX November 30, 2005.
The HDF Group Support for NPP/NPOESS by The HDF Group Mike Folk, Elena Pourmal, Peter Cao The HDF Group November 5, 2009 November 3-5,
HDF Hierarchical Data Format Nancy Yeager Mike Folk NCSA University of Illinois at Urbana-Champaign, USA
The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 HDF5 Advanced Topics Elena Pourmal The HDF Group The 13 th HDF and HDF-EOS.
HDF5.
September 9, 2008SPEEDUP Workshop - HDF5 Tutorial1 Introduction to HDF5 Command-line Tools.
The HDF Group Introduction to netCDF-4 Elena Pourmal The HDF Group 110/17/2015.
The HDF Group HDF5 Chunking and Compression Performance tuning 10/17/15 1 ICALEPCS 2015.
The HDF Group HDF Group Support for NPP/JPSS Mike Folk, Elena Pourmal, Larry Knox, Albert Cheng The HDF Group DEWG Meeting June 19, 2012.
NetCDF-4: Software Implementing an Enhanced Data Model for the Geosciences Russ Rew, Ed Hartnett, and John Caron UCAR Unidata Program, Boulder
The HDF Group Single Writer/Multiple Reader (SWMR) 110/17/15.
The HDF Group 10/17/151 HDF5 Tools Tutorial ICALEPCS 2015.
The HDF Group 10/17/15 1 HDF5 vs. Other Binary File Formats Introduction to the HDF5’s most powerful features ICALEPCS 2015.
Intro to Parallel HDF5 10/17/151ICALEPCS /17/152 Outline Overview of Parallel HDF5 design Parallel Environment Requirements Performance Analysis.
April 28, 2008LCI Tutorial1 Parallel HDF5 Tutorial Tutorial Part IV.
September 9, 2008SPEEDUP Workshop - HDF5 Tutorial1 HDF5 Tutorial 37 th SPEEDUP Workshop on HPC Albert Cheng, Elena Pourmal The HDF Group.
SDM Center Parallel I/O Storage Efficient Access Team.
The HDF Group 10/17/151 Introduction to HDF5 ICALEPCS 2015.
1 Introduction to HDF5 Programming and Tools Boeing September 19, 2006.
The HDF Group Introduction to HDF5 Session Two Data Model Comparison HDF5 File Format 1 Copyright © 2010 The HDF Group. All Rights Reserved.
The HDF Group Single Writer/Multiple Reader (SWMR) 110/17/15.
The HDF Group Introduction to HDF5 Session 7 Datatypes 1 Copyright © 2010 The HDF Group. All Rights Reserved.
Unidata Infrastructure for Data Services Russ Rew GO-ESSP Workshop, LLNL
NetCDF Data Model Details Russ Rew, UCAR Unidata NetCDF 2009 Workshop
Copyright © 2010 The HDF Group. All Rights Reserved1 Data Storage and I/O in HDF5.
Other Projects Relevant (and Not So Relevant) to the SODA Ideal: NetCDF, HDF, OLE/COM/DCOM, OpenDoc, Zope Sheila Denn INLS April 16, 2001.
The HDF Group Introduction to HDF5 Session Three HDF5 Software Overview 1 Copyright © 2010 The HDF Group. All Rights Reserved.
1 January 11-13, 2010ESRF Workshop – Introduction to HDF5 Introduction to HDF5 Francesc Alted Consultant and PyTables creator.
HDF and HDF-EOS Workshop XII
Parallel HDF5 Introductory Tutorial
Introduction to HDF5 Session Five Reading & Writing Raw Data Values
HDF5 Metadata and Page Buffering
Ruth Aydt Quincey Koziol The HDF Group
Introduction to HDF5 Tutorial.
HDF5 Virtual Dataset Elena Pourmal Copyright 2017, The HDF Group.
Peter Cao The HDF Group November 28, 2006
Introduction to HDF5 Mike McGreevy The HDF Group
Moving applications to HDF
Hierarchical Data Format (HDF) Status Update
Presentation transcript:

The HDF Group April 17-19, 2012HDF/HDF-EOS Workshop XV1 Introduction to HDF5 Barbara Jones The HDF Group The 15 th HDF and HDF-EOS Workshop April 17-19, 2012

Foreword We will be using H5Py – Python interface to HDF5 Easy to learn Saves a lot of time fro prototyping and getting data and metadata out of HDF5 files Hides HDF5 complexity Resources Installation requires Python 2.7, NumPy 1.6.1, and HDF (or later) April 17-19, 2012HDF/HDF-EOS Workshop XV2

Topics Covered What HDF5 is HDF5 Data Model HDF5 Software and Tools Introduction to HDF5 APIs Examples April 17-19, 2012HDF/HDF-EOS Workshop XV3

What is HDF5? Open file format Designed for high volume or complex data Open source software Works with data in the format A data model Structures for data organization and specification April 17-19, 2012HDF/HDF-EOS Workshop XV4

HDF = Hierarchical Data Format HDF4 is the first HDF Originally called HDF; last major release was version 4 HDF5 benefits from lessons learned with HDF4 Changes to file format, software, and data model HDF5 and HDF4 are different No plans for an HDF6! HDF/HDF-EOS Workshop XV5April 17-19, 2012

HDF5 has characteristics of … HDF/HDF-EOS Workshop XV6April 17-19, 2012

HDF5 is designed … for small or high volume and/or complex data for every size and type of system (portable) for flexible, efficient storage and I/O to enable applications to evolve in their use of HDF5 and to accommodate new models to support long-term data preservation Use it as a file format tool kit HDF/HDF-EOS Workshop XV7April 17-19, 2012

HDF5 Technology Platform HDF/HDF-EOS Workshop XV8 HDF5 data model The “building blocks” for data organization and specification HDF5 software Library, language interfaces, tools HDF5 file format Bit-level organization of HDF5 file Let’s look at …. April 17-19, 2012

HDF5 Data Model HDF/HDF-EOS Workshop XV9 File Dataset a.k.a. HDF5 Abstract Data Model a.k.a. HDF5 Logical Data Model Link Group Attribute Dataspace Datatype HDF5 Objects April 17-19, 2012 Property List

HDF5 File HDF/HDF-EOS Workshop XV10 lat | lon | temp ----|-----| | 23 | | 24 | | 21 | 3.6 An HDF5 file is a container that holds data objects. Experiment Notes: Serial Number: Date: 3/13/09 Configuration: Standard 3 April 17-19, 2012

HDF5 Dataset Data Metadata Dataspace 3 Rank Dim_2 = 5 Dim_1 = 4 Dimensions Time = 32.4 Pressure = 987 (optional)Attributes Chunked Compressed Dim_3 = 7 Properties Integer Datatype April 17-19, HDF/HDF-EOS Workshop XV Multi-dimensional array of identically typed data elements HDF5 datasets organize and contain “raw data values”. HDF5 datatypes describe individual data elements. HDF5 dataspaces describe the logical layout of the data elements.

HDF5 Dataset & Dataspace 12 HDF5 datasets organize and contain “raw data values”. HDF5 dataspaces describe the logical layout of the data elements Multi-dimensional array of identically typed data elements Specifications for array dimensions 3RankDimensions HDF5 Dataspace Dim_3 = 7 April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 Dataspaces Describe the logical layout of the elements in an HDF5 dataset NULL - no elements Scalar - single element Simple array (most common) - Multiple elements organized in a rectilinear array: Rank = number of dimensions Dimension size = number of elements in each dimension Maximum number of elements in each dimension can be fixed or unlimited 13April 17-19, 2012 HDF/HDF-EOS Workshop XV

HDF5 Dataspaces Two roles: Dataspace contains spatial information (logical layout) about a dataset stored in a file Rank and dimensions Permanent part of dataset definition Partial I/0: Dataspaces describe applications’ data buffers and data elements participating in I/O Rank = 2 Dimensions = 4x6 Rank = 1 Dimension = 10 14April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 Dataset & Datatype 15 HDF5 datasets organize and contain “raw data values”. HDF5 datatypes describe individual data elements. Integer 32bit LE HDF5 Datatype Multi-dimensional array of identically typed data elements Specifications for single data element April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 Datatypes Describe individual data elements in an HDF5 dataset Wide range of datatypes supported Integer (signed and unsigned, 32 and 64-bit, etc.) Float Variable-length sequence types (e.g., strings) Compound (similar to C structs) User-defined (e.g., 13-bit integer) Nested types Pretty much any type! 16April 17-19, 2012 HDF/HDF-EOS Workshop XV

HDF5 Dataset Dataspace: Rank = 2 Dimensions = 5 x 3 17 Datatype: 32-bit Integer April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 Dataset with Compound Datatype int16charint32 2x3x2 array of float32 Compound Datatype: Dataspace: Rank = 2, Dimensions = 5 x VVV V V V 18April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 Dataset Data Metadata Dataspace 3 Rank Dim_2 = 5 Dim_1 = 4 Dimensions Time = 32.4 Pressure = 987 Chunked Compressed Dim_3 = 7 Properties Integer Datatype April 17-19, HDF/HDF-EOS Workshop XV Multi-dimensional array of identically typed data elements Attributes (optional)

HDF5 Property Lists April 17-19, HDF/HDF-EOS Workshop XV Property lists allow you to configure or control the behavior of the library. They provide fine grain control when creating or accessing objects. For example how datasets are stored, performance tuning… There are default values associated with property lists.

Special Storage Options April 17-19, Better subsetting access time; extendable chunked Arrays can be extended in any direction extendable Metadata for Fred Dataset “Fred” File A File B Data for Fred Metadata in one file, raw data in another. External file Improves storage efficiency, transmission speed compressed HDF/HDF-EOS Workshop XV

Dataset Storage Properties April 17-19, 2012HDF/HDF-EOS Workshop XV22 Chunked Chunked & Compressed Better access time for subsets; extendible Improves storage efficiency, transmission speed Contiguous(default) Data elements stored physically adjacent to each other

HDF5 Attributes Typically contain user metadata Have a name and a value Attributes “decorate” HDF5 objects Value is described by a datatype and a dataspace Analogous to a dataset, but do not support partial IO operations; nor can they be compressed or extended 23April 17-19, 2012 HDF/HDF-EOS Workshop XV

HDF5 Data Model: Are we there yet? 24 File Dataset and LinkGroup Attribute Dataspace Datatype HDF5 Objects April 17-19, 2012 Property List HDF/HDF-EOS Workshop XV

HDF5 Groups and Links 25 lat | lon | temp ----|-----| | 23 | | 23 | | 24 | | 24 | | 21 | | 21 | 3.6 / SimOut Viz HDF5 groups and links organize data objects. Every HDF5 file has a root group Parameters 10;100;1000 Timestep 36,000 April 17-19, 2012HDF/HDF-EOS Workshop XV Similar to UNIX directories

HDF5 Groups “/” A B C k m temp The path to an object defines it Objects can be shared: /A/k and /B/m are the same = Group = Dataset April 17-19, HDF/HDF-EOS Workshop XV temp

HDF5 Technology Platform HDF/HDF-EOS Workshop XV27 HDF5 data model The “building blocks” for data organization and specification April 17-19, 2012 Let’s look at …. HDF5 software Library, language interfaces, tools

HDF5 Home Page HDF5 home page: Latest release: HDF (1.8.9 coming in May) HDF5 source code: Written in C, and includes optional C++, Fortran 90 APIs, and High Level APIs. Contains command-line utilities (h5dump, h5repack, h5diff,..) and compile scripts HDF5 pre-built binaries: When possible, include C, C++, F90, and High Level libraries. Check./lib/libhdf5.settings file. Built with and require the SZIP and ZLIB external libraries, which are included. 28April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 API and Applications … Storage Domain Data Objects EOS library Applications EOS Application MATLAB 29 HDF5 Library April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 Software Layers & Storage HDF5 File Format File Split Files File on Parallel Filesystem Other I/O Drivers Virtual File Layer Posix I/O Split Files MPI I/OCustom Internals Memory Mgmt Datatype Conversion Filters Chunked Storage Version Compatibility and so on… Language Interfaces C, Fortran, C++ HDF5 Data Model Objects Groups, Datasets, Attributes, … Tunable Properties Chunk Size, I/O Driver, … HDF5 Library Storage h5dump tool High Level APIs HDFview tool Tools h5repack tool Java Interface … API 30April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 File Format Defined by the HDF5 File Format Specification. Specifies the bit-level organization of an HDF5 file on storage media. HDF5 library adheres to the File Format, so for the most part basic users do not need to know the guts of this information. 31April 17-19, 2012 HDF/HDF-EOS Workshop XV

Useful Tools For New Users h5dump: Tool to “dump” or display contents of HDF5 files h5cc, h5c++, h5fc: Scripts to compile applications HDFView: Java browser to view HDF4 and HDF5 files 32April 17-19, 2012HDF/HDF-EOS Workshop XV

h5dump utility April 17-19, 2012HDF/HDF-EOS Workshop XV33 h5dump [options] [file] -H, --header Display header only – no data -d Display specified pathname/dataset(s) -g Display the specified group(s) and all members -p Display properties is one or more appropriate object names.

Example of h5dump Output April 17-19, 2012HDF/HDF-EOS Workshop XV34 HDF5 “my.h5" { GROUP "/" { DATASET “mydata" { DATATYPE { H5T_STD_I32BE } DATASPACE { SIMPLE ( 4, 6 ) / ( 4, 6 ) } DATA { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 } “/” mydata my.h5

Introduction to HDF5 Programming Model and APIs 35April 17-19, 2012HDF/HDF-EOS Workshop XV

General Programming Paradigm Object is opened or created Object is written to or read from, possibly many times Object is closed Properties of object are optionally defined Creation properties Access properties 36April 17-19, 2012HDF/HDF-EOS Workshop XV

Order of Operations An order is imposed on operations by argument dependencies For Example: A file must be opened before a dataset -because- the dataset open call requires a file handle as an argument. Objects can be closed in any order. 37April 17-19, 2012HDF/HDF-EOS Workshop XV

The HDF5 API The API is extensive 300+ functions This can be daunting… but there is hope A few functions can do a lot Start simple Build up knowledge as more features are needed Swiss Army Cybertool 34 38April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 APIs Currently C, Fortran 90, C++ and Java bindings supported by The HDF Group Others: HDF5DotNet (C#, VB.NET, IronPython,..) h5py(Python) (developed by Andrew Collette) 39April 17-19, 2012HDF/HDF-EOS Workshop XV

Language Specific Requirements For portability, the HDF5 library has its own defined types. For example, hid_t is used for object handles. Must include language specific files in your application: C – Add “#include hdf5.h” F90 - Add “USE HDF5” Call h5open_f/h5close_f to initialize/close Fortran interface C++ - Add “#include H5Cpp.h” Python - Add “import h5py” / “import numpy” 40April 17-19, 2012HDF/HDF-EOS Workshop XV

The HDF Group Example HDF5 Code 41April 17-19, 2012HDF/HDF-EOS Workshop XV

Steps to Create a File 1. Specify property lists (or use defaults) 2. Create the file 3. Close the file (and properties if necessary) 42April 17-19, 2012HDF/HDF-EOS Workshop XV

Creating an HDF5 File in Python April 17-19, 2012HDF/HDF-EOS Workshop XV43 1. import h5py 2. file = h5py.File ('file.h5', 'w') 3. file.close () “/” (root) file.h5 File Access Flag (create new file)

Creating an HDF5 File In C #include “hdf5.h” int main() { hid_t file_id; herr_t status; file_id = H5Fcreate ("file.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); status = H5Fclose (file_id); } 44April 17-19, 2012HDF/HDF-EOS Workshop XV 2. Example of Defined Types 3. File Access Flag (create new file) 4. To specify default property lists 1. Specify Include File

Creating an HDF5 File in F90 April 17-19, 2012HDF/HDF-EOS Workshop XV45 PROGRAM FILEEXAMPLE USE HDF5 IMPLICIT NONE CHARACTER(LEN=8), PARAMETER :: filename = "filef.h5" ! File name INTEGER(HID_T) :: file_id ! File identifier INTEGER :: error CALL h5open_f (error) CALL h5fcreate_f (filename, H5F_ACC_TRUNC_F, file_id, error) CALL h5fclose_f (file_id, error) CALL h5close_f (error) END PROGRAM FILEEXAMPLE 2. Example of Defined Types 3. Initialize Fortran interface 4. Close Fortran interface 1. Specify HDF5 Module

Steps to Create a Dataset 1.Define dataset characteristics a) Datatype b) Dataspace c) Properties (or use default) 2.Decide where to put it Group or root group 3.Create dataset in file 4.Close dataset handle from step 3. 46April 17-19, 2012 HDF/HDF-EOS Workshop XV

April 17-19, 2012HDF/HDF-EOS Workshop XV47 Example: Create a Dataset dset “/” (root) Integer, 4x6 dset.h5

Create a Dataset: h5_crtdat.py April 17-19, 2012HDF/HDF-EOS Workshop XV48 1. import h5py 2. file = h5py.File ('dset.h5', 'w') 3. dataset = file.create_dataset ('dset', (4, 6), 'i') 4. file.close() Name Datatype Dataspace (shape) Create Dataset in Root Group h5py closes the dataset for you

Write To/Read From a Dataset: h5_rdwt.py April 17-19, 2012HDF/HDF-EOS Workshop XV49 1. import h5py 2. import numpy as np 3. file = h5py.File('dset.h5','r+') 4. dataset = file['dset'] 5. data = np.zeros((4,6)) 6. for i in range(4): 7. for j in range(6): 8. data[i][j]= i*6+j+1 9.dataset[...] = data 10. data_read = dataset[...] 11. file.close() Open ‘dset’ in root group Write buffer to ‘dset’ Read data in ‘dset’ into buffer

How To Write to a Subset of the dataset? April 17-19, 2012HDF/HDF-EOS Workshop XV50 dataset[1:4, 2:6] = 5 (instead of using “dataset[…]”) dim1 dim2

Read integer into float buffer: h5_readtofloat.py April 17-19, 2012HDF/HDF-EOS Workshop XV51 1. import h5py 2. import numpy as np 3. file = h5py.File('dset.h5','r+') 4. dataset = file['dset'] 5. data = np.zeros((4,6)) 6. for i in range(4): 7. for j in range(6): 8. data[i][j]= i*6+j+1 9. dataset[...] = data 10. data_read32 = np.zeros((4,6,), dtype=np.float32) 11. dataset.id.read (h5py.h5s.ALL, h5py.h5s.ALL, data_read32, mtype=h5py.h5t.NATIVE_FLOAT) 12. file.close() Write buffer to integer ‘dset’ Read data in ‘dset’ into float buffer

Steps to Create a Group 1.Decide where to put it – “root group” or other group 2.Define properties or use default 3.Create the group in file 4. Close the group 52April 17-19, 2012HDF/HDF-EOS Workshop XV

Example: Create a Group dset MyGroup “/” (root) 4x6 array of integers dset.h5 53April 17-19, 2012HDF/HDF-EOS Workshop XV

Create a Group: h5_crtgrp.py April 17-19, 2012HDF/HDF-EOS Workshop XV54 1. import h5py 2. file = h5py.File('dset.h5', 'r+') 3. group = file.create_group ('MyGroup') 4. file.close() Create group ‘MyGroup’ under root group h5py closes the group for you

Example: Create Attributes dset “/” (root) 4x6 array of integers dset.h5 55April 17-19, 2012HDF/HDF-EOS Workshop XV Attributes: Units=“Meters per second” Speed=[100,200]

Create Attributes: h5_crtatt.py April 17-19, 2012HDF/HDF-EOS Workshop XV56 1. import h5py 2. import numpy as np 3. file = h5py.File('dset.h5','r+') 4. dataset = file['/dset'] 5. dataset.attrs["Units"] = “Meters per second” 6. attr_data = np.zeros((2,)) 7. attr_data[0] = attr_data[1] = dataset.attrs.create("Speed", attr_data, (2,), “i”) 10. file.close() Create string attribute Create integer attribute

High Level APIs HDF5 Lite HDF5 Image HDF5 Table HDF5 Dimension Scales HDF5 Packet Table November 3-5, HDF/HDF-EOS Workshop XIII

HDF5 Tutorial and Examples HDF5 Tutorial: HDF5 Examples: HDF5 Documentation: 58April 17-19, 2012HDF/HDF-EOS Workshop XV

HDF5 Technology Platform HDF/HDF-EOS Workshop XV59 HDF5 data model The “building blocks” for data organization and specification HDF5 software Library, language interfaces, tools HDF5 file format Bit-level organization of HDF5 file Recall … April 17-19, 2012

The HDF Group Thank You! HDF/HDF-EOS Workshop XV60April 17-19, 2012

The HDF Group Questions/comments? HDF/HDF-EOS Workshop XV61April 17-19, 2012