|
NEP 1.7.0
NetCDF Extension Pack: compression extensions for NetCDF
|
Read a NetCDF file and print all metadata (Fortran) More...
Functions/Subroutines | |
| program | f_dump_classic_metadata |
| character(len=10) function | type_name (xtype) |
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:
Usage:
| program f_dump_classic_metadata |
| character(len=10) function f_dump_classic_metadata::type_name | ( | integer, intent(in) | xtype | ) |