-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from wkliao/doc_v4
docs: polishing
- Loading branch information
Showing
19 changed files
with
573 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
=========== | ||
Attribute | ||
Attributes | ||
=========== | ||
|
||
In the library, netCDF attributes can be created, accessed, and manipulated | ||
using python dictionary-like syntax. A Pythonic interface for metadata operations | ||
is provided both in the ``File`` class (for global attributes) and the | ||
``Variable`` class (for variable attributes). | ||
In `object-oriented programming <https://en.wikipedia.org/wiki/Object-oriented_programming>`_, | ||
a class contains fields (state variables containing data) and methods | ||
(subroutines or procedures defining the object's behavior in code). ``Fields`` | ||
may also be known as members, attributes, or properties. To avoid confusion | ||
with NetCDF's terminology of ``attribute``, this document uses `field` to refer | ||
to a class's state variable. | ||
|
||
NetCDF attributes are small, supplementary metadata that annotates variables or | ||
files. NetCDF attribute is not a Python class by itself. Instead, it is a | ||
field of python dictionary in class :class:`pnetcdf.File` and class | ||
:class:`pnetcdf.Variable`. Their data types can be any allowed by the classic | ||
NetCDF file formats. The most common data type is `text` for annotation | ||
purpose. NetCDF attributes can be created, accessed, and manipulated using | ||
python dictionary-like syntax. An attribute can be associated to a file, | ||
referred to as ``golbal attribute``, as well as to individual variables, | ||
referred to as ``variable's attribute``. Pythonic interfaces for accessing | ||
attributes are is provided both in class :class:`pnetcdf.File` (for global | ||
attributes) and class :class:`pnetcdf.Variable` (for variable attributes). | ||
Example programs are `examples/global_attribute.py` and `examples/put_var.py`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
============== | ||
Dimension | ||
Dimensions | ||
============== | ||
|
||
Dimension defines the shape and structure of variables and stores coordinate | ||
data for multidimensional arrays. The ``Dimension`` object, which is also a key | ||
component of ``File`` class, provides an interface to access dimensions. | ||
Class ``Dimension`` is used to define the shape of NetCDF variables. In NetCDF, | ||
a variable, an instance of :class:`pnetcdf.Variable`, is a multi-dimensional | ||
array. Methods in :class:`pnetcdf.Dimension` provide an interface to access | ||
dimensions objects stored in the file. | ||
|
||
.. autoclass:: pnetcdf::Dimension | ||
:members: getfile, isunlimited | ||
:exclude-members: name, size | ||
|
||
Read-only Python Attributes of Dimension Class | ||
The following class members are read-only and should not be modified by the | ||
Read-only python fields of class :class:`pnetcdf.Dimension` | ||
The following class fields are read-only and should not be modified by the | ||
user. | ||
|
||
.. attribute:: name | ||
|
||
String name of Dimension instance. This class member is read-only and | ||
String name of Dimension instance. This class field is read-only and | ||
should not be modified by the user. To rename a dimension, use | ||
:meth:`File.rename_dim` method. | ||
|
||
**Type:** `str` | ||
|
||
.. attribute:: size | ||
|
||
The current size of Dimension (calls ``len`` on Dimension instance). | ||
The current size of Dimension (its value can be obtained by calling | ||
python function ``len()`` on the Dimension instance). | ||
|
||
**Type:** `int` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.