HDF(3)

๐Ÿ“ฆ
version 4.2.16 ยท 2 versions
, in ubuntu noble

okay so you opened the man page for HDF(3) โ€” it lives in the Library Functions Manual section of the man pages, and honestly? it's lowkey iconic. let's get into it bestie ๐Ÿซถ


๐Ÿ’– NAME ๐Ÿ’–

hdf โ€” the Hierarchical Data Format library. that's it, that's the whole name. slay. โœจ

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

-lmfhdf -ldf -ljpeg -lz [ -lsz ]
/usr/lib/libmfhdf.a /usr/lib/libdf.a /usr/lib/libjpeg.a /usr/lib/libz.a
/usr/lib/libsz.a

๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

HDF is a multi-object file format, and its whole thing is that it facilitates the transfer of various types of scientific data between machines and operating systems. like, your data gets to travel and nothing gets weird about it. if you wanna vibe check which platforms are currently supported, that list is sitting at http://www.hdfgroup.org/release4/platforms.html ๐Ÿ’…

HDF allows self-definitions of data content, and it's easy to extend for future enhancements or for compatibility with other standard formats. it ships with both Fortran and C calling interfaces, plus utilities for manipulating, viewing and analyzing data in HDF files. The HDF library contains interfaces for storing and retrieving compressed or uncompressed 8-bit and 24-bit raster images with palettes, n-Dimensional scientific datasets and binary tables. there's also an interface that allows arbitrary grouping of other HDF objects. main character energy, fr fr.

๐ŸŽ€ HDF Raster Images ๐ŸŽ€

HDF supports the storing of both 8-bit and 24-bit raster images. besides storing info about the dimensions and palette of a raster image, HDF also supports raster image compression. in previous versions of HDF (the DF interfaces, iykyk) both Run-length encoding and Imcomp compression were supported. the compression methods supported right now are: simple RLE, N-bit, Skipping huffman, Gzip, Szip, and JPEG. Imcomp compression is no longer supported, but the library can still read images with Imcomp compression. so like, it's retired but it still shows up to the group chat. ๐Ÿ˜Œ

๐Ÿ“Š HDF Scientific Data Sets ๐Ÿ“Š

Scientific Data Sets (SDSs) are useful for storing n-Dimensional gridded data. The actual data in the dataset can be of any of the "standard" number types: 8, 16 and 32bit signed and unsigned integers and 32 and 64bit floating point values. on top of that, a certain amount of meta-data can be stored with an SDS, including:

  • The coordinate system to use when interpreting or displaying the data.
  • Scales to be used for each dimension.
  • Labels for each dimension and the dataset as a whole.
  • Units for each dimension and the data.
  • The valid max and min values for the data.
  • Calibration information for the data.
  • Fill or missing value information.
  • Ability of having more than one file open at a time.
  • A more general framework for meta-data within the SDS data-model (allowing 'name = value' style meta-data.)
  • Support for an "unlimited dimension" in the SDS data-model, making it possible to append planes to an array along one dimension.

that unlimited dimension thing? chefs kiss. ๐Ÿ‘‘

๐Ÿ“ HDF Annotations ๐Ÿ“

Any object in an HDF file can have annotations associated with it. there are a number of types of annotations:

  • Labels are assumed to be short strings giving the "name" of a data object.
  • Descriptions are longer text segments that are useful for giving more indepth information about a data object
  • File annotations are assumed to apply to all of the objects in a single file.

๐Ÿงฉ HDF Vset Interfaces ๐Ÿงฉ

The Vset module provides interfaces to two basic HDF building blocks. Vgroups are generic grouping elements allowing a user to associate related objects within an HDF file. As Vgroups can contain other Vgroups, it is possible to build a hierarchical file. Vdatas are data structures made up of fields and records. Data is organized into "fields" within each Vdata. Each field is identified by a unique "fieldname". The type of each field may be any of the basic number types that HDF supports. Fields of different types may exist within the same Vdata. nesting dolls but make it data structures ๐Ÿช†

By combining Vdatas in Vgroups it is possible to represent higher level data constructs: mesh data, multi-variate datasets, sparse matrices, finite-element data, spreadsheets, splines, non-Cartesian coordinate data, etc.

๐ŸŒ HDF and netCDF ๐ŸŒ

Starting with HDF version 3.3, netCDF v.2.3.2 of Unidata is supported with the SD multifile interface. SD and netCDF interfaces can read both netCDF files and multi-dimensional arrays (SDS) stored in the HDF4 files transparently. For more information, see Chapter 3, "Scientific Data Sets", of the HDF User's Guide.

wanna turn the netCDF interfaces OFF? configure the library using the --disable-netcdf flag and rebuild it. that's the whole ritual. ๐Ÿ”ฎ

๐ŸŒธ EXAMPLES ๐ŸŒธ

All HDF routines require the header "hdf.h" to be included in the C source file, unless if the SD routines are used, then the header "mfhdf.h" should be included instead.

Fortran programs should use "dffunc.inc" for all interfaces, "mffunc.inc" for the SD interfaces, and "hdf.inc" for non-SD interfaces.

To compile a program that makes HDF calls on most Unix platforms:

(FORTRAN):
{HDFLIBDIR}/bin/h4fc myprog.f

(C):
{HDFLIBDIR}/bin/h4cc myprog.c

look at you go, compiling. proud of you bestie ๐Ÿฅน

๐Ÿ“š DOCUMENTATION ๐Ÿ“š

The HDF web site is located at http://www.hdfgroup.org/.

For the vast majority of users, the "HDF User's Guide" and "HDF Reference Manual" should be sufficient.

These documents can be viewed or downloaded at http://www.hdfgroup.org/products/hdf4/.

๐Ÿข VENDOR ๐Ÿข

The HDF Group 1800 South Oak Street, Suite 203 Champaign, IL 61820 USA www.hdfgroup.org

โญ VERSION โญ

4.2.16

โš–๏ธ LICENSE & SOURCE AVAILABILITY โš–๏ธ

Copyright by The HDF Group. Copyright by the Board of Trustees of the University of Illinois.

All rights reserved.

This file is part of HDF. The full HDF copyright notice, including terms governing use, modification, and redistribution, is contained in the COPYING file, which can be found at the root of the source code distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/. If you do not have access to either file, you may request a copy from help@hdfgroup.org.

read the COPYING file, bestie. it's not optional, it's the rules. ๐Ÿซก

๐Ÿ†˜ CONTACT & HELP ๐Ÿ†˜

The HDF Group Email: help@hdfgroup.org

๐Ÿ“ FILES ๐Ÿ“

  • /usr/lib/{libmfhdf,libdf,libjpeg,libz,libsz}.{a,so} โ€” hdf libraries
  • /usr/bin โ€” Location of most hdf utilities
  • /usr/include/hdf โ€” Location of include file hdf.h, mfhdf.h, and others

and that's the page!! this one is THG HDF 4.2.16, dated March 2023, filed under HDF(3). go forth and store your scientific data, you absolute legend. ๐Ÿ’œ๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from