Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 
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

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690