Previous: The Simple XY Example in C++ Next: Read The Simple XY Example in F90 Table of contents Frames User guide
2008 Unidata NetCDF Workshop for Developers and Data Providers > NetCDF Example Programs

6.7 Creating a NetCDF Dataset
Abstract code for creating a netCDF dataset.

Here is a typical sequence of netCDF calls used to create a new netCDF dataset (with arguments and error handling not shown):

    nc_create           /* create netCDF dataset: enter define mode */
         ...
       nc_def_dim       /* define dimensions: from name and length */
         ...
       nc_def_var       /* define variables: from name, type, ... */
         ...
       nc_put_att       /* define attributes and assign attribute values */
         ...
    nc_enddef           /* end definitions: leave define mode */
         ...
       nc_put_var       /* provide values for variables */
         ...
    nc_close            /* close: save new netCDF dataset */

 


Previous: The Simple XY Example in C++ Next: Read The Simple XY Example in F90 Table of contents Frames User guide
2008 Unidata NetCDF Workshop for Developers and Data Providers > NetCDF Example Programs