This tutorial aims to give a quick and painless introduction to netCDF.
For the basic concepts of netCDF see Intro. Read this to understand the netCDF data models and how to use netCDF.
For sets of examples of increasing complexity see Examples. The example programs are provided for each of four netCDF API languages, C, C++, F77, and F90. (No new netCDF-4 API extensions are used in these examples.)
For a quick reference to the important functions in the netCDF-3 C, C++, Fortran 77, and Fortran 90 APIs, with hyper-links to the full documentation of each function, see Useful Functions.
To learn about the new features of netCDF-4, see API-Extensions. For some examples see NetCDF-4 Examples.
NetCDF interface guides are available for C (see The NetCDF C Interface Guide), C++ (see The NetCDF C++ Interface Guide), Fortran 77 (see The NetCDF Fortran 77 Interface Guide), and Fortran 90 (see The NetCDF Fortran 90 Interface Guide).
This document applies to netCDF version 4.1.1; it was last updated on 30 September 2009.
--- The Detailed Node Listing ---
What is NetCDF?
Example Programs
The simple_xy Example
simple_xy_wr.c and simple_xy_rd.c
simple_xy_wr.f and simple_xy_rd.f
simple_xy_wr.f90 and simple_xy_rd.f90
simple_xy_wr.cpp and simple_xy_rd.cpp
The sfc_pres_temp Example
sfc_pres_temp_wr.c and sfc_pres_temp_rd.c
sfc_pres_temp_wr.f and sfc_pres_temp_rd.f
sfc_pres_temp_wr.f90 and sfc_pres_temp_rd.f90
sfc_pres_temp_wr.cpp and sfc_pres_temp_rd.cpp
The pres_temp_4D Example
pres_temp_4D_wr.c and pres_temp_4D_rd.c
pres_temp_4D_wr.f and pres_temp_4D_rd.f
pres_temp_4D_wr.f90 and pres_temp_4D_rd.f90
pres_temp_4D_wr.cpp and pres_temp_4D_rd.cpp
The Functions You Need in NetCDF-3
Creating New Files and Metadata, an Overview
Numbering of NetCDF IDs
Reading NetCDF Files of Unknown Structure
Reading and Writing Subsets of Data
API Extensions Introduced with NetCDF-4
Collective/Independent Access
simple_xy_par_wr.c and simple_xy_par_rd.c
NetCDF-4 Examples
The simple_nc4 Example
simple_nc4_wr.c and simple_nc4_rd.c
The simple_xy_nc4 Example
simple_xy_nc4_wr.c and simple_xy_nc4_rd.c
simple_xy_nc4_wr.f and simple_xy_nc4_rd.f
simple_xy_nc4_wr.f90 and simple_xy_nc4_rd.f90