Previous: Remote Access to Datasets Through netCDF-3 Next: Overview Table of contents Frames 2011 Unidata NetCDF Workshop

7 Introduction to the NetCDF APIs and Example Programs
A brief introduction to netCDF application programming interfaces and example programs.

7.0  Overview
NetCDF APIs are available for most programming languages used in the geosciences.
7.1  The C API
The C library is the core implementation on which non-Java interfaces are built.
7.2  C API Example
C API example for reading data.
7.3  The C++ API
The C++ library provided the first object-oriented API for netCDF.
7.4  The Fortran-77 API
The Fortran-77 library provided early Fortran support for modelers and scientists.
7.5  The Fortran-90 API
The Fortran-90 library provides current Fortran support for modelers and scientists.
7.6  The Java API
The netCDF Java library provides advanced capabilities not yet available in other language interfaces.
7.7  Architecture of NetCDF APIs and Libraries
Knowing how netCDF APIs are layered is sometimes useful for understanding performance and error handling.
7.8  Python APIs
There are several Python libraries for netCDF. A more comprehensive listing is available, but current software includes the following.
7.9  The Ruby API
The Ruby API for netCDF was contributed as part of the Dennou Ruby Project, providing software for data analyses, visualization, and numerical simulations for geophysical studies.
7.10  Perl APIs
Two Perl APIs for netCDF are PDL::NetCDF and NetCDFPerl.
7.11  Other APIs for netCDF
Other APIs for netCDF have been contributed and made available for MATLAB, IDL, and R.
7.12  Some Common Errors to Avoid
Here is a list of some common errors to avoid in using netCDF APIs, based on support questions and experience assisting users.
7.13  The NetCDF Examples in C/F77/F90/C++
Example programs are provided in C/F77/F90/C++ and come with the netCDF C-based release.
7.14  The NetCDF Example Requirements
The requirements for netCDF examples.
7.15  The NetCDF Example Data Sets
The example datasets are produced by the example programs.
7.16  The Simple XY Example Dataset
The example dataset written and read by the simple_xy example programs.
7.17  Write The Simple XY Example in F90
A Fortran 90 program that writes the simple_xy.nc example dataset.
7.18  The Simple XY Write Example in C
A C example program that writes the simple_xy.nc example dataset.
7.19  The Simple XY Example in C++
C++ code that writes the simple_xy.nc example dataset.
7.20  Creating a NetCDF Dataset
Abstract code for creating a netCDF dataset.
7.21  Read The Simple XY Example in F90
A Fortran 90 program that reads the simple_xy.nc example dataset.
7.22  The 2D Example Dataset CDL
The example dataset written and read by the sfc_pres_temp example programs.
7.23  The 4D Example Dataset CDL
The example dataset written and read by the pres_temp_4D example programs.
7.24  Reading The 4D Example in C
The C code that reads the pres_temp_4D.nc example dataset, one record at a time.
7.25  Reading a NetCDF Dataset with Known Names
Abstract code for reading a netCDF dataset of known structure.
7.26  Reading a NetCDF Dataset with Unknown Names
Abstract code for reading a netCDF dataset of known structure.
7.27  Issues in Writing Generic NetCDF Software
There are several issues to be aware of in writing software designed to read arbitrary netCDF data.

 


Previous: Remote Access to Datasets Through netCDF-3 Next: Overview Table of contents Frames 2011 Unidata NetCDF Workshop