diff --git a/Changelog b/Changelog index 8f38449f8..9b4549882 100644 --- a/Changelog +++ b/Changelog @@ -1,7 +1,7 @@ - current master -=============== + version 1.5.0 (tag v1.5.0rel) +=============================== * added support for parallel IO in the classic netcdf-3 formats through the - pnetcdf library. + pnetcdf library (pull request #897). version 1.4.3.2 (tag v1.4.3.2) =============================== diff --git a/PKG-INFO b/PKG-INFO index 3b780e07b..3e16f2024 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: netCDF4 -Version: 1.4.3.2 +Version: 1.5.0 Author: Jeff Whitaker Author-email: jeffrey s whitaker at noaa gov Home-page: https://github.com/Unidata/netcdf4-python diff --git a/README.md b/README.md index 7e90abf56..d39a787af 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ ## News For details on the latest updates, see the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog). +03/24/2019: Version [1.5.0](https://pypi.python.org/pypi/netCDF4/1.5.0) released. Parallel IO support for classic +file formats added using the pnetcdf library (contribution from Lars Pastewka, [pull request #897](https://github.com/Unidata/netcdf4-python/pull/897)). + 03/08/2019: Version [1.4.3.2](https://pypi.python.org/pypi/netCDF4/1.4.3.2) released. Include missing membuf.pyx file in source tarball. No need to update if you installed 1.4.3.1 from a binary wheel. diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..9dfb31fe7 --- /dev/null +++ b/docs/index.html @@ -0,0 +1 @@ + diff --git a/docs/netCDF4/index.html b/docs/netCDF4/index.html index ce921ebca..e4a3c6fb9 100644 --- a/docs/netCDF4/index.html +++ b/docs/netCDF4/index.html @@ -1174,6 +1174,8 @@
--enable-dap
.
If you want HDF4 SD support, add --enable-hdf4
and add
the location of the HDF4 headers and library to $CPPFLAGS
and $LDFLAGS
.
-If MPI parallel enabled versions of netcdf and hdf5 are detected, and -mpi4py is installed, netcdf4-python will -be built with parallel IO capabilities enabled. Since parallel IO -uses features of HDF5, it can only be used with NETCDF4 or -NETCDF4_CLASSIC formatted files. To use parallel IO, -your program must be running in an MPI environment using -mpi4py.
+If MPI parallel enabled versions of netcdf and hdf5 or pnetcdf are detected, +and mpi4py is installed, netcdf4-python will +be built with parallel IO capabilities enabled. Parallel IO of NETCDF4 or +NETCDF4_CLASSIC formatted files is only available if the MPI parallel HDF5 +library is available. Parallel IO of classic netcdf-3 file formats is only +available if the PnetCDF library is +available. To use parallel IO, your program must be running in an MPI +environment using mpi4py.
>>> from mpi4py import MPI >>> import numpy as np >>> from netCDF4 import Dataset @@ -2204,9 +2206,12 @@
13) Parallel IO. the two types of IO, use theset_collective
Variable
method. All metadata operations (such as creation of groups, types, variables, dimensions, or attributes) -are collective. There are a couple of important limitatons of parallel IO: +are collective. There are a couple of important limitations of parallel IO:-
- only works with NETCDF4 or NETCDF4_CLASSIC formatted files.
+- parallel IO for NETCDF4 or NETCDF4_CLASSIC formatted files is only available + if the netcdf library was compiled with MPI enabled HDF5.
+- parallel IO for all classic netcdf-3 file formats is only available if the + netcdf library was compiled with PnetCDF.
- If a variable has an unlimited dimension, appending data must be done in collective mode. If the write is done in independent mode, the operation will fail with a a generic "HDF Error".
@@ -2616,7 +2621,7 @@Classes
Ancestors (in MRO)
- CompoundType
-- __builtin__.object
+- builtins.object
Class variables
@@ -2747,7 +2752,7 @@Static methods
Ancestors (in MRO)
- Dataset
-- __builtin__.object
+- builtins.object
Class variables
@@ -3669,7 +3674,7 @@Static methods
Ancestors (in MRO)
- Dimension
-- __builtin__.object
+- builtins.object
Class variables
@@ -3767,7 +3772,7 @@Static methods
Ancestors (in MRO)
- EnumType
-- __builtin__.object
+- builtins.object
Class variables
@@ -3855,22 +3860,15 @@Ancestors (in MRO)
Class variables
var cmptypes
-- Inheritance: -
-Dataset
.cmptypes
-The
cmptypes
dictionary maps the names of -compound types defined for theGroup
orDataset
to instances of the -CompoundType
class.@@ -3878,16 +3876,9 @@Class variables
var data_model
-- Inheritance: -
-Dataset
.data_model
-
data_model
describes the netCDF -data model version, one ofNETCDF3_CLASSIC
,NETCDF4
, -NETCDF4_CLASSIC
,NETCDF3_64BIT_OFFSET
orNETCDF3_64BIT_DATA
.@@ -3895,16 +3886,9 @@Class variables
var dimensions
-- Inheritance: -
-Dataset
.dimensions
-The
dimensions
dictionary maps the names of -dimensions defined for theGroup
orDataset
to instances of the -Dimension
class.@@ -3912,18 +3896,9 @@Class variables
var disk_format
-- Inheritance: -
-Dataset
.disk_format
-
disk_format
describes the underlying -file format, one ofNETCDF3
,HDF5
,HDF4
, -PNETCDF
,DAP2
,DAP4
orUNDEFINED
. Only available if using -netcdf C library version >= 4.3.1, otherwise will always return -UNDEFINED
.@@ -3931,16 +3906,9 @@Class variables
var enumtypes
-- Inheritance: -
-Dataset
.enumtypes
-The
enumtypes
dictionary maps the names of -Enum types defined for theGroup
orDataset
to instances of the -EnumType
class.@@ -3948,14 +3916,9 @@Class variables
var file_format
-- Inheritance: -
-Dataset
.file_format
-same as
data_model
, retained for backwards compatibility.@@ -3963,17 +3926,9 @@Class variables
var groups
-- Inheritance: -
-Dataset
.groups
-The groups dictionary maps the names of groups created for -this
Dataset
orGroup
to instances of theGroup
class (the -Dataset
class is simply a special case of theGroup
class which -describes the root group in the netCDF4 file).@@ -3981,15 +3936,9 @@Class variables
var keepweakref
-- Inheritance: -
-Dataset
.keepweakref
-If
True
, child Dimension and Variables objects only keep weak references to -the parent Dataset or Group.@@ -4008,15 +3957,9 @@Class variables
var parent
-- Inheritance: -
-Dataset
.parent
-@@ -4024,17 +3967,9 @@Class variables
var path
-- Inheritance: -
-Dataset
.path
-
path
shows the location of theGroup
in -theDataset
in a unix directory format (the names of groups in the -hierarchy separated by backslashes). ADataset
instance is the root -group, so the path is simply'/'
.@@ -4042,16 +3977,9 @@Class variables
-var variables
-- Inheritance: -
-Dataset
.variables
-The
variables
dictionary maps the names of variables -defined for thisDataset
orGroup
to instances of theVariable
-class.@@ -4059,16 +3987,9 @@Class variables
-var vltypes
-- Inheritance: -
-Dataset
.vltypes
-The
vltypes
dictionary maps the names of -variable-length types defined for theGroup
orDataset
to instances of the -VLType
class.@@ -4105,10 +4026,6 @@Static methods
def close(
self)
- Inheritance: -
@@ -4125,14 +4042,10 @@Dataset
.close
-Static methods
def createCompoundType(
self, datatype, datatype_name)
- Inheritance: -
-Dataset
.createCompoundType
-Creates a new compound data type named
datatype_name
from the numpy +-Creates a new compound data type named
datatype_name
from the numpy dtype objectdatatype
.Note: If the new compound data type contains other compound data types (i.e. it is a 'nested' compound type, where not all of the elements @@ -4151,14 +4064,10 @@
Static methods
def createDimension(
self, dimname, size=None)
- Inheritance: -
-Dataset
.createDimension
-Creates a new dimension with the given
+dimname
andsize
.-Creates a new dimension with the given
dimname
andsize
.
size
must be a positive integer orNone
, which stands for "unlimited" (default isNone
). Specifying a size of 0 also results in an unlimited dimension. The return value is theDimension
@@ -4177,14 +4086,10 @@Static methods
def createEnumType(
self, datatype, datatype_name, enum_dict)
- Inheritance: -
-Dataset
.createEnumType
-Creates a new Enum data type named
datatype_name
from a numpy +-Creates a new Enum data type named
datatype_name
from a numpy integer dtype objectdatatype
, and a python dictionary defining the enum fields and values.The return value is the
EnumType
class instance describing the new @@ -4200,14 +4105,10 @@Static methods
def createGroup(
self, groupname)
- Inheritance: -
-Dataset
.createGroup
--Creates a new
+Group
with the givengroupname
.-Creates a new
Group
with the givengroupname
.If
groupname
is specified as a path, using forward slashes as in unix to separate components, then intermediate groups will be created as necessary (analogous tomkdir -p
in unix). For example, @@ -4227,14 +4128,10 @@Static methods
def createVLType(
self, datatype, datatype_name)
- Inheritance: -
-Dataset
.createVLType
--Creates a new VLEN data type named
datatype_name
from a numpy +@@ -4249,14 +4146,10 @@Creates a new VLEN data type named
datatype_name
from a numpy dtype objectdatatype
.The return value is the
VLType
class instance describing the new datatype.Static methods
def createVariable(
self, varname, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None, fill_value=None)
- Inheritance: -
-Dataset
.createVariable
--Creates a new variable with the given
varname
,datatype
, and +-Creates a new variable with the given
varname
,datatype
, anddimensions
. If dimensions are not given, the variable is assumed to be a scalar.If
varname
is specified as a path, using forward slashes as in unix to @@ -4366,14 +4259,10 @@Static methods
def delncattr(
self,name,value)
- Inheritance: -
-Dataset
.delncattr
--delete a netCDF dataset or group attribute. Use if you need to delete a +
delete a netCDF dataset or group attribute. Use if you need to delete a netCDF attribute with the same name as one of the reserved python attributes.
@@ -4387,14 +4276,10 @@-Static methods
def filepath(
self,encoding=None)
- Inheritance: -
-Dataset
.filepath
--Get the file system path (or the opendap URL) which was used to +
@@ -4409,14 +4294,10 @@Get the file system path (or the opendap URL) which was used to open/create the Dataset. Requires netcdf >= 4.1.2. The path is decoded into a string using
sys.getfilesystemencoding()
by default, this can be changed using theencoding
kwarg.Static methods
def get_variables_by_attributes(
...)
- Inheritance: -
-Dataset
.get_variables_by_attributes
--Returns a list of variables that match specific conditions.
+-Returns a list of variables that match specific conditions.
Can pass in key=value parameters and variables are returned that contain all of the matches. For example,
->>> # Get variables with x-axis attribute. @@ -4448,14 +4329,10 @@Static methods
def getncattr(
self,name)
- Inheritance: -
-Dataset
.getncattr
--retrieve a netCDF dataset or group attribute. +
-retrieve a netCDF dataset or group attribute. Use if you need to get a netCDF attribute with the same name as one of the reserved python attributes.
option kwarg
encoding
can be used to specify the @@ -4471,14 +4348,10 @@Static methods
def isopen(
...)
- Inheritance: -
-Dataset
.isopen
-+is the Dataset open or closed?
is the Dataset open or closed?
@@ -4490,14 +4363,10 @@Static methods
def ncattrs(
self)
- Inheritance: -
- +Dataset
.ncattrs
-@@ -4509,14 +4378,10 @@Static methods
def renameAttribute(
self, oldname, newname)
- Inheritance: -
- +Dataset
.renameAttribute
-@@ -4528,14 +4393,10 @@Static methods
def renameDimension(
self, oldname, newname)
- Inheritance: -
-Dataset
.renameDimension
-+rename a
Dimension
namedoldname
tonewname
.rename a
Dimension
namedoldname
tonewname
.@@ -4547,14 +4408,10 @@Static methods
def renameGroup(
self, oldname, newname)
- Inheritance: -
-Dataset
.renameGroup
-+rename a
Group
namedoldname
tonewname
(requires netcdf >= 4.3.1).rename a
Group
namedoldname
tonewname
(requires netcdf >= 4.3.1).@@ -4566,14 +4423,10 @@Static methods
def renameVariable(
self, oldname, newname)
- Inheritance: -
-Dataset
.renameVariable
-+rename a
Variable
namedoldname
tonewname
rename a
Variable
namedoldname
tonewname
@@ -4585,14 +4438,10 @@Static methods
def set_always_mask(
self, True_or_False)
- Inheritance: -
-Dataset
.set_always_mask
-Call
set_always_mask
for all variables contained in +-Call
set_always_mask
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.
True_or_False
: Boolean determining if automatic conversion of @@ -4612,14 +4461,10 @@Static methods
def set_auto_chartostring(
self, True_or_False)
- Inheritance: -
-Dataset
.set_auto_chartostring
-Call
set_auto_chartostring
for all variables contained in thisDataset
or +-Call
set_auto_chartostring
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.
True_or_False
: Boolean determining if automatic conversion of all character arrays <--> string arrays should be performed for @@ -4638,14 +4483,10 @@Static methods
def set_auto_mask(
self, True_or_False)
- Inheritance: -
-Dataset
.set_auto_mask
-Call
set_auto_mask
for all variables contained in thisDataset
or +-Call
set_auto_mask
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.@@ -4662,14 +4503,10 @@
True_or_False
: Boolean determining if automatic conversion to masked arrays shall be applied for all variables.Static methods
def set_auto_maskandscale(
self, True_or_False)
- Inheritance: -
-Dataset
.set_auto_maskandscale
-Call
set_auto_maskandscale
for all variables contained in thisDataset
or +-Call
set_auto_maskandscale
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.@@ -4686,14 +4523,10 @@
True_or_False
: Boolean determining if automatic conversion to masked arrays and variable scaling shall be applied for all variables.Static methods
def set_auto_scale(
self, True_or_False)
- Inheritance: -
-Dataset
.set_auto_scale
-Call
set_auto_scale
for all variables contained in thisDataset
or +-Call
set_auto_scale
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.@@ -4710,14 +4543,10 @@
True_or_False
: Boolean determining if automatic variable scaling shall be applied for all variables.Static methods
def set_fill_off(
self)
- Inheritance: -
-Dataset
.set_fill_off
--Sets the fill mode for a
+Dataset
open for writing tooff
.@@ -4732,14 +4561,10 @@Sets the fill mode for a
Dataset
open for writing tooff
.This will prevent the data from being pre-filled with fill values, which may result in some performance improvements. However, you must then make sure the data is actually written before being read.
Static methods
def set_fill_on(
self)
- Inheritance: -
-Dataset
.set_fill_on
-Sets the fill mode for a
+Dataset
open for writing toon
.-Sets the fill mode for a
Dataset
open for writing toon
.This causes data to be pre-filled with fill values. The fill values can be controlled by the variable's
_Fill_Value
attribute, but is usually sufficient to the use the netCDF default_Fill_Value
(defined @@ -4758,14 +4583,10 @@Static methods
def set_ncstring_attrs(
self, True_or_False)
- Inheritance: -
-Dataset
.set_ncstring_attrs
-Call
set_ncstring_attrs
for all variables contained in +-Call
set_ncstring_attrs
for all variables contained in thisDataset
orGroup
, as well as for all its subgroups and their variables.
True_or_False
: Boolean determining if all string attributes are @@ -4784,14 +4605,10 @@Static methods
def setncattr(
self,name,value)
- Inheritance: -
-Dataset
.setncattr
-set a netCDF dataset or group attribute using name,value pair. +
set a netCDF dataset or group attribute using name,value pair. Use if you need to set a netCDF attribute with the with the same name as one of the reserved python attributes.
@@ -4805,14 +4622,10 @@-Static methods
def setncattr_string(
self,name,value)
- Inheritance: -
-Dataset
.setncattr_string
-set a netCDF dataset or group string attribute using name,value pair. +
set a netCDF dataset or group string attribute using name,value pair. Use if you need to ensure that a netCDF attribute is created with type
NC_STRING
if the file format isNETCDF4
.@@ -4826,14 +4639,10 @@-Static methods
def setncatts(
self,attdict)
- Inheritance: -
-Dataset
.setncatts
--set a bunch of netCDF dataset or group attributes at once using a python dictionary. +
@@ -4848,14 +4657,10 @@set a bunch of netCDF dataset or group attributes at once using a python dictionary. This may be faster when setting a lot of attributes for a
NETCDF3
formatted file, since nc_redef/nc_enddef is not called in between setting each attributeStatic methods
def sync(
self)
- Inheritance: -
-Dataset
.sync
-+Writes all buffered data in the
Dataset
to the disk file.Writes all buffered data in the
Dataset
to the disk file.@@ -4900,22 +4705,15 @@Ancestors (in MRO)
Class variables
var cmptypes
-- Inheritance: -
-Dataset
.cmptypes
-The
cmptypes
dictionary maps the names of -compound types defined for theGroup
orDataset
to instances of the -CompoundType
class.@@ -4923,16 +4721,9 @@Class variables
var data_model
-- Inheritance: -
-Dataset
.data_model
-
data_model
describes the netCDF -data model version, one ofNETCDF3_CLASSIC
,NETCDF4
, -NETCDF4_CLASSIC
,NETCDF3_64BIT_OFFSET
orNETCDF3_64BIT_DATA
.@@ -4940,16 +4731,9 @@Class variables
var dimensions
-- Inheritance: -
-Dataset
.dimensions
-The
dimensions
dictionary maps the names of -dimensions defined for theGroup
orDataset
to instances of the -Dimension
class.@@ -4957,18 +4741,9 @@Class variables
var disk_format
-- Inheritance: -
-Dataset
.disk_format
-
disk_format
describes the underlying -file format, one ofNETCDF3
,HDF5
,HDF4
, -PNETCDF
,DAP2
,DAP4
orUNDEFINED
. Only available if using -netcdf C library version >= 4.3.1, otherwise will always return -UNDEFINED
.@@ -4976,16 +4751,9 @@Class variables
var enumtypes
-- Inheritance: -
-Dataset
.enumtypes
-The
enumtypes
dictionary maps the names of -Enum types defined for theGroup
orDataset
to instances of the -EnumType
class.@@ -4993,14 +4761,9 @@Class variables
var file_format
-- Inheritance: -
-Dataset
.file_format
-same as
data_model
, retained for backwards compatibility.@@ -5008,17 +4771,9 @@Class variables
var groups
-- Inheritance: -
-Dataset
.groups
-The groups dictionary maps the names of groups created for -this
Dataset
orGroup
to instances of theGroup
class (the -Dataset
class is simply a special case of theGroup
class which -describes the root group in the netCDF4 file).@@ -5026,15 +4781,9 @@Class variables
var keepweakref
-- Inheritance: -
-Dataset
.keepweakref
-If
True
, child Dimension and Variables objects only keep weak references to -the parent Dataset or Group.@@ -5042,15 +4791,9 @@Class variables
var parent
-- Inheritance: -
-Dataset
.parent
-@@ -5058,17 +4801,9 @@Class variables
var path
-- Inheritance: -
-Dataset
.path
-
path
shows the location of theGroup
in -theDataset
in a unix directory format (the names of groups in the -hierarchy separated by backslashes). ADataset
instance is the root -group, so the path is simply'/'
.@@ -5076,16 +4811,9 @@Class variables
var variables
-- Inheritance: -
-Dataset
.variables
-The
variables
dictionary maps the names of variables -defined for thisDataset
orGroup
to instances of theVariable
-class.@@ -5093,16 +4821,9 @@Class variables
var vltypes
-- Inheritance: -
-Dataset
.vltypes
-The
vltypes
dictionary maps the names of -variable-length types defined for theGroup
orDataset
to instances of the -VLType
class.@@ -5110,18 +4831,74 @@Class variables
Static methods
--def createCompoundType(
self, datatype, datatype_name)
++def __init__(
self, files, check=False, aggdim=None, exclude=[], master_file=None)
Inheritance: -
-Dataset
.createCompoundType
+Dataset
.__init__
+ + +Creates a new compound data type named
datatype_name
from the numpy +++
__init__(self, files, check=False, aggdim=None, exclude=[], +master_file=None)
Open a Dataset spanning multiple files, making it look as if it was a +single file. Variables in the list of files that share the same +dimension (specified with the keyword
+aggdim
) are aggregated. If +aggdim
is not specified, the unlimited is aggregated. Currently, +aggdim
must be the leftmost (slowest varying) dimension of each +of the variables to be aggregated.+
files
: either a sequence of netCDF files or a string with a +wildcard (converted to a sorted list of files using glob) If +themaster_file
kwarg is not specified, the first file +in the list will become the "master" file, defining all the +variables with an aggregation dimension which may span +subsequent files. Attribute access returns attributes only from "master" +file. The files are always opened in read-only mode.+
check
: True if you want to do consistency checking to ensure the +correct variables structure for all of the netcdf files. Checking makes +the initialization of the MFDataset instance much slower. Default is +False.+
aggdim
: The name of the dimension to aggregate over (must +be the leftmost dimension of each of the variables to be aggregated). +If None (default), aggregate over the unlimited dimension.+
exclude
: A list of variable names to exclude from aggregation. +Default is an empty list.
master_file
: file to use as "master file", defining all the +variables with an aggregation dimension and all global attributes.++ +++ + +++ + + + +def close(
self)
+++
close(self)
close all the open files.
++ ++++ + + + +def createCompoundType(
self, datatype, datatype_name)
+-Creates a new compound data type named
datatype_name
from the numpy dtype objectdatatype
.Note: If the new compound data type contains other compound data types (i.e. it is a 'nested' compound type, where not all of the elements @@ -5140,14 +4917,10 @@
Static methods
def createDimension(
self, dimname, size=None)
- Inheritance: -
-Dataset
.createDimension
-Creates a new dimension with the given
+dimname
andsize
.-Creates a new dimension with the given
dimname
andsize
.
size
must be a positive integer orNone
, which stands for "unlimited" (default isNone
). Specifying a size of 0 also results in an unlimited dimension. The return value is theDimension
@@ -5166,14 +4939,10 @@Static methods
def createEnumType(
self, datatype, datatype_name, enum_dict)
- Inheritance: -
-Dataset
.createEnumType
-Creates a new Enum data type named
datatype_name
from a numpy +-Creates a new Enum data type named
datatype_name
from a numpy integer dtype objectdatatype
, and a python dictionary defining the enum fields and values.The return value is the
EnumType
class instance describing the new @@ -5189,14 +4958,10 @@Static methods
def createGroup(
self, groupname)
- Inheritance: -
-Dataset
.createGroup
-Creates a new
+Group
with the givengroupname
.-Creates a new
Group
with the givengroupname
.If
groupname
is specified as a path, using forward slashes as in unix to separate components, then intermediate groups will be created as necessary (analogous tomkdir -p
in unix). For example, @@ -5216,14 +4981,10 @@Static methods
def createVLType(
self, datatype, datatype_name)
- Inheritance: -
-Dataset
.createVLType
--Creates a new VLEN data type named
datatype_name
from a numpy +@@ -5238,14 +4999,10 @@Creates a new VLEN data type named
datatype_name
from a numpy dtype objectdatatype
.The return value is the
VLType
class instance describing the new datatype.Static methods
def createVariable(
self, varname, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None, fill_value=None)
- Inheritance: -
-Dataset
.createVariable
--Creates a new variable with the given
varname
,datatype
, and +-Creates a new variable with the given
varname
,datatype
, anddimensions
. If dimensions are not given, the variable is assumed to be a scalar.If
varname
is specified as a path, using forward slashes as in unix to @@ -5355,14 +5112,10 @@Static methods
def delncattr(
self,name,value)
- Inheritance: -
-Dataset
.delncattr
--delete a netCDF dataset or group attribute. Use if you need to delete a +
delete a netCDF dataset or group attribute. Use if you need to delete a netCDF attribute with the same name as one of the reserved python attributes.
@@ -5376,14 +5129,10 @@-Static methods
def filepath(
self,encoding=None)
- Inheritance: -
-Dataset
.filepath
--Get the file system path (or the opendap URL) which was used to +
@@ -5398,14 +5147,10 @@Get the file system path (or the opendap URL) which was used to open/create the Dataset. Requires netcdf >= 4.1.2. The path is decoded into a string using
sys.getfilesystemencoding()
by default, this can be changed using theencoding
kwarg.Static methods
def get_variables_by_attributes(
...)
- Inheritance: -
-Dataset
.get_variables_by_attributes
--Returns a list of variables that match specific conditions.
+-Returns a list of variables that match specific conditions.
Can pass in key=value parameters and variables are returned that contain all of the matches. For example,
->>> # Get variables with x-axis attribute. @@ -5437,14 +5182,10 @@Static methods
def getncattr(
self,name)
- Inheritance: -
-Dataset
.getncattr
-+ + +retrieve a netCDF dataset or group attribute. +
-retrieve a netCDF dataset or group attribute. Use if you need to get a netCDF attribute with the same name as one of the reserved python attributes.
option kwarg
encoding
can be used to specify the @@ -5460,14 +5201,26 @@Static methods
def isopen(
...)
- Inheritance: -
-Dataset
.isopen
-+is the Dataset open or closed?
+is the Dataset open or closed?
++ ++-++ + + + +def ncattrs(
self)
++
ncattrs(self)
return the netcdf attribute names from the master file.
@@ -5479,14 +5232,10 @@Static methods
def renameAttribute(
self, oldname, newname)
- Inheritance: -
- +Dataset
.renameAttribute
-@@ -5498,14 +5247,10 @@Static methods
def renameDimension(
self, oldname, newname)
- Inheritance: -
-Dataset
.renameDimension
-+rename a
Dimension
namedoldname
tonewname
.rename a
Dimension
namedoldname
tonewname
.@@ -5517,14 +5262,10 @@Static methods
def renameGroup(
self, oldname, newname)
- Inheritance: -
-Dataset
.renameGroup
-+rename a
Group
namedoldname
tonewname
(requires netcdf >= 4.3.1).rename a
Group
namedoldname
tonewname
(requires netcdf >= 4.3.1).@@ -5536,14 +5277,10 @@Static methods
def renameVariable(
self, oldname, newname)
- Inheritance: -
-Dataset
.renameVariable
-+rename a
Variable
namedoldname
tonewname
rename a
Variable
namedoldname
tonewname
@@ -5555,14 +5292,10 @@Static methods
def set_always_mask(
self, True_or_False)
- Inheritance: -
-Dataset
.set_always_mask
-Call
set_always_mask
for all variables contained in +-Call
set_always_mask
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.
True_or_False
: Boolean determining if automatic conversion of @@ -5582,14 +5315,10 @@Static methods
def set_auto_chartostring(
self, True_or_False)
- Inheritance: -
-Dataset
.set_auto_chartostring
-Call
set_auto_chartostring
for all variables contained in thisDataset
or +-Call
set_auto_chartostring
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.
True_or_False
: Boolean determining if automatic conversion of all character arrays <--> string arrays should be performed for @@ -5608,14 +5337,10 @@Static methods
def set_auto_mask(
self, True_or_False)
- Inheritance: -
-Dataset
.set_auto_mask
-Call
set_auto_mask
for all variables contained in thisDataset
or +-Call
set_auto_mask
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.@@ -5632,14 +5357,10 @@
True_or_False
: Boolean determining if automatic conversion to masked arrays shall be applied for all variables.Static methods
def set_auto_maskandscale(
self, True_or_False)
- Inheritance: -
-Dataset
.set_auto_maskandscale
-Call
set_auto_maskandscale
for all variables contained in thisDataset
or +-Call
set_auto_maskandscale
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.@@ -5656,14 +5377,10 @@
True_or_False
: Boolean determining if automatic conversion to masked arrays and variable scaling shall be applied for all variables.Static methods
def set_auto_scale(
self, True_or_False)
- Inheritance: -
-Dataset
.set_auto_scale
-Call
set_auto_scale
for all variables contained in thisDataset
or +-Call
set_auto_scale
for all variables contained in thisDataset
orGroup
, as well as for all variables in all its subgroups.@@ -5680,14 +5397,10 @@
True_or_False
: Boolean determining if automatic variable scaling shall be applied for all variables.Static methods
def set_fill_off(
self)
- Inheritance: -
-Dataset
.set_fill_off
--Sets the fill mode for a
+Dataset
open for writing tooff
.@@ -5702,14 +5415,10 @@Sets the fill mode for a
Dataset
open for writing tooff
.This will prevent the data from being pre-filled with fill values, which may result in some performance improvements. However, you must then make sure the data is actually written before being read.
Static methods
def set_fill_on(
self)
- Inheritance: -
-Dataset
.set_fill_on
-Sets the fill mode for a
+Dataset
open for writing toon
.-Sets the fill mode for a
Dataset
open for writing toon
.This causes data to be pre-filled with fill values. The fill values can be controlled by the variable's
_Fill_Value
attribute, but is usually sufficient to the use the netCDF default_Fill_Value
(defined @@ -5728,14 +5437,10 @@Static methods
def set_ncstring_attrs(
self, True_or_False)
- Inheritance: -
-Dataset
.set_ncstring_attrs
-Call
set_ncstring_attrs
for all variables contained in +-Call
set_ncstring_attrs
for all variables contained in thisDataset
orGroup
, as well as for all its subgroups and their variables.
True_or_False
: Boolean determining if all string attributes are @@ -5754,14 +5459,10 @@Static methods
def setncattr(
self,name,value)
- Inheritance: -
-Dataset
.setncattr
-set a netCDF dataset or group attribute using name,value pair. +
set a netCDF dataset or group attribute using name,value pair. Use if you need to set a netCDF attribute with the with the same name as one of the reserved python attributes.
@@ -5775,14 +5476,10 @@-Static methods
def setncattr_string(
self,name,value)
- Inheritance: -
-Dataset
.setncattr_string
-- -set a netCDF dataset or group string attribute using name,value pair. +
set a netCDF dataset or group string attribute using name,value pair. Use if you need to ensure that a netCDF attribute is created with type
NC_STRING
if the file format isNETCDF4
.@@ -5796,14 +5493,10 @@-Static methods
def setncatts(
self,attdict)
- Inheritance: -
-Dataset
.setncatts
--set a bunch of netCDF dataset or group attributes at once using a python dictionary. +
@@ -5818,95 +5511,10 @@set a bunch of netCDF dataset or group attributes at once using a python dictionary. This may be faster when setting a lot of attributes for a
NETCDF3
formatted file, since nc_redef/nc_enddef is not called in between setting each attributeStatic methods
def sync(
self)
- Inheritance: -
-Dataset
.sync
--Writes all buffered data in the
Dataset
to the disk file.-- -Methods
- --- - --- -def __init__(
self, files, check=False, aggdim=None, exclude=[], master_file=None)
-- Inheritance: -
- - - -Dataset
.__init__
--Open a Dataset spanning multiple files, making it look as if it was a -single file. Variables in the list of files that share the same -dimension (specified with the keyword
-aggdim
) are aggregated. If -aggdim
is not specified, the unlimited is aggregated. Currently, -aggdim
must be the leftmost (slowest varying) dimension of each -of the variables to be aggregated.-
files
: either a sequence of netCDF files or a string with a -wildcard (converted to a sorted list of files using glob) If -themaster_file
kwarg is not specified, the first file -in the list will become the "master" file, defining all the -variables with an aggregation dimension which may span -subsequent files. Attribute access returns attributes only from "master" -file. The files are always opened in read-only mode.-
check
: True if you want to do consistency checking to ensure the -correct variables structure for all of the netcdf files. Checking makes -the initialization of the MFDataset instance much slower. Default is -False.-
aggdim
: The name of the dimension to aggregate over (must -be the leftmost dimension of each of the variables to be aggregated). -If None (default), aggregate over the unlimited dimension.-
exclude
: A list of variable names to exclude from aggregation. -Default is an empty list.
master_file
: file to use as "master file", defining all the -variables with an aggregation dimension and all global attributes.-- --- - --- -def close(
self)
-- Inheritance: -
- - - -Dataset
.close
--close all the open files.
-- ---- -def ncattrs(
self)
-- Inheritance: -
- - - -Dataset
.ncattrs
-+return the netcdf attribute names from the master file.
Writes all buffered data in the
Dataset
to the disk file.@@ -5957,9 +5565,9 @@Ancestors (in MRO)
-
- MFTime
- netCDF4._netCDF4._Variable
-- __builtin__.object
+- builtins.object
Methods
+Static methods
@@ -5969,7 +5577,8 @@Methods
-Create a time Variable with units consistent across a multifile +
+
__init__(self, time, units=None, calendar=None)
Create a time Variable with units consistent across a multifile dataset.
time
: Time variable from aMFDataset
.
units
: Time units, for example,'days since 1979-01-01'
. IfNone
, @@ -5986,7 +5595,7 @@Methods
-@@ -6000,7 +5609,7 @@def ncattrs(
...)
+def ncattrs(
self)
Methods
-@@ -6014,7 +5623,7 @@def set_always_mask(
...)
+def set_always_mask(
self, val)
Methods
-@@ -6028,7 +5637,7 @@def set_auto_chartostring(
...)
+def set_auto_chartostring(
self, val)
Methods
-@@ -6042,7 +5651,7 @@def set_auto_mask(
...)
+def set_auto_mask(
self, val)
Methods
-@@ -6056,7 +5665,7 @@def set_auto_maskandscale(
...)
+def set_auto_maskandscale(
self, val)
Methods
-@@ -6070,7 +5679,7 @@def set_auto_scale(
...)
+def set_auto_scale(
self, val)
Methods
-@@ -6102,7 +5711,7 @@def typecode(
...)
+def typecode(
self)
Methods
Ancestors (in MRO)
- VLType
-- __builtin__.object
+- builtins.object
Class variables
@@ -6207,7 +5816,7 @@Static methods
Ancestors (in MRO)
- Variable
-- __builtin__.object
+- builtins.object
Class variables
@@ -6936,7 +6545,7 @@Static methods