没有合适的资源?快使用搜索试试~ 我知道了~
netcdf格式文件的c++读写接口 The NetCDF C++ Interface Guide Class Documentation Version 3.6.1 31 January 2006
资源推荐
资源详情
资源评论
The NetCDF C++ Interface Guide
Class Documentation
Version 3.6.1
31 January 2006
Russ Rew
Unidata Program Center
Copyright
c
2005-2006 University Corporation for Atmospheric Research
Permission is granted to make and distribute verbatim copies of this manual provided that
the copyright notice and these paragraphs are preserved on all copies. The software and any
accompanying written materials are provided “as is” without warranty of any kind. UCAR
expressly disclaims all warranties of any kind, either expressed or implied, including but not
limited to the implied warranties of merchantability and fitness for a particular purpose.
The Unidata Program Center is managed by the University Corporation for Atmospheric
Research and sponsored by the National Science Foundation. Any opinions, findings, con-
clusions, or recommendations expressed in this publication are those of the author(s) and
do not necessarily reflect the views of the National Science Foundation.
Mention of any commercial company or product in this document doe s not constitute an
endorsement by the Unidata Program Center. Unidata does not authorize any use of
information from this publication for advertising or publicity purposes.
i
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Auxiliary Types and Constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
NetCDF Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Class NcFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Public Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Class NcDim. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Public Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Class NcTypedComponent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Public Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Class NcVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Public Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Class NcAtt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Public Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Auxiliary Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Class NcValues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Public Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Class NcError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Public Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
ii NetCDF C++ Interface Guide
Introduction 1
Introduction
The main requirements for the design of the C++ interface are:
• to provide the functionality of the C interface;
• to provide type safety by eliminating all use of void* pointers; and
• to provide an interface that is simpler to use than the C interface.
Some of the features of the C++ interface are:
• No IDs needed for netCDF’s variables, dimensions, or attributes.
• No explicit open or close calls needed for netCDF files; a constructor opens and a
destructor closes a file.
• No need to spec ify types for creating attributes; they will have the type of the value
provided.
• No use of void*: values are type-checked.
• Less indirection is needed for dimensions & dimension sizes than with the C interface.
A variable’s dimensions can be provided as arguments when defining a variable.
• Code for data types is isolated to make the addition of new types easier.
• No explicit ncredef or ncendef calls are needed for switching between define and data
modes. Whenever a mode switch is required, it happens implicitly.
The header file ‘netcdfcpp.h’ must be included in source code files using this interface.
This release provides the functionality of netCDF version 3.6.1.
This manual as sumes familiarity with Chapters 1 through 4 of the netCDF User’s Guide,
where the concepts of netCDF dimensions, variables, and attributes are discussed.
Class Hierarchy
The class for netCDF file objects is NcFile.
The components of a netCDF file are dimensions, variables, and attributes. There
is a class for each of these kinds of objects; NcDim, NcVar, and NcAtt. Variables and
attributes share some common characteristics that are factored out in the abstract base
class NcTypedComponent.
An auxiliary class, NcValues, provides a type for arrays of values that are read from
or written to netCDF files. Another auxiliary class, NcError, provides flexible facilities for
handling errors.
剩余21页未读,继续阅读
资源评论
guotuoxiyou
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功