Commit 53bbcc5c authored by Bas Couwenberg's avatar Bas Couwenberg

New upstream version

parent 14339366
version (tag v1.5.0.1rel)
* binary wheels for linux and macosx rebuilt against netcdf-c 4.6.3 (instead
* add read-shared mode (mode='rs'). Significantly speeds up reads of NETCDF3
files (pull request #902).
version 1.5.0 (tag v1.5.0rel)
* added support for parallel IO in the classic netcdf-3 formats through the
......@@ -5,10 +5,14 @@
[![Windows Build Status](](
[![PyPI package](](
[![Anaconda-Server Badge](](
## News
For details on the latest updates, see the [Changelog](
04/02/2019: Version []( released. Binary wheels for macos x
and linux rebuilt with netcdf-c 4.6.3 (instead of Added read-shared capability for faster reads
of NETCDF3 files (mode='rs').
03/24/2019: Version [1.5.0]( released. Parallel IO support for classic
file formats added using the pnetcdf library (contribution from Lars Pastewka, [pull request #897](
This diff is collapsed.
Version 1.4.3
- - -
......@@ -1190,7 +1190,7 @@ except ImportError:
# python3: zip is already python2's itertools.izip
__version__ = "1.5.0"
__version__ = ""
# Initialize numpy
import posixpath
......@@ -2006,14 +2006,14 @@ strings.
`netCDF4.Dataset` constructor.
**`filename`**: Name of netCDF file to hold dataset. Can also
be a python 3 pathlib instance or the URL of an OpenDAP dataset. When memory is
set this is just used to set the `filepath()`.
be a python 3 pathlib instance or the URL of an OpenDAP dataset. When memory is
set this is just used to set the `filepath()`.
**`mode`**: access mode. `r` means read-only; no data can be
modified. `w` means write; a new file is created, an existing file with
the same name is deleted. `a` and `r+` mean append (in analogy with
serial files); an existing file is opened for reading and writing.
Appending `s` to modes `w`, `r+` or `a` will enable unbuffered shared
Appending `s` to modes `r`, `w`, `r+` or `a` will enable unbuffered shared
`NETCDF3_64BIT_DATA` formatted files.
Unbuffered access may be useful even if you don't need shared
......@@ -2200,7 +2200,7 @@ strings.
# **this causes parallel mode to fail when both hdf5-parallel and
# pnetcdf are enabled - issue #820 **
elif mode == 'r':
elif mode in ('r', 'rs'):
if memory is not None:
# Store reference to memory
......@@ -2223,7 +2223,13 @@ strings.
elif diskless:
ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
ierr = nc_open(path, NC_NOWRITE, &grpid)
if mode == 'rs':
# NC_SHARE is very important for speed reading
# large netcdf3 files with a record dimension
# (pull request #902).
ierr = nc_open(path, NC_NOWRITE | NC_SHARE, &grpid)
ierr = nc_open(path, NC_NOWRITE, &grpid)
elif mode == 'r+' or mode == 'a':
if parallel:
......@@ -584,7 +584,7 @@ else:
long_description="netCDF version 4 has many features not found in earlier versions of the library, such as hierarchical groups, zlib compression, multiple unlimited dimensions, and new data types. It is implemented on top of HDF5. This module implements most of the new features, and can read and write netCDF files compatible with older versions of the library. The API is modelled after Scientific.IO.NetCDF, and should be familiar to users of that module.\n\nThis project is hosted on a `GitHub repository <>`_ where you may access the most up-to-date source.",
author="Jeff Whitaker",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment