You can use the PnetCDF library without knowing about all of the PnetCDF interface. If you are creating a netCDF file, only a handful of routines are required to define the necessary dimensions, variables, and attributes, and to write the data to the netCDF file. (Even less are needed if you use the ncmpigen utility to create the file before running a program using PnetCDF library calls to write data.) Similarly, if you are writing software to access data stored in a particular netCDF object, only a small subset of the PnetCDF library is required to open the netCDF file and access the data. Authors of generic applications that access arbitrary netCDF files need to be familiar with more of the PnetCDF library.
In this chapter we provide templates of common sequences of PnetCDF calls needed for common uses. For clarity we present only the names of routines; omit declarations and error checking; omit the type-specific suffixes of routine names for variables and attributes; indent statements that are typically invoked multiple times; and use ... to represent arbitrary sequences of other statements. Full parameter lists are described in later chapters.
• Creating: | Creating a NetCDF file | |
• Reading Known : | Reading a NetCDF file with Known Names | |
• Reading Unknown : | Reading a netCDF file with Unknown Names | |
• Adding: | Adding New Dimensions, Variables, Attributes | |
• Nonblocking Write: | Nonblocking write to one or more variables | |
• Nonblocking Read: | Nonblocking read from one or more variables | |
• Errors: | Error Handling | |
• Compiling: | Compiling and Linking with the PnetCDF Library |