NEP 1.7.0
NetCDF Extension Pack: compression extensions for NetCDF
Loading...
Searching...
No Matches
Functions/Subroutines
f_dump_classic_metadata.f90 File Reference

Read a NetCDF file and print all metadata (Fortran) More...

Functions/Subroutines

program f_dump_classic_metadata
 
character(len=10) function type_name (xtype)
 

Detailed Description

Read a NetCDF file and print all metadata (Fortran)

This example demonstrates how to use the NetCDF Fortran inquiry functions to discover and print all metadata in a NetCDF file without prior knowledge of its contents. It reads a filename from the command line, opens the file, and prints:

This is a useful pattern for building tools that inspect arbitrary NetCDF files.

Learning Objectives:

Prerequisites: Basic Fortran programming, familiarity with NetCDF concepts

Compilation:

gfortran -o f_dump_classic_metadata f_dump_classic_metadata.f90 -lnetcdff -lnetcdf
program f_dump_classic_metadata
Definition f_dump_classic_metadata.f90:38

Usage:

program f_coord_vars
Definition f_coord_vars.f90:44
Author
Edward Hartnett, Intelligent Data Design, Inc.
Date
2026

Function/Subroutine Documentation

◆ f_dump_classic_metadata()

program f_dump_classic_metadata

◆ type_name()

character(len=10) function f_dump_classic_metadata::type_name ( integer, intent(in)  xtype)