diff --git a/docs/nc4_vs_pnetcdf.md b/docs/nc4_vs_pnetcdf.md index 6aee845..0508594 100644 --- a/docs/nc4_vs_pnetcdf.md +++ b/docs/nc4_vs_pnetcdf.md @@ -18,13 +18,17 @@ operational modes. + Classic file format (CDF-1) -- The ESDS Community Standard defined the file format to be used in the NetCDF user community in 1989. The file header bears a signature of character string 'CDF-1' and now is commonly referred to as - 'CDF-1' file format. + [CDF-1](https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d1-file-format-specification.html) + file format. * 'CDF-2' format -- The CDF-1 format was later extended to support large file size (i.e. larger than 2GB) in 2004. See its specification in [ESDS-RFC-011v2.0](https://cdn.earthdata.nasa.gov/conduit/upload/496/ESDS-RFC-011v2.00.pdf). Because its file header bears a signature of 'CDF-2' and the format is - also commonly referred to as 'CDF-2' format. - * 'CDF-5' format -- The CDF-2 format was extended by PnetCDF developer team + also commonly referred to as + [CDF-2](https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d2-file-format-specification.html) + format. + * [CDF-5](https://parallel-netcdf.github.io/doc/c-reference/pnetcdf-c/CDF_002d5-file-format-specification.html) + format -- The CDF-2 format was extended by PnetCDF developer team in 2009 to support large variables and additional large data types, such as 64-bit integer. + HDF5-based file format -- Starting from its version 4.0.0, NetCDF includes diff --git a/docs/source/tutorial/basic.rst b/docs/source/tutorial/basic.rst index 8430a7b..9a598d9 100644 --- a/docs/source/tutorial/basic.rst +++ b/docs/source/tutorial/basic.rst @@ -20,8 +20,12 @@ Creating/Opening/Closing a netCDF file This is also the method used to open an existing netCDF file. If the file is open for write access (mode='w', 'r+' or 'a'), you may write any type of data including new dimensions, variables and attributes. Currently, netCDF files - can be created in classic formats, specifically the formats of CDF-1, 2, and - 5. When creating a new file, the format may be specified using the format + can be created in classic formats, specifically the formats of + `CDF-1 `_, + `CDF-2 `_, + and + `CDF-5 `_. + When creating a new file, the format may be specified using the format keyword in the ``File`` constructor. The default format is CDF-1. To see how a given file is formatted, you can examine the ``file_format`` attribute. Closing the netCDF file is accomplished via the :meth:`File.close` method of diff --git a/docs/source/tutorial/datatypes.rst b/docs/source/tutorial/datatypes.rst index e96ae67..c39dc3e 100644 --- a/docs/source/tutorial/datatypes.rst +++ b/docs/source/tutorial/datatypes.rst @@ -4,7 +4,10 @@ Data type NetCDF Variable Data Types The following table gives the netCDF external data types defined in CDF-1 and - CDF-2 and the corresponding type constants for defining variables in the + `CDF-1 `_ + and + `CDF-2 `_ + and the corresponding type constants for defining variables in the python interface. All these data types have direct numpy quivalent. @@ -26,7 +29,10 @@ NetCDF Variable Data Types +-------+----------------+-------+----------------------------------------+---------------------+ - Additional data types supported in CDF-5 format: + Additional data types supported in + `CDF-5 `_. + format: + +---------------------+----------------+-------+----------------------------------------+---------------------+ | Type | C #define | Bits | Intent of use | Numpy Equivalent | @@ -41,3 +47,4 @@ NetCDF Variable Data Types +---------------------+----------------+-------+----------------------------------------+---------------------+ | unsigned long long | NC_UINT64 | 64 | unsigned 8-byte integer | np.uint64 or 'u8' | +---------------------+----------------+-------+----------------------------------------+---------------------+ + diff --git a/src/pnetcdf/_File.pyx b/src/pnetcdf/_File.pyx index 70a2025..c9e2cd4 100644 --- a/src/pnetcdf/_File.pyx +++ b/src/pnetcdf/_File.pyx @@ -52,10 +52,15 @@ cdef class File: :param str format: [Optional] underlying file format. Only relevant when creating a new file. - - ``NETCDF3_64BIT_OFFSET`` or ``NC_64BIT_OFFSET``: CDF-2 format - - ``NETCDF3_64BIT_DATA`` or ``NC_64BIT_DATA``: CDF-5 format + - ``NETCDF3_64BIT_OFFSET`` or ``NC_64BIT_OFFSET``: + `CDF-2 `_ + format + - ``NETCDF3_64BIT_DATA`` or ``NC_64BIT_DATA``: + `CDF-5 `_ + format - ``NETCDF3_CLASSIC`` or `None` defaults to default file format - (CDF-1 format) + (`CDF-1 `_ + format) :param comm: [Optional] MPI communicator to use for file access. `None` defaults to