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.

Slides:



Advertisements
Similar presentations
The HDF Group Ensuring Long Term Access to Remotely Sensed HDF4 Data with Layout Maps Ruth Duerr, NSIDC Christopher Lynnes, GES DISC Mike.
Advertisements

The HDF Group HDF/HDF-EOS Workshop XIV1 Easy Remote Access via OPeNDAP Kent Yang and Joe Lee The HDF Group The 14 th HDF/HDF-EOS Workshop.
The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 HDF-Java Products Peter Cao The HDF Group The 13 th HDF and HDF-EOS Workshop.
The HDF Group ESIP Summer Meeting HDF-Java Overview Joel Plutchak The HDF Group 1 July 8 – 11, 2014.
HDF5 OPeNDAP Project Update and Demo MuQun Yang and Hyo-Kyung Lee (The HDF Group) James Gallagher (OPeNDAP, Inc.)
11/6/07HDF and HDF-EOS Workshop XI, Landover, MD1 Introduction to HDF5 HDF and HDF-EOS Workshop XI November 6-8, 2007.
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.
MS Access: Database Concepts Instructor: Vicki Weidler.
© 2008The MathWorks, Inc. ® ® The MATLAB Low-Level HDF5 Interface John Evans.
The HDF Group July 8, 2014HDF 2014 ESIP Summer Meeting HDF Product Designer Aleksandar Jelenak, H. Joe Lee, Ted Habermann The.
Ensuring Long Term Access to Remotely Sensed HDF4 Data with Layout Maps Mike Folks, The HDF Group Ruth Duerr, NSIDC 1.
1 of 14 Substituting HDF5 tools with Python/H5py scripts Daniel Kahn Science Systems and Applications Inc. HDF HDF-EOS Workshop XIV, 28 Sep
University of Illinois at Urbana-ChampaignHDF 9/19/2000 McGrath 9/19/ Transition from HDF4 to HDF5: Issues Robert E. McGrath NCSA University of Illinois.
HDF5 Tools Update Peter Cao - The HDF Group November 6, 2007 This report is based upon work supported in part by a Cooperative Agreement.
Experiments with Remote Access to Scientific Data using HDF5 Kun Yan Robert E. McGrath NCSA May 15, 2002.
HDF Windows Support MuQun Yang, Xuan Bai, Elena Pourmal, Barbara Jones, Pedro Vincent, Robert E. McGrath National Center for Supercomputing Applications.
NASA EOS DATA COMPRESSION WITH HDF5 SCALEOFFSET FILTER This work was funded by the NASA Earth Science Technology Office under NASA award AIST and.
Important ESDIS 2009 tasks review Kent Yang, Mike Folk The HDF Group April 1st, /1/20151Annual briefing to ESDIS.
DM_PPT_NP_v01 SESIP_0715_AJ HDF Product Designer Aleksandar Jelenak, H. Joe Lee, Ted Habermann Gerd Heber, John Readey, Joel Plutchak The HDF Group HDF.
The Metadata Cache in HDF5 Changes in the HDF5 metadata cache since
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
1 Introduction to HDF5 Data Model, Programming Model and Library APIs HDF and HDF-EOS Workshop VIII October 26, 2004.
The HDF Group HDF5 Datasets and I/O Dataset storage and its effect on performance May 30-31, 2012HDF5 Workshop at PSI 1.
HDF Converting between HDF4 and HDF5 MuQun Yang, Robert E. McGrath, Mike Folk National Center for Supercomputing Applications University of Illinois,
Support for NPP/NPOESS by The HDF Group Mike Folk The HDF Group HDF and HDF-EOS Workshop XII October 17, 2008 Oct HDF and HDF-EOS Workshop XII1.
11/7/2007HDF and HDF-EOS Workshop XI, Landover, MD1 HDF5 Software Process MuQun Yang, Quincey Koziol, Elena Pourmal The HDF Group.
The HDF Group November 3-5, 2009 HDF-OPeNDAP Project Update HDF/HDF-EOS Workshop XIII1 Joe Lee and Kent Yang The HDF Group James Gallagher.
Ensuring Long Term Access to Remotely Sensed HDF4 Data with Layout Maps Ruth Duerr, NSIDC Christopher Lynnes, GES DISC The HDF Group Oct HDF and.
October 15, 2008HDF and HDF-EOS Workshop XII1 What will be new in HDF5?
HDF5 OPeNDAP Project Update and Demo MuQun Yang and Hyo-Kyung Lee (The HDF Group) James Gallagher (OPeNDAP, Inc.) 1HDF and HDF-EOS Workshop XII10/17/2008.
1 N-bit and ScaleOffset filters MuQun Yang National Center for Supercomputing Applications University of Illinois at Urbana-Champaign Urbana, IL
HDF OPeNDAP Project Update MuQun Yang and Hyo-Kyung Lee The HDF Group March 31, Annual briefing to ESDIS10/31/2015.
The HDF Group HDF/HDF-EOS Workshop XV1 Tools to Improve the Usability of NASA HDF Data Kent Yang and Joe Lee The HDF Group April 17, 2012.
1 Introduction to HDF5 Data Model, Programming Model and Library APIs HDF and HDF-EOS Workshop IX November 30, 2005.
May 30-31, 2012 HDF5 Workshop at PSI May Shared Object Headers Dana Robinson The HDF Group Efficient Use of HDF5 With High Data Rate X-Ray Detectors.
- 1 - HDF5, HDF-EOS and Geospatial Data Archives HDF and HDF-EOS Workshop VII September 24, 2003.
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,
Space Research Software Pedro Vicente Space Research Software, Inc. HDF-EOS Workshop VI Dec. 4-5, 2002 San Francisco, CA HDF.
1 Error Handling Interface HDF-EOS Workshop IX Quincey Koziol and Ray Lu 30 Nov 2005.
HDF Windows Support MuQun Yang, Xuan Bai, Elena Pourmal, Barbara Jones, Pedro Vincent, Robert E. McGrath National Center for Supercomputing Applications.
HDF5 OPeNDAP Project Update and Demo MuQun Yang and Hyo-Kyung Lee (The HDF Group) James Gallagher (OPeNDAP, Inc.) 1 HDF and HDF-EOS Workshop XII10/17/2008.
Using a Friendly OPeNDAP Client Library to Access HDF5 Data MuQun Yang and Hyo-Kyung Lee (The HDF Group) 1 25th IIPS Conference01/14/2009.
HDF5 OPeNDAP Project Update and Demo MuQun Yang and Hyo-Kyung Lee (The HDF Group) James Gallagher (OPeNDAP, Inc.) 1HDF and HDF-EOS Workshop XII, Aurora,
HDF5 Q4 Demo. Architecture Friday, May 10, 2013 Friday Seminar2.
HDF and HDF-EOS Workshop VII September 24, 2003 HDF5, HDF-EOS and Geospatial Data Archives Don Keefer Illinois State Geological Survey Mike Folk Univ.
11/8/2007HDF and HDF-EOS Workshop XI, Landover, MD1 Software to access HDF5 Datasets via OPeNDAP MuQun Yang, Hyo-Kyung Lee The HDF Group.
May 30-31, 2012 HDF5 Workshop at PSI May Metadata Journaling Dana Robinson The HDF Group Efficient Use of HDF5 With High Data Rate X-Ray Detectors.
October 15-17, 2008HDF and HDF-EOS Workshop XII1 HDF-Java Products Peter Cao The HDF Group HDF and HDF-EOS Workshop XII October 15, 2008.
The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 The New HDF-EOS Web Site - How it can help you Kent Yang, Joe Lee The HDF Group.
Support for NPP/NPOESS by The HDF Group Mike Folk, Elena Pourmal The HDF Group Annual HDF Briefing to ESDIS March 31, 2009 March Annual HDF Briefing.
1 Introduction to HDF5 Programming and Tools Boeing September 19, 2006.
The HDF Group Introduction to HDF5 Session 7 Datatypes 1 Copyright © 2010 The HDF Group. All Rights Reserved.
Copyright © 2010 The HDF Group. All Rights Reserved1 Data Storage and I/O in HDF5.
HDF5 OPeNDAP Project Update and Demo MuQun Yang and Hyo-Kyung Lee (The HDF Group) James Gallagher (OPeNDAP, Inc.) 1HDF and HDF-EOS Workshop XII, Aurora,
HDF/HDF-EOS Meeting Oct th 2008, Aurora CO Proposal for adding Named Dimensions to HDF5 Arrays Daniel Kahn Science Systems and Applications, Inc.
HDF and HDF-EOS Workshop XII
C++ Lesson 1.
Adding CF Attributes to an HDF5 File
Transition from HDF4 to HDF5: Issues
Moving from HDF4 to HDF5/netCDF-4
Parallel HDF5 Introductory Tutorial
Introduction to HDF5 Session Four Java Products
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
Introduction to HDF5 for HDF4 users
Access HDF5 Datasets via OPeNDAP’s Data Access Protocol (DAP)
Moving applications to HDF
Dimension Scales in HDF-EOS2 & HDF-EOS5
HDF5 Tools Updates and Discussions
This material is based upon work supported by the National Science Foundation under Grant #XXXXXX. Any opinions, findings, and conclusions or recommendations.
Project Title: I. Research Overview and Outcome
Presentation transcript:

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

HDF Overview and definition of Dimension Scales Dimension Scales Metadata Dimension Scales API functions and code example

HDF C code Example: I have an array of 12 elements My array data of 12 elements: int dset_data[12] = {1,2,3,4,5,6,7,8,9,10,11,12};

HDF My spatial domain But the spatial phenomenon I am trying to model has different width and height definitions X Y

HDF My array data of 12 elements: int dset_data[12] = {1,2,3,4,5,6,7,8,9,10,11,12}; My X axis spatial domain: float X[4] = {10,20,50,100}; My Y axis spatial domain: double Y[3] = {10,20,30}; C code

HDF Dimension Scales in HDF4 SD - Multifile Scientific Data Interface API functions –SDgetdimscale –SDsetdimscale –SDdiminfo

HDF Save my arrays as HDF5 datasets with the High Level HDF5 API function H5LTmake_dataset_int (fid,“My data",rank,dims, dset_data ); HDF5 API C code

HDF H5LTmake_dataset_int (fid,“X axis",rankx,dimsx, X ); H5LTmake_dataset_int (fid,“Y axis",ranky,dimsy, Y ); HDF5 API C code for the X and Y arrays

HDF /* get the DS dataset id and dataset*/ did = H5Dopen(fid,” My data”); dsid = H5Dopen(fid,” X axis”); /* attach the “ X axis” dimension scale to “My data" at dimension 0 */ H5DSattach_scale(did,dsid,DIM0); HDF5 API Call H5DSattach_scale function

HDF /* get the DS dataset id and dataset*/ did = H5Dopen(fid,” My data”); dsid = H5Dopen(fid,” X axis”); /* attach the “ X axis” dimension scale to “My data" at dimension 0 */ H5DSattach_scale(did,dsid,DIM0); Dimension Scales : HDF5 API Call H5DSattach_scale function

HDF HDF Explorer: Tree View

HDF HDF Explorer: Grid View

HDF HDF Explorer: Map View

HDF What is a Dimension Scale (in HDF5) ? A HDF5 dataset. With additional metadata that identifies the dataset as a Dimension Scale Typically Dimension Scales are logically associated with the dimensions of HDF5 Datasets The meaning of the association is left to applications.

HDF Example: 3D dataset Dataset: 3D Array with 5 x 7 x 10 dimensions 3 Dimension Scales Datasets

HDF Relationships between dataset dimensions and their corresponding dimension scales are not to be directly maintained or enforced by the HDF5 library Few restrictions as possible on the use of dimension scale dataset A dimension scale is not required to be a 1-D array, or to have a specific datatype Overview

HDF A dataset dimension can have more than 1 associated dimension scale A Dimension Scale can be shared by two or more Dataset dimensions

HDF Example: 3D dataset Dataset: 3D Array with 5 x 7 x 10 dimensions Several Dimension Scales Datasets

HDF Metadata The following dataset attributes are used to describe dimension scale datasets: –Attribute named “CLASS” with the value “DIMENSION_SCALE” –Optional attribute named “NAME” –Attribute references to any associated Dataset

HDF When the Dimension Scale is associated with a dimension of a Dataset, the association is represented by attributes of the two datasets.

HDF

HDF In the Dataset, the DIMENSION_LIST attribute is an array of object references to scales (Dimension Scale Datasets), and in the Dimension Scale Dataset the REFERENCE_LIST is an array of object references to Datasets.

HDF

HDF

HDF

HDF APIs Functions for creating and using Dimension Scales are implemented as high level functions Other High Level APIs include –Image –Table –Lite See

HDF API Functions

HDF Name: H5DSset_scale Signature: herr_t H5DSset_scale(hid_t dsid, char *dimname) Purpose: –Convert dataset dsid to a dimension scale, with optional name, dimname. Description: –The dataset dsid is converted to a Dimension Scale dataset. Creates the CLASS attribute, set to the value "DIMENSION_SCALE" and an empty REFERENCE_LIST attribute. If dimname is specified, then an attribute called NAME is created, with the value dimname.

HDF Name: H5DSattach_scale Signature: herr_t H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx) Purpose: –Attach dimension scale dsid to dimension idx of dataset dsid. Description: –Define Dimension Scale dsid to be associated with dimension idx of Dataset did. Entries are created in the DIMENSION_LIST and REFERENCE_LIST attributes.

HDF –Name: H5DSdetach_scale –Signature: –herr_t H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx) –Purpose: Detach dimension scale dsid from the dimension idx of Dataset did. –Description: If possible, deletes association of Dimension Scale dsid with dimension idx of Dataset did. This deletes the entries in the DIMENSION_LIST and REFERENCE_LIST attributes

HDF Name: H5DSis_attached Signature: htri_t H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx) Purpose: –Verifies if a dimension scale is attached to a dataset Description: –Report if dimension scale dsid is currently attached to dimension idx of dataset did.

HDF Name: H5DSiterate_scales Signature: herr_t H5DSiterate_scales(hid_t did, unsigned dim, int *idx, H5DS_iterate_t visitor, void *visitor_data) Purpose: –Iterates the operation visitor through the scales attached to dimension dim. Description: –H5DSiterate_scales iterates over the scales attached to dimension dim of dataset dset. For each scale in the list, the visitor_data and some additional information, specified below, are passed to the visitor function.

HDF Name: H5DSset_label Signature: herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label) Purpose: –Set label for the dimension idx of did to the value label. Description: –Sets the DIMENSION_LABEL_LIST for dimension idx of dataset did.

HDF Name: H5DSget_label Signature: ssize_t H5DSget_label(hid_t did, unsigned int idx, char *label, size_t *size) Purpose: –Read the label for dimension idx of did into buffer label. Description: –Returns the value of the DIMENSION_LABEL_LIST for dimension idx of dataset did, if set.

HDF Name: H5DSget_scale_name Signature: herr_t H5DSget_scale_name(hid_t did, char *name, size_t *size) Purpose: –Read the name of scale did into buffer name. Description: –Read the value of the NAME attribute for scale did. Reads up to size characters into name.

HDF Name: H5DSis_scale Signature: htri_t H5DSis_scale(hid_t did) Purpose: –Determines whether dset is a Dimension Scale. Description: –H5DSis_scale determines if did is a Dimension Scale, i.e., has CLASS="DIMENSION_SCALE").

HDF Name: H5DSget_num_scales Signature: int H5DSget_num_scales(hid_t did, unsigned int idx) Purpose: –Determines how many Dimension Scales are attached to dimension idx of did. Description: –H5DSget_num_scales determines how many Dimension Scales are attached to dimension did of dataset dset.

HDF Code example #include "H5DS.h" #include "H5LT.h" #define RANK 2 #define DIM_DATA 12 #define DIM1_SIZE 3 #define DIM2_SIZE 4 #define DIM3_SIZE 2 #define DIM0 0 #define DIM1 1 #define DIM2 2 #define DS_1_NAME "ds_a_1" #define DS_2_NAME "ds_a_2"

HDF int main(void) { hid_t fid; /* file ID */ hid_t did; /* dataset ID */ hid_t dsid; /* DS dataset ID */ int rank = RANK; /* rank of data dataset */ int rankds = 1; /* rank of DS dataset */ hsize_t dims[RANK] = {DIM1_SIZE,DIM2_SIZE}; /* size of data dataset */ int buf[DIM_DATA] = {1,2,3,4,5,6,7,8,9,10,11,12}; /* data of data dataset */ hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */ hsize_t s2_dim[1] = {DIM2_SIZE}; /* size of DS 2 dataset */ int s1_wbuf[DIM1_SIZE] = {10,20,30}; /* data of DS 1 dataset */ int s2_wbuf[DIM2_SIZE] = {100,200,300,400}; /* data of DS 2 dataset */

HDF /* create a file using default properties */ if ((fid=H5Fcreate("myfile.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_ DEFAULT))<0) goto out; /* make a dataset */ if (H5LTmake_dataset_int(fid,"dset_a",rank,dims,buf)<0) goto out; /* make a DS dataset for the first dimension */ if (H5LTmake_dataset_int(fid,DS_1_NAME,rankds,s1_dim,s1_wbuf)<0) goto out; /* make a DS dataset for the second dimension */ if (H5LTmake_dataset_int(fid,DS_2_NAME,rankds,s2_dim,s2_wbuf)<0) goto out;

HDF /* * attach the DS_1_NAME dimension scale to "dset_a" * */ /* get the dataset id for "dset_a" */ if ((did = H5Dopen(fid,"dset_a"))<0) goto out; /* get the DS dataset id */ if ((dsid = H5Dopen(fid,DS_1_NAME))<0) goto out; /* attach the DS_1_NAME dimension scale to "dset_a" at dimension 0 */ if (H5DSattach_scale(did,dsid,DIM0)<0) goto out; /* close DS id */ if (H5Dclose(dsid)<0) goto out;

HDF /* * attach the DS_2_NAME dimension scale to "dset_a" * */ /* get the DS dataset id */ if ((dsid = H5Dopen(fid,DS_2_NAME))<0) goto out; /* attach the "ds2" dimension scale to "dset_a" as the 2nd dimension */ if (H5DSattach_scale(did,dsid,DIM1)<0) goto out; /* close DS id */ if (H5Dclose(dsid)<0) goto out; /* close */ H5Fclose(fid);

HDF

HDF

HDF

HDF RFC document /H5DimScales

HDF Acknowledgements Special thanks to Bob McGrath (NCSA) This presentation is based upon work supported in part by a Cooperative Agreement with the National Aeronautics and Space Administration (NASA) under NASA grant NNG05GC60A. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of NASA. Other support provided by NCSA and other sponsors and agencies: