NetCDF User's Guide
An Interface for Data Access
Version 2.4
February 1996
Russ Rew, Glenn Davis, Steve Emmerson, and Harvey Davies
Unidata Program Center
Foreword
Summary
1 Introduction
1.1 The NetCDF Interface
1.2 NetCDF is Not a Database Management System
1.3 File Format
1.4 What about Performance?
1.5 Is NetCDF a Good Archive Format?
1.6 Creating Self-Describing Data conforming to Conventions
1.7 Background and Evolution of the NetCDF Interface
1.8 What's New Since the Previous Release?
1.9 Limitations of NetCDF
1.10 Future Plans for NetCDF
References
2 Components of a NetCDF File
2.1 The NetCDF Data Model
2.1.1 Naming Conventions
2.1.2 network Common Data Form Language (CDL)
2.2 Dimensions
2.3 Variables
2.3.1 Coordinate Variables
2.4 Attributes
2.5 Differences between Attributes and Variables
3 Data
3.1 NetCDF Data Types
3.2 Data Access
3.2.1 Forms of Data Access
3.2.2 An Example of Array-Section Access
3.2.3 More on General Array Section Access
3.2.4 Record-Oriented Access
3.3 Data Structures
4 Use of the NetCDF Library
4.1 Creating a NetCDF File
4.2 Reading a NetCDF File with Known Names
4.3 Reading a netCDF File with Unknown Names
4.4 Adding New Dimensions, Variables, Attributes
4.5 Error Handling
4.6 Compiling and Linking with the NetCDF Library
5 Files
5.1 NetCDF Library Interface Descriptions
5.2 Create a NetCDF file: nccreate and NCCRE
5.3 Open a NetCDF File for Access: ncopen and NCOPN
5.4 Put Open NetCDF File into Define Mode: ncredef and NCREDF
5.5 Leave Define Mode: ncendef and NCENDF
5.6 Close an Open NetCDF File: ncclose and NCCLOS
5.7 Inquire about an Open NetCDF File: ncinquire and NCINQ
5.8 Synchronize an Open NetCDF File to Disk: ncsync and NCSNC
5.9 Back Out of Recent Definitions: ncabort and NCABOR
5.10 Set Fill Mode for Writes: ncsetfill and NCSFIL
6 Dimensions
6.1 Create a Dimension: ncdimdef and NCDDEF
6.2 Get a Dimension ID from Its Name: ncdimid and NCDID
6.3 Inquire about a Dimension: ncdiminq and NCDINQ
6.4 Rename a Dimension: ncdimrename and NCDREN
7 Variables
7.1 Language Types Corresponding to NetCDF Data Types
7.2 Create a Variable: ncvardef and NCVDEF
7.3 Get a Variable ID from Its Name: ncvarid and NCVID
7.4 Get Information about a Variable from Its ID: ncvarinq and NCVINQ
7.5 Write a Single Data Value: ncvarput1, NCVPT1, and NCVP1C
7.6 Write an Array of Values: ncvarput and NCVPT(C)
7.7 Write a Subsampled Or Mapped Array of Values: ncvarputg, NCVPTG, and NCVPGC
7.8 Put a Record: ncrecput
7.9 Read a Single Data Value: ncvarget1, NCVGT1, and NCVG1C
7.10 Read an Array of Values: ncvarget and NCVGT(C)
7.11 Read a Subsampled Or Mapped Array of Values: ncvargetg, NCVGTG and NCVGGC
7.12 Get a Record: ncrecget
7.13 Reading and Writing Character String Values
C Interface
FORTRAN Interface
7.14 Fill Values
7.15 Rename a Variable: ncvarrename and NCVREN
7.16 Get Number of Bytes for a Data Type: nctypelen and NCTLEN
7.17 Get Information About Record Variables: ncrecinq
8 Attributes
8.1 Attribute Conventions
8.2 Create an Attribute: ncattput, NCAPT, and NCAPTC
8.3 Get Information about an Attribute: ncattinq and NCAINQ
8.4 Get Attribute's Values: ncattget and NCAGT(C)
8.5 Copy Attribute from One NetCDF to Another: ncattcopy and NCACPY
8.6 Get Name of Attribute from Its Number: ncattname and NCANAM
8.7 Rename an Attribute: ncattrename and NCAREN
8.8 Delete an Attribute: ncattdel and NCADEL
9 NetCDF File Structure and Performance
9.1 Parts of a NetCDF File
9.2 The XDR Layer
9.3 General XDR Considerations
9.4 UNICOS Optimization
10 NetCDF Utilities
10.1 CDL Syntax
10.2 CDL Data Types
10.3 CDL Notation for Data Constants
10.4 ncgen
Examples
10.5 ncdump
Examples
11 Answers to Some Frequently Asked Questions
What Is netCDF?
How do I get the netCDF software package?
Is there any access to netCDF information on the World Wide Web?
What has changed since the previous release?
Is there a mailing list for netCDF discussions and questions?
Who else uses netCDF?
What is the physical format for a netCDF files?
What does netCDF run on?
What other software is available for netCDF data?
What other formats are available for array-oriented data?
Why do netCDF calls just exit on errors instead of returning an error indicator?
How do I make a bug report?
How do I search through past problem reports?
How does the C++ interface differ from the C interface?
How does the FORTRAN interface differ from the C interface?
How does the Perl interface differ from the C interface?
A Units
B File Format Specification
The Format in Detail
Computing File Offsets
Examples
C Summary of C Interface
D Summary of FORTRAN Interface
Function and Variable Index
General Index
This document was generated on 8 July 1997 using the
texi2html
translator version 1.51.