Skip to content

Commit 675724a

Browse files
committed
doc: add URLs to CDF-1,2,5 format specifications
1 parent 8f0061a commit 675724a

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

docs/nc4_vs_pnetcdf.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ operational modes.
1818
+ Classic file format (CDF-1) -- The ESDS Community Standard defined the file format
1919
to be used in the NetCDF user community in 1989. The file header bears a
2020
signature of character string 'CDF-1' and now is commonly referred to as
21-
'CDF-1' file format.
21+
[CDF-1](https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d1-file-format-specification.html)
22+
file format.
2223
* 'CDF-2' format -- The CDF-1 format was later extended to support large
2324
file size (i.e. larger than 2GB) in 2004. See its specification in
2425
[ESDS-RFC-011v2.0](https://cdn.earthdata.nasa.gov/conduit/upload/496/ESDS-RFC-011v2.00.pdf).
2526
Because its file header bears a signature of 'CDF-2' and the format is
26-
also commonly referred to as 'CDF-2' format.
27-
* 'CDF-5' format -- The CDF-2 format was extended by PnetCDF developer team
27+
also commonly referred to as
28+
[CDF-2](https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d2-file-format-specification.html)
29+
format.
30+
* [CDF-5](https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d5-file-format-specification.html)
31+
format -- The CDF-2 format was extended by PnetCDF developer team
2832
in 2009 to support large variables and additional large data types, such
2933
as 64-bit integer.
3034
+ HDF5-based file format -- Starting from its version 4.0.0, NetCDF includes

docs/source/tutorial/basic.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ Creating/Opening/Closing a netCDF file
2020
This is also the method used to open an existing netCDF file. If the file is
2121
open for write access (mode='w', 'r+' or 'a'), you may write any type of data
2222
including new dimensions, variables and attributes. Currently, netCDF files
23-
can be created in classic formats, specifically the formats of CDF-1, 2, and
24-
5. When creating a new file, the format may be specified using the format
23+
can be created in classic formats, specifically the formats of
24+
`CDF-1 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d1-file-format-specification.html>`_,
25+
`CDF-2 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d2-file-format-specification.html>`_,
26+
and
27+
`CDF-5 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d5-file-format-specification.html>`_.
28+
When creating a new file, the format may be specified using the format
2529
keyword in the ``File`` constructor. The default format is CDF-1. To see how a
2630
given file is formatted, you can examine the ``file_format`` attribute.
2731
Closing the netCDF file is accomplished via the :meth:`File.close` method of

docs/source/tutorial/datatypes.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Data type
44

55
NetCDF Variable Data Types
66
The following table gives the netCDF external data types defined in CDF-1 and
7-
CDF-2 and the corresponding type constants for defining variables in the
7+
`CDF-1 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d1-file-format-specification.html>`_
8+
and
9+
`CDF-2 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d2-file-format-specification.html>`_
10+
and the corresponding type constants for defining variables in the
811
python interface. All these data types have direct numpy quivalent.
912

1013

@@ -26,7 +29,10 @@ NetCDF Variable Data Types
2629
+-------+----------------+-------+----------------------------------------+---------------------+
2730

2831

29-
Additional data types supported in CDF-5 format:
32+
Additional data types supported in
33+
`CDF-5 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d5-file-format-specification.html>`_.
34+
format:
35+
3036

3137
+---------------------+----------------+-------+----------------------------------------+---------------------+
3238
| Type | C #define | Bits | Intent of use | Numpy Equivalent |
@@ -41,3 +47,4 @@ NetCDF Variable Data Types
4147
+---------------------+----------------+-------+----------------------------------------+---------------------+
4248
| unsigned long long | NC_UINT64 | 64 | unsigned 8-byte integer | np.uint64 or 'u8' |
4349
+---------------------+----------------+-------+----------------------------------------+---------------------+
50+

src/pnetcdf/_File.pyx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,15 @@ cdef class File:
5252
:param str format: [Optional] underlying file format. Only relevant
5353
when creating a new file.
5454
55-
- ``NETCDF3_64BIT_OFFSET`` or ``NC_64BIT_OFFSET``: CDF-2 format
56-
- ``NETCDF3_64BIT_DATA`` or ``NC_64BIT_DATA``: CDF-5 format
55+
- ``NETCDF3_64BIT_OFFSET`` or ``NC_64BIT_OFFSET``:
56+
`CDF-2 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d2-file-format-specification.html>`_
57+
format
58+
- ``NETCDF3_64BIT_DATA`` or ``NC_64BIT_DATA``:
59+
`CDF-5 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d5-file-format-specification.html>`_
60+
format
5761
- ``NETCDF3_CLASSIC`` or `None` defaults to default file format
58-
(CDF-1 format)
62+
(`CDF-1 <https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d1-file-format-specification.html>`_
63+
format)
5964
6065
:param comm: [Optional]
6166
MPI communicator to use for file access. `None` defaults to

0 commit comments

Comments
 (0)