1- """ Version 1.7.1
1+ """ Version 1.7.2
22-------------
33
44# Introduction
@@ -1272,7 +1272,7 @@ import sys
12721272import functools
12731273from typing import Union
12741274
1275- __version__ = " 1.7.1.post1 "
1275+ __version__ = " 1.7.2 "
12761276
12771277# Initialize numpy
12781278import posixpath
@@ -1308,15 +1308,61 @@ __has_blosc_support__ = HAS_BLOSC_SUPPORT
13081308__has_szip_support__ = HAS_SZIP_SUPPORT
13091309__has_set_alignment__ = HAS_SET_ALIGNMENT
13101310__has_ncfilter__ = HAS_NCFILTER
1311+ __has_nc_rc_set__ = HAS_NCRCSET
13111312
13121313
13131314# set path to SSL certificates (issue #1246)
13141315# available starting in version 4.9.1
1315- if HAS_NCRCSET :
1316+ if __has_nc_rc_set__ :
13161317 import certifi
13171318 if nc_rc_set(" HTTP.SSL.CAINFO" , _strencode(certifi.where())) != 0 :
13181319 raise RuntimeError (' error setting path to SSL certificates' )
13191320
1321+ def rc_get (key ):
1322+ """
1323+ **```rc_get(key)```**
1324+
1325+ Returns the internal netcdf-c rc table value corresponding to key.
1326+ """
1327+ cdef int ierr
1328+ cdef char * keyc
1329+ cdef char * valc
1330+ if __has_nc_rc_set__:
1331+ bytestr = _strencode(_tostr(key))
1332+ keyc = bytestr
1333+ valc = < char * > nc_rc_get(keyc)
1334+ if valc is NULL :
1335+ return None
1336+ else :
1337+ return valc.decode(' utf-8' )
1338+ else :
1339+ raise RuntimeError (
1340+ " This function requires netcdf-c 4.9.0+ to be used at compile time"
1341+ )
1342+
1343+ def rc_set (key , value ):
1344+ """
1345+ **```rc_set(key, value)```**
1346+
1347+ Sets the internal netcdf-c rc table value corresponding to key.
1348+ """
1349+ cdef int ierr
1350+ cdef char * keyc
1351+ cdef char * valuec
1352+ if __has_nc_rc_set__:
1353+ key_bytestr = _strencode(_tostr(key))
1354+ keyc = key_bytestr
1355+ val_bytestr = _strencode(_tostr(value))
1356+ valuec = val_bytestr
1357+ with nogil:
1358+ ierr = nc_rc_set(keyc,valuec)
1359+ _ensure_nc_success(ierr)
1360+ else :
1361+ raise RuntimeError (
1362+ " This function requires netcdf-c 4.9.0+ to be used at compile time"
1363+ )
1364+
1365+
13201366
13211367# check for required version of netcdf-4 and hdf5.
13221368def _gethdf5libversion ():
@@ -1330,7 +1376,7 @@ def _gethdf5libversion():
13301376
13311377def getlibversion ():
13321378 """
1333- **`getlibversion()`**
1379+ **``` getlibversion()`` `**
13341380
13351381returns a string describing the version of the netcdf library
13361382used to build the module, and when it was built.
@@ -1339,7 +1385,7 @@ used to build the module, and when it was built.
13391385
13401386def get_chunk_cache ():
13411387 """
1342- **`get_chunk_cache()`**
1388+ **``` get_chunk_cache()`` `**
13431389
13441390return current netCDF chunk cache information in a tuple (size,nelems,preemption).
13451391See netcdf C library documentation for `nc_get_chunk_cache` for
@@ -1355,7 +1401,7 @@ details. Values can be reset with `set_chunk_cache`."""
13551401
13561402def set_chunk_cache (size = None ,nelems = None ,preemption = None ):
13571403 """
1358- **`set_chunk_cache(self, size=None,nelems=None,preemption=None)`**
1404+ **``` set_chunk_cache(size=None,nelems=None,preemption=None)`` `**
13591405
13601406change netCDF4 chunk cache settings.
13611407See netcdf C library documentation for `nc_set_chunk_cache` for
@@ -1383,7 +1429,7 @@ details."""
13831429
13841430
13851431def get_alignment ():
1386- """ **`get_alignment()`**
1432+ """ **``` get_alignment()`` `**
13871433
13881434 return current netCDF alignment within HDF5 files in a tuple
13891435 (threshold,alignment). See netcdf C library documentation for
@@ -1394,7 +1440,7 @@ def get_alignment():
13941440
13951441 if not __has_set_alignment__:
13961442 raise RuntimeError (
1397- " This function requires netcdf4 4.9.0+ to be used at compile time"
1443+ " This function requires netcdf-c 4.9.0+ to be used at compile time"
13981444 )
13991445
14001446 cdef int ierr
@@ -1407,7 +1453,7 @@ def get_alignment():
14071453
14081454
14091455def set_alignment (threshold , alignment ):
1410- """ **`set_alignment(threshold,alignment)`**
1456+ """ **``` set_alignment(threshold,alignment)`` `**
14111457
14121458 Change the HDF5 file alignment.
14131459 See netcdf C library documentation for `nc_set_alignment` for
@@ -1417,7 +1463,7 @@ def set_alignment(threshold, alignment):
14171463
14181464 if not __has_set_alignment__:
14191465 raise RuntimeError (
1420- " This function requires netcdf4 4.9.0+ to be used at compile time"
1466+ " This function requires netcdf-c 4.9.0+ to be used at compile time"
14211467 )
14221468
14231469 cdef int ierr
0 commit comments