3 | 3 |
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
|
4 | 4 |
|
5 | 5 |
<title>netCDF4 API documentation</title>
|
6 | |
<meta name="description" content="Version 1.5.0
|
|
6 |
<meta name="description" content="Version 1.5.1
|
7 | 7 |
-------------
|
8 | 8 |
- - -
|
9 | 9 |
|
|
1173 | 1173 |
|
1174 | 1174 |
|
1175 | 1175 |
<ul>
|
|
1176 |
<li class="mono"><a href="#netCDF4.MFDataset.__init__">__init__</a></li>
|
|
1177 |
<li class="mono"><a href="#netCDF4.MFDataset.close">close</a></li>
|
1176 | 1178 |
<li class="mono"><a href="#netCDF4.MFDataset.createCompoundType">createCompoundType</a></li>
|
1177 | 1179 |
<li class="mono"><a href="#netCDF4.MFDataset.createDimension">createDimension</a></li>
|
1178 | 1180 |
<li class="mono"><a href="#netCDF4.MFDataset.createEnumType">createEnumType</a></li>
|
|
1184 | 1186 |
<li class="mono"><a href="#netCDF4.MFDataset.get_variables_by_attributes">get_variables_by_attributes</a></li>
|
1185 | 1187 |
<li class="mono"><a href="#netCDF4.MFDataset.getncattr">getncattr</a></li>
|
1186 | 1188 |
<li class="mono"><a href="#netCDF4.MFDataset.isopen">isopen</a></li>
|
|
1189 |
<li class="mono"><a href="#netCDF4.MFDataset.ncattrs">ncattrs</a></li>
|
1187 | 1190 |
<li class="mono"><a href="#netCDF4.MFDataset.renameAttribute">renameAttribute</a></li>
|
1188 | 1191 |
<li class="mono"><a href="#netCDF4.MFDataset.renameDimension">renameDimension</a></li>
|
1189 | 1192 |
<li class="mono"><a href="#netCDF4.MFDataset.renameGroup">renameGroup</a></li>
|
|
1200 | 1203 |
<li class="mono"><a href="#netCDF4.MFDataset.setncattr_string">setncattr_string</a></li>
|
1201 | 1204 |
<li class="mono"><a href="#netCDF4.MFDataset.setncatts">setncatts</a></li>
|
1202 | 1205 |
<li class="mono"><a href="#netCDF4.MFDataset.sync">sync</a></li>
|
1203 | |
<li class="mono"><a href="#netCDF4.MFDataset.__init__">__init__</a></li>
|
1204 | |
<li class="mono"><a href="#netCDF4.MFDataset.close">close</a></li>
|
1205 | |
<li class="mono"><a href="#netCDF4.MFDataset.ncattrs">ncattrs</a></li>
|
1206 | 1206 |
</ul>
|
1207 | 1207 |
|
1208 | 1208 |
</li>
|
|
1279 | 1279 |
|
1280 | 1280 |
<header id="section-intro">
|
1281 | 1281 |
<h1 class="title"><span class="name">netCDF4</span> module</h1>
|
1282 | |
<h2>Version 1.5.0</h2>
|
|
1282 |
<h2>Version 1.5.1</h2>
|
1283 | 1283 |
<hr />
|
1284 | 1284 |
<h1>Introduction</h1>
|
1285 | 1285 |
<p>netcdf4-python is a Python interface to the netCDF C library.</p>
|
|
2620 | 2620 |
<h3>Ancestors (in MRO)</h3>
|
2621 | 2621 |
<ul class="class_list">
|
2622 | 2622 |
<li><a href="#netCDF4.CompoundType">CompoundType</a></li>
|
2623 | |
<li>__builtin__.object</li>
|
|
2623 |
<li>builtins.object</li>
|
2624 | 2624 |
</ul>
|
2625 | 2625 |
<h3>Class variables</h3>
|
2626 | 2626 |
<div class="item">
|
|
2751 | 2751 |
<h3>Ancestors (in MRO)</h3>
|
2752 | 2752 |
<ul class="class_list">
|
2753 | 2753 |
<li><a href="#netCDF4.Dataset">Dataset</a></li>
|
2754 | |
<li>__builtin__.object</li>
|
|
2754 |
<li>builtins.object</li>
|
2755 | 2755 |
</ul>
|
2756 | 2756 |
<h3>Class variables</h3>
|
2757 | 2757 |
<div class="item">
|
|
2928 | 2928 |
modified. <code>w</code> means write; a new file is created, an existing file with
|
2929 | 2929 |
the same name is deleted. <code>a</code> and <code>r+</code> mean append (in analogy with
|
2930 | 2930 |
serial files); an existing file is opened for reading and writing.
|
2931 | |
Appending <code>s</code> to modes <code>w</code>, <code>r+</code> or <code>a</code> will enable unbuffered shared
|
|
2931 |
Appending <code>s</code> to modes <code>r</code>, <code>w</code>, <code>r+</code> or <code>a</code> will enable unbuffered shared
|
2932 | 2932 |
access to <code>NETCDF3_CLASSIC</code>, <code>NETCDF3_64BIT_OFFSET</code> or
|
2933 | 2933 |
<code>NETCDF3_64BIT_DATA</code> formatted files.
|
2934 | 2934 |
Unbuffered access may be useful even if you don't need shared
|
|
3673 | 3673 |
<h3>Ancestors (in MRO)</h3>
|
3674 | 3674 |
<ul class="class_list">
|
3675 | 3675 |
<li><a href="#netCDF4.Dimension">Dimension</a></li>
|
3676 | |
<li>__builtin__.object</li>
|
|
3676 |
<li>builtins.object</li>
|
3677 | 3677 |
</ul>
|
3678 | 3678 |
<h3>Class variables</h3>
|
3679 | 3679 |
<div class="item">
|
|
3771 | 3771 |
<h3>Ancestors (in MRO)</h3>
|
3772 | 3772 |
<ul class="class_list">
|
3773 | 3773 |
<li><a href="#netCDF4.EnumType">EnumType</a></li>
|
3774 | |
<li>__builtin__.object</li>
|
|
3774 |
<li>builtins.object</li>
|
3775 | 3775 |
</ul>
|
3776 | 3776 |
<h3>Class variables</h3>
|
3777 | 3777 |
<div class="item">
|
|
3859 | 3859 |
<ul class="class_list">
|
3860 | 3860 |
<li><a href="#netCDF4.Group">Group</a></li>
|
3861 | 3861 |
<li><a href="#netCDF4.Dataset">Dataset</a></li>
|
3862 | |
<li>__builtin__.object</li>
|
|
3862 |
<li>builtins.object</li>
|
3863 | 3863 |
</ul>
|
3864 | 3864 |
<h3>Class variables</h3>
|
3865 | 3865 |
<div class="item">
|
3866 | 3866 |
<p id="netCDF4.Group.cmptypes" class="name">var <span class="ident">cmptypes</span></p>
|
3867 | 3867 |
|
3868 | |
<p class="inheritance">
|
3869 | |
<strong>Inheritance:</strong>
|
3870 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.cmptypes">cmptypes</a></code>
|
3871 | |
</p>
|
3872 | |
|
3873 | |
|
3874 | |
|
3875 | |
<div class="desc inherited"><p>The <code>cmptypes</code> dictionary maps the names of
|
3876 | |
compound types defined for the <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Dataset"><code>Dataset</code></a> to instances of the
|
3877 | |
<a href="#netCDF4.CompoundType"><code>CompoundType</code></a> class.</p></div>
|
|
3868 |
|
|
3869 |
|
|
3870 |
|
3878 | 3871 |
<div class="source_cont">
|
3879 | 3872 |
</div>
|
3880 | 3873 |
|
|
3882 | 3875 |
<div class="item">
|
3883 | 3876 |
<p id="netCDF4.Group.data_model" class="name">var <span class="ident">data_model</span></p>
|
3884 | 3877 |
|
3885 | |
<p class="inheritance">
|
3886 | |
<strong>Inheritance:</strong>
|
3887 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.data_model">data_model</a></code>
|
3888 | |
</p>
|
3889 | |
|
3890 | |
|
3891 | |
|
3892 | |
<div class="desc inherited"><p><code>data_model</code> describes the netCDF
|
3893 | |
data model version, one of <code>NETCDF3_CLASSIC</code>, <code>NETCDF4</code>,
|
3894 | |
<code>NETCDF4_CLASSIC</code>, <code>NETCDF3_64BIT_OFFSET</code> or <code>NETCDF3_64BIT_DATA</code>.</p></div>
|
|
3878 |
|
|
3879 |
|
|
3880 |
|
3895 | 3881 |
<div class="source_cont">
|
3896 | 3882 |
</div>
|
3897 | 3883 |
|
|
3899 | 3885 |
<div class="item">
|
3900 | 3886 |
<p id="netCDF4.Group.dimensions" class="name">var <span class="ident">dimensions</span></p>
|
3901 | 3887 |
|
3902 | |
<p class="inheritance">
|
3903 | |
<strong>Inheritance:</strong>
|
3904 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.dimensions">dimensions</a></code>
|
3905 | |
</p>
|
3906 | |
|
3907 | |
|
3908 | |
|
3909 | |
<div class="desc inherited"><p>The <code>dimensions</code> dictionary maps the names of
|
3910 | |
dimensions defined for the <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Dataset"><code>Dataset</code></a> to instances of the
|
3911 | |
<a href="#netCDF4.Dimension"><code>Dimension</code></a> class.</p></div>
|
|
3888 |
|
|
3889 |
|
|
3890 |
|
3912 | 3891 |
<div class="source_cont">
|
3913 | 3892 |
</div>
|
3914 | 3893 |
|
|
3916 | 3895 |
<div class="item">
|
3917 | 3896 |
<p id="netCDF4.Group.disk_format" class="name">var <span class="ident">disk_format</span></p>
|
3918 | 3897 |
|
3919 | |
<p class="inheritance">
|
3920 | |
<strong>Inheritance:</strong>
|
3921 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.disk_format">disk_format</a></code>
|
3922 | |
</p>
|
3923 | |
|
3924 | |
|
3925 | |
|
3926 | |
<div class="desc inherited"><p><code>disk_format</code> describes the underlying
|
3927 | |
file format, one of <code>NETCDF3</code>, <code>HDF5</code>, <code>HDF4</code>,
|
3928 | |
<code>PNETCDF</code>, <code>DAP2</code>, <code>DAP4</code> or <code>UNDEFINED</code>. Only available if using
|
3929 | |
netcdf C library version >= 4.3.1, otherwise will always return
|
3930 | |
<code>UNDEFINED</code>.</p></div>
|
|
3898 |
|
|
3899 |
|
|
3900 |
|
3931 | 3901 |
<div class="source_cont">
|
3932 | 3902 |
</div>
|
3933 | 3903 |
|
|
3935 | 3905 |
<div class="item">
|
3936 | 3906 |
<p id="netCDF4.Group.enumtypes" class="name">var <span class="ident">enumtypes</span></p>
|
3937 | 3907 |
|
3938 | |
<p class="inheritance">
|
3939 | |
<strong>Inheritance:</strong>
|
3940 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.enumtypes">enumtypes</a></code>
|
3941 | |
</p>
|
3942 | |
|
3943 | |
|
3944 | |
|
3945 | |
<div class="desc inherited"><p>The <code>enumtypes</code> dictionary maps the names of
|
3946 | |
Enum types defined for the <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Dataset"><code>Dataset</code></a> to instances of the
|
3947 | |
<a href="#netCDF4.EnumType"><code>EnumType</code></a> class.</p></div>
|
|
3908 |
|
|
3909 |
|
|
3910 |
|
3948 | 3911 |
<div class="source_cont">
|
3949 | 3912 |
</div>
|
3950 | 3913 |
|
|
3952 | 3915 |
<div class="item">
|
3953 | 3916 |
<p id="netCDF4.Group.file_format" class="name">var <span class="ident">file_format</span></p>
|
3954 | 3917 |
|
3955 | |
<p class="inheritance">
|
3956 | |
<strong>Inheritance:</strong>
|
3957 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.file_format">file_format</a></code>
|
3958 | |
</p>
|
3959 | |
|
3960 | |
|
3961 | |
|
3962 | |
<div class="desc inherited"><p>same as <code>data_model</code>, retained for backwards compatibility.</p></div>
|
|
3918 |
|
|
3919 |
|
|
3920 |
|
3963 | 3921 |
<div class="source_cont">
|
3964 | 3922 |
</div>
|
3965 | 3923 |
|
|
3967 | 3925 |
<div class="item">
|
3968 | 3926 |
<p id="netCDF4.Group.groups" class="name">var <span class="ident">groups</span></p>
|
3969 | 3927 |
|
3970 | |
<p class="inheritance">
|
3971 | |
<strong>Inheritance:</strong>
|
3972 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.groups">groups</a></code>
|
3973 | |
</p>
|
3974 | |
|
3975 | |
|
3976 | |
|
3977 | |
<div class="desc inherited"><p>The groups dictionary maps the names of groups created for
|
3978 | |
this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> to instances of the <a href="#netCDF4.Group"><code>Group</code></a> class (the
|
3979 | |
<a href="#netCDF4.Dataset"><code>Dataset</code></a> class is simply a special case of the <a href="#netCDF4.Group"><code>Group</code></a> class which
|
3980 | |
describes the root group in the netCDF4 file).</p></div>
|
|
3928 |
|
|
3929 |
|
|
3930 |
|
3981 | 3931 |
<div class="source_cont">
|
3982 | 3932 |
</div>
|
3983 | 3933 |
|
|
3985 | 3935 |
<div class="item">
|
3986 | 3936 |
<p id="netCDF4.Group.keepweakref" class="name">var <span class="ident">keepweakref</span></p>
|
3987 | 3937 |
|
3988 | |
<p class="inheritance">
|
3989 | |
<strong>Inheritance:</strong>
|
3990 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.keepweakref">keepweakref</a></code>
|
3991 | |
</p>
|
3992 | |
|
3993 | |
|
3994 | |
|
3995 | |
<div class="desc inherited"><p>If <code>True</code>, child Dimension and Variables objects only keep weak references to
|
3996 | |
the parent Dataset or Group.</p></div>
|
|
3938 |
|
|
3939 |
|
|
3940 |
|
3997 | 3941 |
<div class="source_cont">
|
3998 | 3942 |
</div>
|
3999 | 3943 |
|
|
4012 | 3956 |
<div class="item">
|
4013 | 3957 |
<p id="netCDF4.Group.parent" class="name">var <span class="ident">parent</span></p>
|
4014 | 3958 |
|
4015 | |
<p class="inheritance">
|
4016 | |
<strong>Inheritance:</strong>
|
4017 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.parent">parent</a></code>
|
4018 | |
</p>
|
4019 | |
|
4020 | |
|
4021 | |
|
4022 | |
<div class="desc inherited"><p><code>parent</code> is a reference to the parent
|
4023 | |
<a href="#netCDF4.Group"><code>Group</code></a> instance. <code>None</code> for the root group or <a href="#netCDF4.Dataset"><code>Dataset</code></a> instance</p></div>
|
|
3959 |
|
|
3960 |
|
|
3961 |
|
4024 | 3962 |
<div class="source_cont">
|
4025 | 3963 |
</div>
|
4026 | 3964 |
|
|
4028 | 3966 |
<div class="item">
|
4029 | 3967 |
<p id="netCDF4.Group.path" class="name">var <span class="ident">path</span></p>
|
4030 | 3968 |
|
4031 | |
<p class="inheritance">
|
4032 | |
<strong>Inheritance:</strong>
|
4033 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.path">path</a></code>
|
4034 | |
</p>
|
4035 | |
|
4036 | |
|
4037 | |
|
4038 | |
<div class="desc inherited"><p><code>path</code> shows the location of the <a href="#netCDF4.Group"><code>Group</code></a> in
|
4039 | |
the <a href="#netCDF4.Dataset"><code>Dataset</code></a> in a unix directory format (the names of groups in the
|
4040 | |
hierarchy separated by backslashes). A <a href="#netCDF4.Dataset"><code>Dataset</code></a> instance is the root
|
4041 | |
group, so the path is simply <code>'/'</code>.</p></div>
|
|
3969 |
|
|
3970 |
|
|
3971 |
|
4042 | 3972 |
<div class="source_cont">
|
4043 | 3973 |
</div>
|
4044 | 3974 |
|
|
4046 | 3976 |
<div class="item">
|
4047 | 3977 |
<p id="netCDF4.Group.variables" class="name">var <span class="ident">variables</span></p>
|
4048 | 3978 |
|
4049 | |
<p class="inheritance">
|
4050 | |
<strong>Inheritance:</strong>
|
4051 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.variables">variables</a></code>
|
4052 | |
</p>
|
4053 | |
|
4054 | |
|
4055 | |
|
4056 | |
<div class="desc inherited"><p>The <code>variables</code> dictionary maps the names of variables
|
4057 | |
defined for this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> to instances of the <a href="#netCDF4.Variable"><code>Variable</code></a>
|
4058 | |
class.</p></div>
|
|
3979 |
|
|
3980 |
|
|
3981 |
|
4059 | 3982 |
<div class="source_cont">
|
4060 | 3983 |
</div>
|
4061 | 3984 |
|
|
4063 | 3986 |
<div class="item">
|
4064 | 3987 |
<p id="netCDF4.Group.vltypes" class="name">var <span class="ident">vltypes</span></p>
|
4065 | 3988 |
|
4066 | |
<p class="inheritance">
|
4067 | |
<strong>Inheritance:</strong>
|
4068 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.vltypes">vltypes</a></code>
|
4069 | |
</p>
|
4070 | |
|
4071 | |
|
4072 | |
|
4073 | |
<div class="desc inherited"><p>The <code>vltypes</code> dictionary maps the names of
|
4074 | |
variable-length types defined for the <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Dataset"><code>Dataset</code></a> to instances of the
|
4075 | |
<a href="#netCDF4.VLType"><code>VLType</code></a> class.</p></div>
|
|
3989 |
|
|
3990 |
|
|
3991 |
|
4076 | 3992 |
<div class="source_cont">
|
4077 | 3993 |
</div>
|
4078 | 3994 |
|
|
4109 | 4025 |
<p>def <span class="ident">close</span>(</p><p>self)</p>
|
4110 | 4026 |
</div>
|
4111 | 4027 |
|
4112 | |
<p class="inheritance">
|
4113 | |
<strong>Inheritance:</strong>
|
4114 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.close">close</a></code>
|
4115 | |
</p>
|
4116 | 4028 |
|
4117 | 4029 |
|
4118 | 4030 |
|
|
4129 | 4041 |
<p>def <span class="ident">createCompoundType</span>(</p><p>self, datatype, datatype_name)</p>
|
4130 | 4042 |
</div>
|
4131 | 4043 |
|
4132 | |
<p class="inheritance">
|
4133 | |
<strong>Inheritance:</strong>
|
4134 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createCompoundType">createCompoundType</a></code>
|
4135 | |
</p>
|
4136 | |
|
4137 | |
|
4138 | |
|
4139 | |
<div class="desc inherited"><p>Creates a new compound data type named <code>datatype_name</code> from the numpy
|
|
4044 |
|
|
4045 |
|
|
4046 |
|
|
4047 |
<div class="desc"><p>Creates a new compound data type named <code>datatype_name</code> from the numpy
|
4140 | 4048 |
dtype object <code>datatype</code>.</p>
|
4141 | 4049 |
<p><strong><em>Note</em></strong>: If the new compound data type contains other compound data types
|
4142 | 4050 |
(i.e. it is a 'nested' compound type, where not all of the elements
|
|
4155 | 4063 |
<p>def <span class="ident">createDimension</span>(</p><p>self, dimname, size=None)</p>
|
4156 | 4064 |
</div>
|
4157 | 4065 |
|
4158 | |
<p class="inheritance">
|
4159 | |
<strong>Inheritance:</strong>
|
4160 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createDimension">createDimension</a></code>
|
4161 | |
</p>
|
4162 | |
|
4163 | |
|
4164 | |
|
4165 | |
<div class="desc inherited"><p>Creates a new dimension with the given <code>dimname</code> and <code>size</code>.</p>
|
|
4066 |
|
|
4067 |
|
|
4068 |
|
|
4069 |
<div class="desc"><p>Creates a new dimension with the given <code>dimname</code> and <code>size</code>.</p>
|
4166 | 4070 |
<p><code>size</code> must be a positive integer or <code>None</code>, which stands for
|
4167 | 4071 |
"unlimited" (default is <code>None</code>). Specifying a size of 0 also
|
4168 | 4072 |
results in an unlimited dimension. The return value is the <a href="#netCDF4.Dimension"><code>Dimension</code></a>
|
|
4181 | 4085 |
<p>def <span class="ident">createEnumType</span>(</p><p>self, datatype, datatype_name, enum_dict)</p>
|
4182 | 4086 |
</div>
|
4183 | 4087 |
|
4184 | |
<p class="inheritance">
|
4185 | |
<strong>Inheritance:</strong>
|
4186 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createEnumType">createEnumType</a></code>
|
4187 | |
</p>
|
4188 | |
|
4189 | |
|
4190 | |
|
4191 | |
<div class="desc inherited"><p>Creates a new Enum data type named <code>datatype_name</code> from a numpy
|
|
4088 |
|
|
4089 |
|
|
4090 |
|
|
4091 |
<div class="desc"><p>Creates a new Enum data type named <code>datatype_name</code> from a numpy
|
4192 | 4092 |
integer dtype object <code>datatype</code>, and a python dictionary
|
4193 | 4093 |
defining the enum fields and values.</p>
|
4194 | 4094 |
<p>The return value is the <a href="#netCDF4.EnumType"><code>EnumType</code></a> class instance describing the new
|
|
4204 | 4104 |
<p>def <span class="ident">createGroup</span>(</p><p>self, groupname)</p>
|
4205 | 4105 |
</div>
|
4206 | 4106 |
|
4207 | |
<p class="inheritance">
|
4208 | |
<strong>Inheritance:</strong>
|
4209 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createGroup">createGroup</a></code>
|
4210 | |
</p>
|
4211 | |
|
4212 | |
|
4213 | |
|
4214 | |
<div class="desc inherited"><p>Creates a new <a href="#netCDF4.Group"><code>Group</code></a> with the given <code>groupname</code>.</p>
|
|
4107 |
|
|
4108 |
|
|
4109 |
|
|
4110 |
<div class="desc"><p>Creates a new <a href="#netCDF4.Group"><code>Group</code></a> with the given <code>groupname</code>.</p>
|
4215 | 4111 |
<p>If <code>groupname</code> is specified as a path, using forward slashes as in unix to
|
4216 | 4112 |
separate components, then intermediate groups will be created as necessary
|
4217 | 4113 |
(analogous to <code>mkdir -p</code> in unix). For example,
|
|
4231 | 4127 |
<p>def <span class="ident">createVLType</span>(</p><p>self, datatype, datatype_name)</p>
|
4232 | 4128 |
</div>
|
4233 | 4129 |
|
4234 | |
<p class="inheritance">
|
4235 | |
<strong>Inheritance:</strong>
|
4236 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createVLType">createVLType</a></code>
|
4237 | |
</p>
|
4238 | |
|
4239 | |
|
4240 | |
|
4241 | |
<div class="desc inherited"><p>Creates a new VLEN data type named <code>datatype_name</code> from a numpy
|
|
4130 |
|
|
4131 |
|
|
4132 |
|
|
4133 |
<div class="desc"><p>Creates a new VLEN data type named <code>datatype_name</code> from a numpy
|
4242 | 4134 |
dtype object <code>datatype</code>.</p>
|
4243 | 4135 |
<p>The return value is the <a href="#netCDF4.VLType"><code>VLType</code></a> class instance describing the new
|
4244 | 4136 |
datatype.</p></div>
|
|
4253 | 4145 |
<p>def <span class="ident">createVariable</span>(</p><p>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)</p>
|
4254 | 4146 |
</div>
|
4255 | 4147 |
|
4256 | |
<p class="inheritance">
|
4257 | |
<strong>Inheritance:</strong>
|
4258 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createVariable">createVariable</a></code>
|
4259 | |
</p>
|
4260 | |
|
4261 | |
|
4262 | |
|
4263 | |
<div class="desc inherited"><p>Creates a new variable with the given <code>varname</code>, <code>datatype</code>, and
|
|
4148 |
|
|
4149 |
|
|
4150 |
|
|
4151 |
<div class="desc"><p>Creates a new variable with the given <code>varname</code>, <code>datatype</code>, and
|
4264 | 4152 |
<code>dimensions</code>. If dimensions are not given, the variable is assumed to be
|
4265 | 4153 |
a scalar.</p>
|
4266 | 4154 |
<p>If <code>varname</code> is specified as a path, using forward slashes as in unix to
|
|
4370 | 4258 |
<p>def <span class="ident">delncattr</span>(</p><p>self,name,value)</p>
|
4371 | 4259 |
</div>
|
4372 | 4260 |
|
4373 | |
<p class="inheritance">
|
4374 | |
<strong>Inheritance:</strong>
|
4375 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.delncattr">delncattr</a></code>
|
4376 | |
</p>
|
4377 | |
|
4378 | |
|
4379 | |
|
4380 | |
<div class="desc inherited"><p>delete a netCDF dataset or group attribute. Use if you need to delete a
|
|
4261 |
|
|
4262 |
|
|
4263 |
|
|
4264 |
<div class="desc"><p>delete a netCDF dataset or group attribute. Use if you need to delete a
|
4381 | 4265 |
netCDF attribute with the same name as one of the reserved python
|
4382 | 4266 |
attributes.</p></div>
|
4383 | 4267 |
<div class="source_cont">
|
|
4391 | 4275 |
<p>def <span class="ident">filepath</span>(</p><p>self,encoding=None)</p>
|
4392 | 4276 |
</div>
|
4393 | 4277 |
|
4394 | |
<p class="inheritance">
|
4395 | |
<strong>Inheritance:</strong>
|
4396 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.filepath">filepath</a></code>
|
4397 | |
</p>
|
4398 | |
|
4399 | |
|
4400 | |
|
4401 | |
<div class="desc inherited"><p>Get the file system path (or the opendap URL) which was used to
|
|
4278 |
|
|
4279 |
|
|
4280 |
|
|
4281 |
<div class="desc"><p>Get the file system path (or the opendap URL) which was used to
|
4402 | 4282 |
open/create the Dataset. Requires netcdf >= 4.1.2. The path
|
4403 | 4283 |
is decoded into a string using <code>sys.getfilesystemencoding()</code> by default, this can be
|
4404 | 4284 |
changed using the <code>encoding</code> kwarg.</p></div>
|
|
4413 | 4293 |
<p>def <span class="ident">get_variables_by_attributes</span>(</p><p>...)</p>
|
4414 | 4294 |
</div>
|
4415 | 4295 |
|
4416 | |
<p class="inheritance">
|
4417 | |
<strong>Inheritance:</strong>
|
4418 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.get_variables_by_attributes">get_variables_by_attributes</a></code>
|
4419 | |
</p>
|
4420 | |
|
4421 | |
|
4422 | |
|
4423 | |
<div class="desc inherited"><p>Returns a list of variables that match specific conditions.</p>
|
|
4296 |
|
|
4297 |
|
|
4298 |
|
|
4299 |
<div class="desc"><p>Returns a list of variables that match specific conditions.</p>
|
4424 | 4300 |
<p>Can pass in key=value parameters and variables are returned that
|
4425 | 4301 |
contain all of the matches. For example,</p>
|
4426 | 4302 |
<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># Get variables with x-axis attribute.</span>
|
|
4452 | 4328 |
<p>def <span class="ident">getncattr</span>(</p><p>self,name)</p>
|
4453 | 4329 |
</div>
|
4454 | 4330 |
|
4455 | |
<p class="inheritance">
|
4456 | |
<strong>Inheritance:</strong>
|
4457 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.getncattr">getncattr</a></code>
|
4458 | |
</p>
|
4459 | |
|
4460 | |
|
4461 | |
|
4462 | |
<div class="desc inherited"><p>retrieve a netCDF dataset or group attribute.
|
|
4331 |
|
|
4332 |
|
|
4333 |
|
|
4334 |
<div class="desc"><p>retrieve a netCDF dataset or group attribute.
|
4463 | 4335 |
Use if you need to get a netCDF attribute with the same
|
4464 | 4336 |
name as one of the reserved python attributes.</p>
|
4465 | 4337 |
<p>option kwarg <code>encoding</code> can be used to specify the
|
|
4475 | 4347 |
<p>def <span class="ident">isopen</span>(</p><p>...)</p>
|
4476 | 4348 |
</div>
|
4477 | 4349 |
|
4478 | |
<p class="inheritance">
|
4479 | |
<strong>Inheritance:</strong>
|
4480 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.isopen">isopen</a></code>
|
4481 | |
</p>
|
4482 | |
|
4483 | |
|
4484 | |
|
4485 | |
<div class="desc inherited"><p>is the Dataset open or closed?</p></div>
|
|
4350 |
|
|
4351 |
|
|
4352 |
|
|
4353 |
<div class="desc"><p>is the Dataset open or closed?</p></div>
|
4486 | 4354 |
<div class="source_cont">
|
4487 | 4355 |
</div>
|
4488 | 4356 |
|
|
4494 | 4362 |
<p>def <span class="ident">ncattrs</span>(</p><p>self)</p>
|
4495 | 4363 |
</div>
|
4496 | 4364 |
|
4497 | |
<p class="inheritance">
|
4498 | |
<strong>Inheritance:</strong>
|
4499 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.ncattrs">ncattrs</a></code>
|
4500 | |
</p>
|
4501 | |
|
4502 | |
|
4503 | |
|
4504 | |
<div class="desc inherited"><p>return netCDF global attribute names for this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> in a list.</p></div>
|
|
4365 |
|
|
4366 |
|
|
4367 |
|
|
4368 |
<div class="desc"><p>return netCDF global attribute names for this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> in a list.</p></div>
|
4505 | 4369 |
<div class="source_cont">
|
4506 | 4370 |
</div>
|
4507 | 4371 |
|
|
4513 | 4377 |
<p>def <span class="ident">renameAttribute</span>(</p><p>self, oldname, newname)</p>
|
4514 | 4378 |
</div>
|
4515 | 4379 |
|
4516 | |
<p class="inheritance">
|
4517 | |
<strong>Inheritance:</strong>
|
4518 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.renameAttribute">renameAttribute</a></code>
|
4519 | |
</p>
|
4520 | |
|
4521 | |
|
4522 | |
|
4523 | |
<div class="desc inherited"><p>rename a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> attribute named <code>oldname</code> to <code>newname</code>.</p></div>
|
|
4380 |
|
|
4381 |
|
|
4382 |
|
|
4383 |
<div class="desc"><p>rename a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> attribute named <code>oldname</code> to <code>newname</code>.</p></div>
|
4524 | 4384 |
<div class="source_cont">
|
4525 | 4385 |
</div>
|
4526 | 4386 |
|
|
4532 | 4392 |
<p>def <span class="ident">renameDimension</span>(</p><p>self, oldname, newname)</p>
|
4533 | 4393 |
</div>
|
4534 | 4394 |
|
4535 | |
<p class="inheritance">
|
4536 | |
<strong>Inheritance:</strong>
|
4537 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.renameDimension">renameDimension</a></code>
|
4538 | |
</p>
|
4539 | |
|
4540 | |
|
4541 | |
|
4542 | |
<div class="desc inherited"><p>rename a <a href="#netCDF4.Dimension"><code>Dimension</code></a> named <code>oldname</code> to <code>newname</code>.</p></div>
|
|
4395 |
|
|
4396 |
|
|
4397 |
|
|
4398 |
<div class="desc"><p>rename a <a href="#netCDF4.Dimension"><code>Dimension</code></a> named <code>oldname</code> to <code>newname</code>.</p></div>
|
4543 | 4399 |
<div class="source_cont">
|
4544 | 4400 |
</div>
|
4545 | 4401 |
|
|
4551 | 4407 |
<p>def <span class="ident">renameGroup</span>(</p><p>self, oldname, newname)</p>
|
4552 | 4408 |
</div>
|
4553 | 4409 |
|
4554 | |
<p class="inheritance">
|
4555 | |
<strong>Inheritance:</strong>
|
4556 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.renameGroup">renameGroup</a></code>
|
4557 | |
</p>
|
4558 | |
|
4559 | |
|
4560 | |
|
4561 | |
<div class="desc inherited"><p>rename a <a href="#netCDF4.Group"><code>Group</code></a> named <code>oldname</code> to <code>newname</code> (requires netcdf >= 4.3.1).</p></div>
|
|
4410 |
|
|
4411 |
|
|
4412 |
|
|
4413 |
<div class="desc"><p>rename a <a href="#netCDF4.Group"><code>Group</code></a> named <code>oldname</code> to <code>newname</code> (requires netcdf >= 4.3.1).</p></div>
|
4562 | 4414 |
<div class="source_cont">
|
4563 | 4415 |
</div>
|
4564 | 4416 |
|
|
4570 | 4422 |
<p>def <span class="ident">renameVariable</span>(</p><p>self, oldname, newname)</p>
|
4571 | 4423 |
</div>
|
4572 | 4424 |
|
4573 | |
<p class="inheritance">
|
4574 | |
<strong>Inheritance:</strong>
|
4575 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.renameVariable">renameVariable</a></code>
|
4576 | |
</p>
|
4577 | |
|
4578 | |
|
4579 | |
|
4580 | |
<div class="desc inherited"><p>rename a <a href="#netCDF4.Variable"><code>Variable</code></a> named <code>oldname</code> to <code>newname</code></p></div>
|
|
4425 |
|
|
4426 |
|
|
4427 |
|
|
4428 |
<div class="desc"><p>rename a <a href="#netCDF4.Variable"><code>Variable</code></a> named <code>oldname</code> to <code>newname</code></p></div>
|
4581 | 4429 |
<div class="source_cont">
|
4582 | 4430 |
</div>
|
4583 | 4431 |
|
|
4589 | 4437 |
<p>def <span class="ident">set_always_mask</span>(</p><p>self, True_or_False)</p>
|
4590 | 4438 |
</div>
|
4591 | 4439 |
|
4592 | |
<p class="inheritance">
|
4593 | |
<strong>Inheritance:</strong>
|
4594 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_always_mask">set_always_mask</a></code>
|
4595 | |
</p>
|
4596 | |
|
4597 | |
|
4598 | |
|
4599 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_always_mask"><code>set_always_mask</code></a> for all variables contained in
|
|
4440 |
|
|
4441 |
|
|
4442 |
|
|
4443 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_always_mask"><code>set_always_mask</code></a> for all variables contained in
|
4600 | 4444 |
this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a>, as well as for all
|
4601 | 4445 |
variables in all its subgroups.</p>
|
4602 | 4446 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion of
|
|
4616 | 4460 |
<p>def <span class="ident">set_auto_chartostring</span>(</p><p>self, True_or_False)</p>
|
4617 | 4461 |
</div>
|
4618 | 4462 |
|
4619 | |
<p class="inheritance">
|
4620 | |
<strong>Inheritance:</strong>
|
4621 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_chartostring">set_auto_chartostring</a></code>
|
4622 | |
</p>
|
4623 | |
|
4624 | |
|
4625 | |
|
4626 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_chartostring"><code>set_auto_chartostring</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
|
4463 |
|
|
4464 |
|
|
4465 |
|
|
4466 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_auto_chartostring"><code>set_auto_chartostring</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
4627 | 4467 |
<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
|
4628 | 4468 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion of
|
4629 | 4469 |
all character arrays <--> string arrays should be performed for
|
|
4642 | 4482 |
<p>def <span class="ident">set_auto_mask</span>(</p><p>self, True_or_False)</p>
|
4643 | 4483 |
</div>
|
4644 | 4484 |
|
4645 | |
<p class="inheritance">
|
4646 | |
<strong>Inheritance:</strong>
|
4647 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_mask">set_auto_mask</a></code>
|
4648 | |
</p>
|
4649 | |
|
4650 | |
|
4651 | |
|
4652 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_mask"><code>set_auto_mask</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
|
4485 |
|
|
4486 |
|
|
4487 |
|
|
4488 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_auto_mask"><code>set_auto_mask</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
4653 | 4489 |
<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
|
4654 | 4490 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion to masked arrays
|
4655 | 4491 |
shall be applied for all variables.</p>
|
|
4666 | 4502 |
<p>def <span class="ident">set_auto_maskandscale</span>(</p><p>self, True_or_False)</p>
|
4667 | 4503 |
</div>
|
4668 | 4504 |
|
4669 | |
<p class="inheritance">
|
4670 | |
<strong>Inheritance:</strong>
|
4671 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_maskandscale">set_auto_maskandscale</a></code>
|
4672 | |
</p>
|
4673 | |
|
4674 | |
|
4675 | |
|
4676 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_maskandscale"><code>set_auto_maskandscale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
|
4505 |
|
|
4506 |
|
|
4507 |
|
|
4508 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_auto_maskandscale"><code>set_auto_maskandscale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
4677 | 4509 |
<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
|
4678 | 4510 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion to masked arrays
|
4679 | 4511 |
and variable scaling shall be applied for all variables.</p>
|
|
4690 | 4522 |
<p>def <span class="ident">set_auto_scale</span>(</p><p>self, True_or_False)</p>
|
4691 | 4523 |
</div>
|
4692 | 4524 |
|
4693 | |
<p class="inheritance">
|
4694 | |
<strong>Inheritance:</strong>
|
4695 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_scale">set_auto_scale</a></code>
|
4696 | |
</p>
|
4697 | |
|
4698 | |
|
4699 | |
|
4700 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_scale"><code>set_auto_scale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
|
4525 |
|
|
4526 |
|
|
4527 |
|
|
4528 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_auto_scale"><code>set_auto_scale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
4701 | 4529 |
<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
|
4702 | 4530 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic variable scaling
|
4703 | 4531 |
shall be applied for all variables.</p>
|
|
4714 | 4542 |
<p>def <span class="ident">set_fill_off</span>(</p><p>self)</p>
|
4715 | 4543 |
</div>
|
4716 | 4544 |
|
4717 | |
<p class="inheritance">
|
4718 | |
<strong>Inheritance:</strong>
|
4719 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_fill_off">set_fill_off</a></code>
|
4720 | |
</p>
|
4721 | |
|
4722 | |
|
4723 | |
|
4724 | |
<div class="desc inherited"><p>Sets the fill mode for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> open for writing to <code>off</code>.</p>
|
|
4545 |
|
|
4546 |
|
|
4547 |
|
|
4548 |
<div class="desc"><p>Sets the fill mode for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> open for writing to <code>off</code>.</p>
|
4725 | 4549 |
<p>This will prevent the data from being pre-filled with fill values, which
|
4726 | 4550 |
may result in some performance improvements. However, you must then make
|
4727 | 4551 |
sure the data is actually written before being read.</p></div>
|
|
4736 | 4560 |
<p>def <span class="ident">set_fill_on</span>(</p><p>self)</p>
|
4737 | 4561 |
</div>
|
4738 | 4562 |
|
4739 | |
<p class="inheritance">
|
4740 | |
<strong>Inheritance:</strong>
|
4741 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_fill_on">set_fill_on</a></code>
|
4742 | |
</p>
|
4743 | |
|
4744 | |
|
4745 | |
|
4746 | |
<div class="desc inherited"><p>Sets the fill mode for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> open for writing to <code>on</code>.</p>
|
|
4563 |
|
|
4564 |
|
|
4565 |
|
|
4566 |
<div class="desc"><p>Sets the fill mode for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> open for writing to <code>on</code>.</p>
|
4747 | 4567 |
<p>This causes data to be pre-filled with fill values. The fill values can be
|
4748 | 4568 |
controlled by the variable's <code>_Fill_Value</code> attribute, but is usually
|
4749 | 4569 |
sufficient to the use the netCDF default <code>_Fill_Value</code> (defined
|
|
4762 | 4582 |
<p>def <span class="ident">set_ncstring_attrs</span>(</p><p>self, True_or_False)</p>
|
4763 | 4583 |
</div>
|
4764 | 4584 |
|
4765 | |
<p class="inheritance">
|
4766 | |
<strong>Inheritance:</strong>
|
4767 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_ncstring_attrs">set_ncstring_attrs</a></code>
|
4768 | |
</p>
|
4769 | |
|
4770 | |
|
4771 | |
|
4772 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_ncstring_attrs"><code>set_ncstring_attrs</code></a> for all variables contained in
|
|
4585 |
|
|
4586 |
|
|
4587 |
|
|
4588 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_ncstring_attrs"><code>set_ncstring_attrs</code></a> for all variables contained in
|
4773 | 4589 |
this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a>, as well as for all its
|
4774 | 4590 |
subgroups and their variables.</p>
|
4775 | 4591 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if all string attributes are
|
|
4788 | 4604 |
<p>def <span class="ident">setncattr</span>(</p><p>self,name,value)</p>
|
4789 | 4605 |
</div>
|
4790 | 4606 |
|
4791 | |
<p class="inheritance">
|
4792 | |
<strong>Inheritance:</strong>
|
4793 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.setncattr">setncattr</a></code>
|
4794 | |
</p>
|
4795 | |
|
4796 | |
|
4797 | |
|
4798 | |
<div class="desc inherited"><p>set a netCDF dataset or group attribute using name,value pair.
|
|
4607 |
|
|
4608 |
|
|
4609 |
|
|
4610 |
<div class="desc"><p>set a netCDF dataset or group attribute using name,value pair.
|
4799 | 4611 |
Use if you need to set a netCDF attribute with the
|
4800 | 4612 |
with the same name as one of the reserved python attributes.</p></div>
|
4801 | 4613 |
<div class="source_cont">
|
|
4809 | 4621 |
<p>def <span class="ident">setncattr_string</span>(</p><p>self,name,value)</p>
|
4810 | 4622 |
</div>
|
4811 | 4623 |
|
4812 | |
<p class="inheritance">
|
4813 | |
<strong>Inheritance:</strong>
|
4814 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.setncattr_string">setncattr_string</a></code>
|
4815 | |
</p>
|
4816 | |
|
4817 | |
|
4818 | |
|
4819 | |
<div class="desc inherited"><p>set a netCDF dataset or group string attribute using name,value pair.
|
|
4624 |
|
|
4625 |
|
|
4626 |
|
|
4627 |
<div class="desc"><p>set a netCDF dataset or group string attribute using name,value pair.
|
4820 | 4628 |
Use if you need to ensure that a netCDF attribute is created with type
|
4821 | 4629 |
<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.</p></div>
|
4822 | 4630 |
<div class="source_cont">
|
|
4830 | 4638 |
<p>def <span class="ident">setncatts</span>(</p><p>self,attdict)</p>
|
4831 | 4639 |
</div>
|
4832 | 4640 |
|
4833 | |
<p class="inheritance">
|
4834 | |
<strong>Inheritance:</strong>
|
4835 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.setncatts">setncatts</a></code>
|
4836 | |
</p>
|
4837 | |
|
4838 | |
|
4839 | |
|
4840 | |
<div class="desc inherited"><p>set a bunch of netCDF dataset or group attributes at once using a python dictionary.
|
|
4641 |
|
|
4642 |
|
|
4643 |
|
|
4644 |
<div class="desc"><p>set a bunch of netCDF dataset or group attributes at once using a python dictionary.
|
4841 | 4645 |
This may be faster when setting a lot of attributes for a <code>NETCDF3</code>
|
4842 | 4646 |
formatted file, since nc_redef/nc_enddef is not called in between setting
|
4843 | 4647 |
each attribute</p></div>
|
|
4852 | 4656 |
<p>def <span class="ident">sync</span>(</p><p>self)</p>
|
4853 | 4657 |
</div>
|
4854 | 4658 |
|
4855 | |
<p class="inheritance">
|
4856 | |
<strong>Inheritance:</strong>
|
4857 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.sync">sync</a></code>
|
4858 | |
</p>
|
4859 | |
|
4860 | |
|
4861 | |
|
4862 | |
<div class="desc inherited"><p>Writes all buffered data in the <a href="#netCDF4.Dataset"><code>Dataset</code></a> to the disk file.</p></div>
|
|
4659 |
|
|
4660 |
|
|
4661 |
|
|
4662 |
<div class="desc"><p>Writes all buffered data in the <a href="#netCDF4.Dataset"><code>Dataset</code></a> to the disk file.</p></div>
|
4863 | 4663 |
<div class="source_cont">
|
4864 | 4664 |
</div>
|
4865 | 4665 |
|
|
4904 | 4704 |
<ul class="class_list">
|
4905 | 4705 |
<li><a href="#netCDF4.MFDataset">MFDataset</a></li>
|
4906 | 4706 |
<li><a href="#netCDF4.Dataset">Dataset</a></li>
|
4907 | |
<li>__builtin__.object</li>
|
|
4707 |
<li>builtins.object</li>
|
4908 | 4708 |
</ul>
|
4909 | 4709 |
<h3>Class variables</h3>
|
4910 | 4710 |
<div class="item">
|
4911 | 4711 |
<p id="netCDF4.MFDataset.cmptypes" class="name">var <span class="ident">cmptypes</span></p>
|
4912 | 4712 |
|
4913 | |
<p class="inheritance">
|
4914 | |
<strong>Inheritance:</strong>
|
4915 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.cmptypes">cmptypes</a></code>
|
4916 | |
</p>
|
4917 | |
|
4918 | |
|
4919 | |
|
4920 | |
<div class="desc inherited"><p>The <code>cmptypes</code> dictionary maps the names of
|
4921 | |
compound types defined for the <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Dataset"><code>Dataset</code></a> to instances of the
|
4922 | |
<a href="#netCDF4.CompoundType"><code>CompoundType</code></a> class.</p></div>
|
|
4713 |
|
|
4714 |
|
|
4715 |
|
4923 | 4716 |
<div class="source_cont">
|
4924 | 4717 |
</div>
|
4925 | 4718 |
|
|
4927 | 4720 |
<div class="item">
|
4928 | 4721 |
<p id="netCDF4.MFDataset.data_model" class="name">var <span class="ident">data_model</span></p>
|
4929 | 4722 |
|
4930 | |
<p class="inheritance">
|
4931 | |
<strong>Inheritance:</strong>
|
4932 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.data_model">data_model</a></code>
|
4933 | |
</p>
|
4934 | |
|
4935 | |
|
4936 | |
|
4937 | |
<div class="desc inherited"><p><code>data_model</code> describes the netCDF
|
4938 | |
data model version, one of <code>NETCDF3_CLASSIC</code>, <code>NETCDF4</code>,
|
4939 | |
<code>NETCDF4_CLASSIC</code>, <code>NETCDF3_64BIT_OFFSET</code> or <code>NETCDF3_64BIT_DATA</code>.</p></div>
|
|
4723 |
|
|
4724 |
|
|
4725 |
|
4940 | 4726 |
<div class="source_cont">
|
4941 | 4727 |
</div>
|
4942 | 4728 |
|
|
4944 | 4730 |
<div class="item">
|
4945 | 4731 |
<p id="netCDF4.MFDataset.dimensions" class="name">var <span class="ident">dimensions</span></p>
|
4946 | 4732 |
|
4947 | |
<p class="inheritance">
|
4948 | |
<strong>Inheritance:</strong>
|
4949 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.dimensions">dimensions</a></code>
|
4950 | |
</p>
|
4951 | |
|
4952 | |
|
4953 | |
|
4954 | |
<div class="desc inherited"><p>The <code>dimensions</code> dictionary maps the names of
|
4955 | |
dimensions defined for the <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Dataset"><code>Dataset</code></a> to instances of the
|
4956 | |
<a href="#netCDF4.Dimension"><code>Dimension</code></a> class.</p></div>
|
|
4733 |
|
|
4734 |
|
|
4735 |
|
4957 | 4736 |
<div class="source_cont">
|
4958 | 4737 |
</div>
|
4959 | 4738 |
|
|
4961 | 4740 |
<div class="item">
|
4962 | 4741 |
<p id="netCDF4.MFDataset.disk_format" class="name">var <span class="ident">disk_format</span></p>
|
4963 | 4742 |
|
4964 | |
<p class="inheritance">
|
4965 | |
<strong>Inheritance:</strong>
|
4966 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.disk_format">disk_format</a></code>
|
4967 | |
</p>
|
4968 | |
|
4969 | |
|
4970 | |
|
4971 | |
<div class="desc inherited"><p><code>disk_format</code> describes the underlying
|
4972 | |
file format, one of <code>NETCDF3</code>, <code>HDF5</code>, <code>HDF4</code>,
|
4973 | |
<code>PNETCDF</code>, <code>DAP2</code>, <code>DAP4</code> or <code>UNDEFINED</code>. Only available if using
|
4974 | |
netcdf C library version >= 4.3.1, otherwise will always return
|
4975 | |
<code>UNDEFINED</code>.</p></div>
|
|
4743 |
|
|
4744 |
|
|
4745 |
|
4976 | 4746 |
<div class="source_cont">
|
4977 | 4747 |
</div>
|
4978 | 4748 |
|
|
4980 | 4750 |
<div class="item">
|
4981 | 4751 |
<p id="netCDF4.MFDataset.enumtypes" class="name">var <span class="ident">enumtypes</span></p>
|
4982 | 4752 |
|
4983 | |
<p class="inheritance">
|
4984 | |
<strong>Inheritance:</strong>
|
4985 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.enumtypes">enumtypes</a></code>
|
4986 | |
</p>
|
4987 | |
|
4988 | |
|
4989 | |
|
4990 | |
<div class="desc inherited"><p>The <code>enumtypes</code> dictionary maps the names of
|
4991 | |
Enum types defined for the <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Dataset"><code>Dataset</code></a> to instances of the
|
4992 | |
<a href="#netCDF4.EnumType"><code>EnumType</code></a> class.</p></div>
|
|
4753 |
|
|
4754 |
|
|
4755 |
|
4993 | 4756 |
<div class="source_cont">
|
4994 | 4757 |
</div>
|
4995 | 4758 |
|
|
4997 | 4760 |
<div class="item">
|
4998 | 4761 |
<p id="netCDF4.MFDataset.file_format" class="name">var <span class="ident">file_format</span></p>
|
4999 | 4762 |
|
5000 | |
<p class="inheritance">
|
5001 | |
<strong>Inheritance:</strong>
|
5002 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.file_format">file_format</a></code>
|
5003 | |
</p>
|
5004 | |
|
5005 | |
|
5006 | |
|
5007 | |
<div class="desc inherited"><p>same as <code>data_model</code>, retained for backwards compatibility.</p></div>
|
|
4763 |
|
|
4764 |
|
|
4765 |
|
5008 | 4766 |
<div class="source_cont">
|
5009 | 4767 |
</div>
|
5010 | 4768 |
|
|
5012 | 4770 |
<div class="item">
|
5013 | 4771 |
<p id="netCDF4.MFDataset.groups" class="name">var <span class="ident">groups</span></p>
|
5014 | 4772 |
|
5015 | |
<p class="inheritance">
|
5016 | |
<strong>Inheritance:</strong>
|
5017 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.groups">groups</a></code>
|
5018 | |
</p>
|
5019 | |
|
5020 | |
|
5021 | |
|
5022 | |
<div class="desc inherited"><p>The groups dictionary maps the names of groups created for
|
5023 | |
this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> to instances of the <a href="#netCDF4.Group"><code>Group</code></a> class (the
|
5024 | |
<a href="#netCDF4.Dataset"><code>Dataset</code></a> class is simply a special case of the <a href="#netCDF4.Group"><code>Group</code></a> class which
|
5025 | |
describes the root group in the netCDF4 file).</p></div>
|
|
4773 |
|
|
4774 |
|
|
4775 |
|
5026 | 4776 |
<div class="source_cont">
|
5027 | 4777 |
</div>
|
5028 | 4778 |
|
|
5030 | 4780 |
<div class="item">
|
5031 | 4781 |
<p id="netCDF4.MFDataset.keepweakref" class="name">var <span class="ident">keepweakref</span></p>
|
5032 | 4782 |
|
5033 | |
<p class="inheritance">
|
5034 | |
<strong>Inheritance:</strong>
|
5035 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.keepweakref">keepweakref</a></code>
|
5036 | |
</p>
|
5037 | |
|
5038 | |
|
5039 | |
|
5040 | |
<div class="desc inherited"><p>If <code>True</code>, child Dimension and Variables objects only keep weak references to
|
5041 | |
the parent Dataset or Group.</p></div>
|
|
4783 |
|
|
4784 |
|
|
4785 |
|
5042 | 4786 |
<div class="source_cont">
|
5043 | 4787 |
</div>
|
5044 | 4788 |
|
|
5046 | 4790 |
<div class="item">
|
5047 | 4791 |
<p id="netCDF4.MFDataset.parent" class="name">var <span class="ident">parent</span></p>
|
5048 | 4792 |
|
5049 | |
<p class="inheritance">
|
5050 | |
<strong>Inheritance:</strong>
|
5051 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.parent">parent</a></code>
|
5052 | |
</p>
|
5053 | |
|
5054 | |
|
5055 | |
|
5056 | |
<div class="desc inherited"><p><code>parent</code> is a reference to the parent
|
5057 | |
<a href="#netCDF4.Group"><code>Group</code></a> instance. <code>None</code> for the root group or <a href="#netCDF4.Dataset"><code>Dataset</code></a> instance</p></div>
|
|
4793 |
|
|
4794 |
|
|
4795 |
|
5058 | 4796 |
<div class="source_cont">
|
5059 | 4797 |
</div>
|
5060 | 4798 |
|
|
5062 | 4800 |
<div class="item">
|
5063 | 4801 |
<p id="netCDF4.MFDataset.path" class="name">var <span class="ident">path</span></p>
|
5064 | 4802 |
|
5065 | |
<p class="inheritance">
|
5066 | |
<strong>Inheritance:</strong>
|
5067 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.path">path</a></code>
|
5068 | |
</p>
|
5069 | |
|
5070 | |
|
5071 | |
|
5072 | |
<div class="desc inherited"><p><code>path</code> shows the location of the <a href="#netCDF4.Group"><code>Group</code></a> in
|
5073 | |
the <a href="#netCDF4.Dataset"><code>Dataset</code></a> in a unix directory format (the names of groups in the
|
5074 | |
hierarchy separated by backslashes). A <a href="#netCDF4.Dataset"><code>Dataset</code></a> instance is the root
|
5075 | |
group, so the path is simply <code>'/'</code>.</p></div>
|
|
4803 |
|
|
4804 |
|
|
4805 |
|
5076 | 4806 |
<div class="source_cont">
|
5077 | 4807 |
</div>
|
5078 | 4808 |
|
|
5080 | 4810 |
<div class="item">
|
5081 | 4811 |
<p id="netCDF4.MFDataset.variables" class="name">var <span class="ident">variables</span></p>
|
5082 | 4812 |
|
5083 | |
<p class="inheritance">
|
5084 | |
<strong>Inheritance:</strong>
|
5085 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.variables">variables</a></code>
|
5086 | |
</p>
|
5087 | |
|
5088 | |
|
5089 | |
|
5090 | |
<div class="desc inherited"><p>The <code>variables</code> dictionary maps the names of variables
|
5091 | |
defined for this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> to instances of the <a href="#netCDF4.Variable"><code>Variable</code></a>
|
5092 | |
class.</p></div>
|
|
4813 |
|
|
4814 |
|
|
4815 |
|
5093 | 4816 |
<div class="source_cont">
|
5094 | 4817 |
</div>
|
5095 | 4818 |
|
|
5097 | 4820 |
<div class="item">
|
5098 | 4821 |
<p id="netCDF4.MFDataset.vltypes" class="name">var <span class="ident">vltypes</span></p>
|
5099 | 4822 |
|
|
4823 |
|
|
4824 |
|
|
4825 |
|
|
4826 |
<div class="source_cont">
|
|
4827 |
</div>
|
|
4828 |
|
|
4829 |
</div>
|
|
4830 |
<h3>Static methods</h3>
|
|
4831 |
|
|
4832 |
<div class="item">
|
|
4833 |
<div class="name def" id="netCDF4.MFDataset.__init__">
|
|
4834 |
<p>def <span class="ident">__init__</span>(</p><p>self, files, check=False, aggdim=None, exclude=[], master_file=None)</p>
|
|
4835 |
</div>
|
|
4836 |
|
5100 | 4837 |
<p class="inheritance">
|
5101 | 4838 |
<strong>Inheritance:</strong>
|
5102 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.vltypes">vltypes</a></code>
|
|
4839 |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.__init__">__init__</a></code>
|
5103 | 4840 |
</p>
|
5104 | 4841 |
|
5105 | |
|
5106 | |
|
5107 | |
<div class="desc inherited"><p>The <code>vltypes</code> dictionary maps the names of
|
5108 | |
variable-length types defined for the <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Dataset"><code>Dataset</code></a> to instances of the
|
5109 | |
<a href="#netCDF4.VLType"><code>VLType</code></a> class.</p></div>
|
5110 | |
<div class="source_cont">
|
5111 | |
</div>
|
5112 | |
|
5113 | |
</div>
|
5114 | |
<h3>Static methods</h3>
|
|
4842 |
|
|
4843 |
|
|
4844 |
<div class="desc"><p><strong><code>__init__(self, files, check=False, aggdim=None, exclude=[],
|
|
4845 |
master_file=None)</code></strong></p>
|
|
4846 |
<p>Open a Dataset spanning multiple files, making it look as if it was a
|
|
4847 |
single file. Variables in the list of files that share the same
|
|
4848 |
dimension (specified with the keyword <code>aggdim</code>) are aggregated. If
|
|
4849 |
<code>aggdim</code> is not specified, the unlimited is aggregated. Currently,
|
|
4850 |
<code>aggdim</code> must be the leftmost (slowest varying) dimension of each
|
|
4851 |
of the variables to be aggregated.</p>
|
|
4852 |
<p><strong><code>files</code></strong>: either a sequence of netCDF files or a string with a
|
|
4853 |
wildcard (converted to a sorted list of files using glob) If
|
|
4854 |
the <code>master_file</code> kwarg is not specified, the first file
|
|
4855 |
in the list will become the "master" file, defining all the
|
|
4856 |
variables with an aggregation dimension which may span
|
|
4857 |
subsequent files. Attribute access returns attributes only from "master"
|
|
4858 |
file. The files are always opened in read-only mode.</p>
|
|
4859 |
<p><strong><code>check</code></strong>: True if you want to do consistency checking to ensure the
|
|
4860 |
correct variables structure for all of the netcdf files. Checking makes
|
|
4861 |
the initialization of the MFDataset instance much slower. Default is
|
|
4862 |
False.</p>
|
|
4863 |
<p><strong><code>aggdim</code></strong>: The name of the dimension to aggregate over (must
|
|
4864 |
be the leftmost dimension of each of the variables to be aggregated).
|
|
4865 |
If None (default), aggregate over the unlimited dimension.</p>
|
|
4866 |
<p><strong><code>exclude</code></strong>: A list of variable names to exclude from aggregation.
|
|
4867 |
Default is an empty list.</p>
|
|
4868 |
<p><strong><code>master_file</code></strong>: file to use as "master file", defining all the
|
|
4869 |
variables with an aggregation dimension and all global attributes.</p></div>
|
|
4870 |
<div class="source_cont">
|
|
4871 |
</div>
|
|
4872 |
|
|
4873 |
</div>
|
|
4874 |
|
|
4875 |
|
|
4876 |
<div class="item">
|
|
4877 |
<div class="name def" id="netCDF4.MFDataset.close">
|
|
4878 |
<p>def <span class="ident">close</span>(</p><p>self)</p>
|
|
4879 |
</div>
|
|
4880 |
|
|
4881 |
|
|
4882 |
|
|
4883 |
|
|
4884 |
<div class="desc"><p><strong><code>close(self)</code></strong></p>
|
|
4885 |
<p>close all the open files.</p></div>
|
|
4886 |
<div class="source_cont">
|
|
4887 |
</div>
|
|
4888 |
|
|
4889 |
</div>
|
|
4890 |
|
5115 | 4891 |
|
5116 | 4892 |
<div class="item">
|
5117 | 4893 |
<div class="name def" id="netCDF4.MFDataset.createCompoundType">
|
5118 | 4894 |
<p>def <span class="ident">createCompoundType</span>(</p><p>self, datatype, datatype_name)</p>
|
5119 | 4895 |
</div>
|
5120 | 4896 |
|
5121 | |
<p class="inheritance">
|
5122 | |
<strong>Inheritance:</strong>
|
5123 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createCompoundType">createCompoundType</a></code>
|
5124 | |
</p>
|
5125 | |
|
5126 | |
|
5127 | |
|
5128 | |
<div class="desc inherited"><p>Creates a new compound data type named <code>datatype_name</code> from the numpy
|
|
4897 |
|
|
4898 |
|
|
4899 |
|
|
4900 |
<div class="desc"><p>Creates a new compound data type named <code>datatype_name</code> from the numpy
|
5129 | 4901 |
dtype object <code>datatype</code>.</p>
|
5130 | 4902 |
<p><strong><em>Note</em></strong>: If the new compound data type contains other compound data types
|
5131 | 4903 |
(i.e. it is a 'nested' compound type, where not all of the elements
|
|
5144 | 4916 |
<p>def <span class="ident">createDimension</span>(</p><p>self, dimname, size=None)</p>
|
5145 | 4917 |
</div>
|
5146 | 4918 |
|
5147 | |
<p class="inheritance">
|
5148 | |
<strong>Inheritance:</strong>
|
5149 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createDimension">createDimension</a></code>
|
5150 | |
</p>
|
5151 | |
|
5152 | |
|
5153 | |
|
5154 | |
<div class="desc inherited"><p>Creates a new dimension with the given <code>dimname</code> and <code>size</code>.</p>
|
|
4919 |
|
|
4920 |
|
|
4921 |
|
|
4922 |
<div class="desc"><p>Creates a new dimension with the given <code>dimname</code> and <code>size</code>.</p>
|
5155 | 4923 |
<p><code>size</code> must be a positive integer or <code>None</code>, which stands for
|
5156 | 4924 |
"unlimited" (default is <code>None</code>). Specifying a size of 0 also
|
5157 | 4925 |
results in an unlimited dimension. The return value is the <a href="#netCDF4.Dimension"><code>Dimension</code></a>
|
|
5170 | 4938 |
<p>def <span class="ident">createEnumType</span>(</p><p>self, datatype, datatype_name, enum_dict)</p>
|
5171 | 4939 |
</div>
|
5172 | 4940 |
|
5173 | |
<p class="inheritance">
|
5174 | |
<strong>Inheritance:</strong>
|
5175 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createEnumType">createEnumType</a></code>
|
5176 | |
</p>
|
5177 | |
|
5178 | |
|
5179 | |
|
5180 | |
<div class="desc inherited"><p>Creates a new Enum data type named <code>datatype_name</code> from a numpy
|
|
4941 |
|
|
4942 |
|
|
4943 |
|
|
4944 |
<div class="desc"><p>Creates a new Enum data type named <code>datatype_name</code> from a numpy
|
5181 | 4945 |
integer dtype object <code>datatype</code>, and a python dictionary
|
5182 | 4946 |
defining the enum fields and values.</p>
|
5183 | 4947 |
<p>The return value is the <a href="#netCDF4.EnumType"><code>EnumType</code></a> class instance describing the new
|
|
5193 | 4957 |
<p>def <span class="ident">createGroup</span>(</p><p>self, groupname)</p>
|
5194 | 4958 |
</div>
|
5195 | 4959 |
|
5196 | |
<p class="inheritance">
|
5197 | |
<strong>Inheritance:</strong>
|
5198 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createGroup">createGroup</a></code>
|
5199 | |
</p>
|
5200 | |
|
5201 | |
|
5202 | |
|
5203 | |
<div class="desc inherited"><p>Creates a new <a href="#netCDF4.Group"><code>Group</code></a> with the given <code>groupname</code>.</p>
|
|
4960 |
|
|
4961 |
|
|
4962 |
|
|
4963 |
<div class="desc"><p>Creates a new <a href="#netCDF4.Group"><code>Group</code></a> with the given <code>groupname</code>.</p>
|
5204 | 4964 |
<p>If <code>groupname</code> is specified as a path, using forward slashes as in unix to
|
5205 | 4965 |
separate components, then intermediate groups will be created as necessary
|
5206 | 4966 |
(analogous to <code>mkdir -p</code> in unix). For example,
|
|
5220 | 4980 |
<p>def <span class="ident">createVLType</span>(</p><p>self, datatype, datatype_name)</p>
|
5221 | 4981 |
</div>
|
5222 | 4982 |
|
5223 | |
<p class="inheritance">
|
5224 | |
<strong>Inheritance:</strong>
|
5225 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createVLType">createVLType</a></code>
|
5226 | |
</p>
|
5227 | |
|
5228 | |
|
5229 | |
|
5230 | |
<div class="desc inherited"><p>Creates a new VLEN data type named <code>datatype_name</code> from a numpy
|
|
4983 |
|
|
4984 |
|
|
4985 |
|
|
4986 |
<div class="desc"><p>Creates a new VLEN data type named <code>datatype_name</code> from a numpy
|
5231 | 4987 |
dtype object <code>datatype</code>.</p>
|
5232 | 4988 |
<p>The return value is the <a href="#netCDF4.VLType"><code>VLType</code></a> class instance describing the new
|
5233 | 4989 |
datatype.</p></div>
|
|
5242 | 4998 |
<p>def <span class="ident">createVariable</span>(</p><p>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)</p>
|
5243 | 4999 |
</div>
|
5244 | 5000 |
|
5245 | |
<p class="inheritance">
|
5246 | |
<strong>Inheritance:</strong>
|
5247 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.createVariable">createVariable</a></code>
|
5248 | |
</p>
|
5249 | |
|
5250 | |
|
5251 | |
|
5252 | |
<div class="desc inherited"><p>Creates a new variable with the given <code>varname</code>, <code>datatype</code>, and
|
|
5001 |
|
|
5002 |
|
|
5003 |
|
|
5004 |
<div class="desc"><p>Creates a new variable with the given <code>varname</code>, <code>datatype</code>, and
|
5253 | 5005 |
<code>dimensions</code>. If dimensions are not given, the variable is assumed to be
|
5254 | 5006 |
a scalar.</p>
|
5255 | 5007 |
<p>If <code>varname</code> is specified as a path, using forward slashes as in unix to
|
|
5359 | 5111 |
<p>def <span class="ident">delncattr</span>(</p><p>self,name,value)</p>
|
5360 | 5112 |
</div>
|
5361 | 5113 |
|
5362 | |
<p class="inheritance">
|
5363 | |
<strong>Inheritance:</strong>
|
5364 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.delncattr">delncattr</a></code>
|
5365 | |
</p>
|
5366 | |
|
5367 | |
|
5368 | |
|
5369 | |
<div class="desc inherited"><p>delete a netCDF dataset or group attribute. Use if you need to delete a
|
|
5114 |
|
|
5115 |
|
|
5116 |
|
|
5117 |
<div class="desc"><p>delete a netCDF dataset or group attribute. Use if you need to delete a
|
5370 | 5118 |
netCDF attribute with the same name as one of the reserved python
|
5371 | 5119 |
attributes.</p></div>
|
5372 | 5120 |
<div class="source_cont">
|
|
5380 | 5128 |
<p>def <span class="ident">filepath</span>(</p><p>self,encoding=None)</p>
|
5381 | 5129 |
</div>
|
5382 | 5130 |
|
5383 | |
<p class="inheritance">
|
5384 | |
<strong>Inheritance:</strong>
|
5385 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.filepath">filepath</a></code>
|
5386 | |
</p>
|
5387 | |
|
5388 | |
|
5389 | |
|
5390 | |
<div class="desc inherited"><p>Get the file system path (or the opendap URL) which was used to
|
|
5131 |
|
|
5132 |
|
|
5133 |
|
|
5134 |
<div class="desc"><p>Get the file system path (or the opendap URL) which was used to
|
5391 | 5135 |
open/create the Dataset. Requires netcdf >= 4.1.2. The path
|
5392 | 5136 |
is decoded into a string using <code>sys.getfilesystemencoding()</code> by default, this can be
|
5393 | 5137 |
changed using the <code>encoding</code> kwarg.</p></div>
|
|
5402 | 5146 |
<p>def <span class="ident">get_variables_by_attributes</span>(</p><p>...)</p>
|
5403 | 5147 |
</div>
|
5404 | 5148 |
|
5405 | |
<p class="inheritance">
|
5406 | |
<strong>Inheritance:</strong>
|
5407 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.get_variables_by_attributes">get_variables_by_attributes</a></code>
|
5408 | |
</p>
|
5409 | |
|
5410 | |
|
5411 | |
|
5412 | |
<div class="desc inherited"><p>Returns a list of variables that match specific conditions.</p>
|
|
5149 |
|
|
5150 |
|
|
5151 |
|
|
5152 |
<div class="desc"><p>Returns a list of variables that match specific conditions.</p>
|
5413 | 5153 |
<p>Can pass in key=value parameters and variables are returned that
|
5414 | 5154 |
contain all of the matches. For example,</p>
|
5415 | 5155 |
<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># Get variables with x-axis attribute.</span>
|
|
5441 | 5181 |
<p>def <span class="ident">getncattr</span>(</p><p>self,name)</p>
|
5442 | 5182 |
</div>
|
5443 | 5183 |
|
5444 | |
<p class="inheritance">
|
5445 | |
<strong>Inheritance:</strong>
|
5446 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.getncattr">getncattr</a></code>
|
5447 | |
</p>
|
5448 | |
|
5449 | |
|
5450 | |
|
5451 | |
<div class="desc inherited"><p>retrieve a netCDF dataset or group attribute.
|
|
5184 |
|
|
5185 |
|
|
5186 |
|
|
5187 |
<div class="desc"><p>retrieve a netCDF dataset or group attribute.
|
5452 | 5188 |
Use if you need to get a netCDF attribute with the same
|
5453 | 5189 |
name as one of the reserved python attributes.</p>
|
5454 | 5190 |
<p>option kwarg <code>encoding</code> can be used to specify the
|
|
5464 | 5200 |
<p>def <span class="ident">isopen</span>(</p><p>...)</p>
|
5465 | 5201 |
</div>
|
5466 | 5202 |
|
5467 | |
<p class="inheritance">
|
5468 | |
<strong>Inheritance:</strong>
|
5469 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.isopen">isopen</a></code>
|
5470 | |
</p>
|
5471 | |
|
5472 | |
|
5473 | |
|
5474 | |
<div class="desc inherited"><p>is the Dataset open or closed?</p></div>
|
|
5203 |
|
|
5204 |
|
|
5205 |
|
|
5206 |
<div class="desc"><p>is the Dataset open or closed?</p></div>
|
|
5207 |
<div class="source_cont">
|
|
5208 |
</div>
|
|
5209 |
|
|
5210 |
</div>
|
|
5211 |
|
|
5212 |
|
|
5213 |
<div class="item">
|
|
5214 |
<div class="name def" id="netCDF4.MFDataset.ncattrs">
|
|
5215 |
<p>def <span class="ident">ncattrs</span>(</p><p>self)</p>
|
|
5216 |
</div>
|
|
5217 |
|
|
5218 |
|
|
5219 |
|
|
5220 |
|
|
5221 |
<div class="desc"><p><strong><code>ncattrs(self)</code></strong></p>
|
|
5222 |
<p>return the netcdf attribute names from the master file.</p></div>
|
5475 | 5223 |
<div class="source_cont">
|
5476 | 5224 |
</div>
|
5477 | 5225 |
|
|
5483 | 5231 |
<p>def <span class="ident">renameAttribute</span>(</p><p>self, oldname, newname)</p>
|
5484 | 5232 |
</div>
|
5485 | 5233 |
|
5486 | |
<p class="inheritance">
|
5487 | |
<strong>Inheritance:</strong>
|
5488 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.renameAttribute">renameAttribute</a></code>
|
5489 | |
</p>
|
5490 | |
|
5491 | |
|
5492 | |
|
5493 | |
<div class="desc inherited"><p>rename a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> attribute named <code>oldname</code> to <code>newname</code>.</p></div>
|
|
5234 |
|
|
5235 |
|
|
5236 |
|
|
5237 |
<div class="desc"><p>rename a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> attribute named <code>oldname</code> to <code>newname</code>.</p></div>
|
5494 | 5238 |
<div class="source_cont">
|
5495 | 5239 |
</div>
|
5496 | 5240 |
|
|
5502 | 5246 |
<p>def <span class="ident">renameDimension</span>(</p><p>self, oldname, newname)</p>
|
5503 | 5247 |
</div>
|
5504 | 5248 |
|
5505 | |
<p class="inheritance">
|
5506 | |
<strong>Inheritance:</strong>
|
5507 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.renameDimension">renameDimension</a></code>
|
5508 | |
</p>
|
5509 | |
|
5510 | |
|
5511 | |
|
5512 | |
<div class="desc inherited"><p>rename a <a href="#netCDF4.Dimension"><code>Dimension</code></a> named <code>oldname</code> to <code>newname</code>.</p></div>
|
|
5249 |
|
|
5250 |
|
|
5251 |
|
|
5252 |
<div class="desc"><p>rename a <a href="#netCDF4.Dimension"><code>Dimension</code></a> named <code>oldname</code> to <code>newname</code>.</p></div>
|
5513 | 5253 |
<div class="source_cont">
|
5514 | 5254 |
</div>
|
5515 | 5255 |
|
|
5521 | 5261 |
<p>def <span class="ident">renameGroup</span>(</p><p>self, oldname, newname)</p>
|
5522 | 5262 |
</div>
|
5523 | 5263 |
|
5524 | |
<p class="inheritance">
|
5525 | |
<strong>Inheritance:</strong>
|
5526 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.renameGroup">renameGroup</a></code>
|
5527 | |
</p>
|
5528 | |
|
5529 | |
|
5530 | |
|
5531 | |
<div class="desc inherited"><p>rename a <a href="#netCDF4.Group"><code>Group</code></a> named <code>oldname</code> to <code>newname</code> (requires netcdf >= 4.3.1).</p></div>
|
|
5264 |
|
|
5265 |
|
|
5266 |
|
|
5267 |
<div class="desc"><p>rename a <a href="#netCDF4.Group"><code>Group</code></a> named <code>oldname</code> to <code>newname</code> (requires netcdf >= 4.3.1).</p></div>
|
5532 | 5268 |
<div class="source_cont">
|
5533 | 5269 |
</div>
|
5534 | 5270 |
|
|
5540 | 5276 |
<p>def <span class="ident">renameVariable</span>(</p><p>self, oldname, newname)</p>
|
5541 | 5277 |
</div>
|
5542 | 5278 |
|
5543 | |
<p class="inheritance">
|
5544 | |
<strong>Inheritance:</strong>
|
5545 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.renameVariable">renameVariable</a></code>
|
5546 | |
</p>
|
5547 | |
|
5548 | |
|
5549 | |
|
5550 | |
<div class="desc inherited"><p>rename a <a href="#netCDF4.Variable"><code>Variable</code></a> named <code>oldname</code> to <code>newname</code></p></div>
|
|
5279 |
|
|
5280 |
|
|
5281 |
|
|
5282 |
<div class="desc"><p>rename a <a href="#netCDF4.Variable"><code>Variable</code></a> named <code>oldname</code> to <code>newname</code></p></div>
|
5551 | 5283 |
<div class="source_cont">
|
5552 | 5284 |
</div>
|
5553 | 5285 |
|
|
5559 | 5291 |
<p>def <span class="ident">set_always_mask</span>(</p><p>self, True_or_False)</p>
|
5560 | 5292 |
</div>
|
5561 | 5293 |
|
5562 | |
<p class="inheritance">
|
5563 | |
<strong>Inheritance:</strong>
|
5564 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_always_mask">set_always_mask</a></code>
|
5565 | |
</p>
|
5566 | |
|
5567 | |
|
5568 | |
|
5569 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_always_mask"><code>set_always_mask</code></a> for all variables contained in
|
|
5294 |
|
|
5295 |
|
|
5296 |
|
|
5297 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_always_mask"><code>set_always_mask</code></a> for all variables contained in
|
5570 | 5298 |
this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a>, as well as for all
|
5571 | 5299 |
variables in all its subgroups.</p>
|
5572 | 5300 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion of
|
|
5586 | 5314 |
<p>def <span class="ident">set_auto_chartostring</span>(</p><p>self, True_or_False)</p>
|
5587 | 5315 |
</div>
|
5588 | 5316 |
|
5589 | |
<p class="inheritance">
|
5590 | |
<strong>Inheritance:</strong>
|
5591 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_chartostring">set_auto_chartostring</a></code>
|
5592 | |
</p>
|
5593 | |
|
5594 | |
|
5595 | |
|
5596 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_chartostring"><code>set_auto_chartostring</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
|
5317 |
|
|
5318 |
|
|
5319 |
|
|
5320 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_auto_chartostring"><code>set_auto_chartostring</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
5597 | 5321 |
<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
|
5598 | 5322 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion of
|
5599 | 5323 |
all character arrays <--> string arrays should be performed for
|
|
5612 | 5336 |
<p>def <span class="ident">set_auto_mask</span>(</p><p>self, True_or_False)</p>
|
5613 | 5337 |
</div>
|
5614 | 5338 |
|
5615 | |
<p class="inheritance">
|
5616 | |
<strong>Inheritance:</strong>
|
5617 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_mask">set_auto_mask</a></code>
|
5618 | |
</p>
|
5619 | |
|
5620 | |
|
5621 | |
|
5622 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_mask"><code>set_auto_mask</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
|
5339 |
|
|
5340 |
|
|
5341 |
|
|
5342 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_auto_mask"><code>set_auto_mask</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
5623 | 5343 |
<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
|
5624 | 5344 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion to masked arrays
|
5625 | 5345 |
shall be applied for all variables.</p>
|
|
5636 | 5356 |
<p>def <span class="ident">set_auto_maskandscale</span>(</p><p>self, True_or_False)</p>
|
5637 | 5357 |
</div>
|
5638 | 5358 |
|
5639 | |
<p class="inheritance">
|
5640 | |
<strong>Inheritance:</strong>
|
5641 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_maskandscale">set_auto_maskandscale</a></code>
|
5642 | |
</p>
|
5643 | |
|
5644 | |
|
5645 | |
|
5646 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_maskandscale"><code>set_auto_maskandscale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
|
5359 |
|
|
5360 |
|
|
5361 |
|
|
5362 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_auto_maskandscale"><code>set_auto_maskandscale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
5647 | 5363 |
<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
|
5648 | 5364 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion to masked arrays
|
5649 | 5365 |
and variable scaling shall be applied for all variables.</p>
|
|
5660 | 5376 |
<p>def <span class="ident">set_auto_scale</span>(</p><p>self, True_or_False)</p>
|
5661 | 5377 |
</div>
|
5662 | 5378 |
|
5663 | |
<p class="inheritance">
|
5664 | |
<strong>Inheritance:</strong>
|
5665 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_scale">set_auto_scale</a></code>
|
5666 | |
</p>
|
5667 | |
|
5668 | |
|
5669 | |
|
5670 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_scale"><code>set_auto_scale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
|
5379 |
|
|
5380 |
|
|
5381 |
|
|
5382 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_auto_scale"><code>set_auto_scale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
|
5671 | 5383 |
<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
|
5672 | 5384 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic variable scaling
|
5673 | 5385 |
shall be applied for all variables.</p>
|
|
5684 | 5396 |
<p>def <span class="ident">set_fill_off</span>(</p><p>self)</p>
|
5685 | 5397 |
</div>
|
5686 | 5398 |
|
5687 | |
<p class="inheritance">
|
5688 | |
<strong>Inheritance:</strong>
|
5689 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_fill_off">set_fill_off</a></code>
|
5690 | |
</p>
|
5691 | |
|
5692 | |
|
5693 | |
|
5694 | |
<div class="desc inherited"><p>Sets the fill mode for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> open for writing to <code>off</code>.</p>
|
|
5399 |
|
|
5400 |
|
|
5401 |
|
|
5402 |
<div class="desc"><p>Sets the fill mode for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> open for writing to <code>off</code>.</p>
|
5695 | 5403 |
<p>This will prevent the data from being pre-filled with fill values, which
|
5696 | 5404 |
may result in some performance improvements. However, you must then make
|
5697 | 5405 |
sure the data is actually written before being read.</p></div>
|
|
5706 | 5414 |
<p>def <span class="ident">set_fill_on</span>(</p><p>self)</p>
|
5707 | 5415 |
</div>
|
5708 | 5416 |
|
5709 | |
<p class="inheritance">
|
5710 | |
<strong>Inheritance:</strong>
|
5711 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_fill_on">set_fill_on</a></code>
|
5712 | |
</p>
|
5713 | |
|
5714 | |
|
5715 | |
|
5716 | |
<div class="desc inherited"><p>Sets the fill mode for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> open for writing to <code>on</code>.</p>
|
|
5417 |
|
|
5418 |
|
|
5419 |
|
|
5420 |
<div class="desc"><p>Sets the fill mode for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> open for writing to <code>on</code>.</p>
|
5717 | 5421 |
<p>This causes data to be pre-filled with fill values. The fill values can be
|
5718 | 5422 |
controlled by the variable's <code>_Fill_Value</code> attribute, but is usually
|
5719 | 5423 |
sufficient to the use the netCDF default <code>_Fill_Value</code> (defined
|
|
5732 | 5436 |
<p>def <span class="ident">set_ncstring_attrs</span>(</p><p>self, True_or_False)</p>
|
5733 | 5437 |
</div>
|
5734 | 5438 |
|
5735 | |
<p class="inheritance">
|
5736 | |
<strong>Inheritance:</strong>
|
5737 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_ncstring_attrs">set_ncstring_attrs</a></code>
|
5738 | |
</p>
|
5739 | |
|
5740 | |
|
5741 | |
|
5742 | |
<div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_ncstring_attrs"><code>set_ncstring_attrs</code></a> for all variables contained in
|
|
5439 |
|
|
5440 |
|
|
5441 |
|
|
5442 |
<div class="desc"><p>Call <a href="#netCDF4.Variable.set_ncstring_attrs"><code>set_ncstring_attrs</code></a> for all variables contained in
|
5743 | 5443 |
this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a>, as well as for all its
|
5744 | 5444 |
subgroups and their variables.</p>
|
5745 | 5445 |
<p><strong><code>True_or_False</code></strong>: Boolean determining if all string attributes are
|
|
5758 | 5458 |
<p>def <span class="ident">setncattr</span>(</p><p>self,name,value)</p>
|
5759 | 5459 |
</div>
|
5760 | 5460 |
|
5761 | |
<p class="inheritance">
|
5762 | |
<strong>Inheritance:</strong>
|
5763 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.setncattr">setncattr</a></code>
|
5764 | |
</p>
|
5765 | |
|
5766 | |
|
5767 | |
|
5768 | |
<div class="desc inherited"><p>set a netCDF dataset or group attribute using name,value pair.
|
|
5461 |
|
|
5462 |
|
|
5463 |
|
|
5464 |
<div class="desc"><p>set a netCDF dataset or group attribute using name,value pair.
|
5769 | 5465 |
Use if you need to set a netCDF attribute with the
|
5770 | 5466 |
with the same name as one of the reserved python attributes.</p></div>
|
5771 | 5467 |
<div class="source_cont">
|
|
5779 | 5475 |
<p>def <span class="ident">setncattr_string</span>(</p><p>self,name,value)</p>
|
5780 | 5476 |
</div>
|
5781 | 5477 |
|
5782 | |
<p class="inheritance">
|
5783 | |
<strong>Inheritance:</strong>
|
5784 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.setncattr_string">setncattr_string</a></code>
|
5785 | |
</p>
|
5786 | |
|
5787 | |
|
5788 | |
|
5789 | |
<div class="desc inherited"><p>set a netCDF dataset or group string attribute using name,value pair.
|
|
5478 |
|
|
5479 |
|
|
5480 |
|
|
5481 |
<div class="desc"><p>set a netCDF dataset or group string attribute using name,value pair.
|
5790 | 5482 |
Use if you need to ensure that a netCDF attribute is created with type
|
5791 | 5483 |
<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.</p></div>
|
5792 | 5484 |
<div class="source_cont">
|
|
5800 | 5492 |
<p>def <span class="ident">setncatts</span>(</p><p>self,attdict)</p>
|
5801 | 5493 |
</div>
|
5802 | 5494 |
|
5803 | |
<p class="inheritance">
|
5804 | |
<strong>Inheritance:</strong>
|
5805 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.setncatts">setncatts</a></code>
|
5806 | |
</p>
|
5807 | |
|
5808 | |
|
5809 | |
|
5810 | |
<div class="desc inherited"><p>set a bunch of netCDF dataset or group attributes at once using a python dictionary.
|
|
5495 |
|
|
5496 |
|
|
5497 |
|
|
5498 |
<div class="desc"><p>set a bunch of netCDF dataset or group attributes at once using a python dictionary.
|
5811 | 5499 |
This may be faster when setting a lot of attributes for a <code>NETCDF3</code>
|
5812 | 5500 |
formatted file, since nc_redef/nc_enddef is not called in between setting
|
5813 | 5501 |
each attribute</p></div>
|
|
5822 | 5510 |
<p>def <span class="ident">sync</span>(</p><p>self)</p>
|
5823 | 5511 |
</div>
|
5824 | 5512 |
|
5825 | |
<p class="inheritance">
|
5826 | |
<strong>Inheritance:</strong>
|
5827 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.sync">sync</a></code>
|
5828 | |
</p>
|
5829 | |
|
5830 | |
|
5831 | |
|
5832 | |
<div class="desc inherited"><p>Writes all buffered data in the <a href="#netCDF4.Dataset"><code>Dataset</code></a> to the disk file.</p></div>
|
5833 | |
<div class="source_cont">
|
5834 | |
</div>
|
5835 | |
|
5836 | |
</div>
|
5837 | |
|
5838 | |
<h3>Methods</h3>
|
5839 | |
|
5840 | |
<div class="item">
|
5841 | |
<div class="name def" id="netCDF4.MFDataset.__init__">
|
5842 | |
<p>def <span class="ident">__init__</span>(</p><p>self, files, check=False, aggdim=None, exclude=[], master_file=None)</p>
|
5843 | |
</div>
|
5844 | |
|
5845 | |
<p class="inheritance">
|
5846 | |
<strong>Inheritance:</strong>
|
5847 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.__init__">__init__</a></code>
|
5848 | |
</p>
|
5849 | |
|
5850 | |
|
5851 | |
|
5852 | |
<div class="desc"><p>Open a Dataset spanning multiple files, making it look as if it was a
|
5853 | |
single file. Variables in the list of files that share the same
|
5854 | |
dimension (specified with the keyword <code>aggdim</code>) are aggregated. If
|
5855 | |
<code>aggdim</code> is not specified, the unlimited is aggregated. Currently,
|
5856 | |
<code>aggdim</code> must be the leftmost (slowest varying) dimension of each
|
5857 | |
of the variables to be aggregated.</p>
|
5858 | |
<p><strong><code>files</code></strong>: either a sequence of netCDF files or a string with a
|
5859 | |
wildcard (converted to a sorted list of files using glob) If
|
5860 | |
the <code>master_file</code> kwarg is not specified, the first file
|
5861 | |
in the list will become the "master" file, defining all the
|
5862 | |
variables with an aggregation dimension which may span
|
5863 | |
subsequent files. Attribute access returns attributes only from "master"
|
5864 | |
file. The files are always opened in read-only mode.</p>
|
5865 | |
<p><strong><code>check</code></strong>: True if you want to do consistency checking to ensure the
|
5866 | |
correct variables structure for all of the netcdf files. Checking makes
|
5867 | |
the initialization of the MFDataset instance much slower. Default is
|
5868 | |
False.</p>
|
5869 | |
<p><strong><code>aggdim</code></strong>: The name of the dimension to aggregate over (must
|
5870 | |
be the leftmost dimension of each of the variables to be aggregated).
|
5871 | |
If None (default), aggregate over the unlimited dimension.</p>
|
5872 | |
<p><strong><code>exclude</code></strong>: A list of variable names to exclude from aggregation.
|
5873 | |
Default is an empty list.</p>
|
5874 | |
<p><strong><code>master_file</code></strong>: file to use as "master file", defining all the
|
5875 | |
variables with an aggregation dimension and all global attributes.</p></div>
|
5876 | |
<div class="source_cont">
|
5877 | |
</div>
|
5878 | |
|
5879 | |
</div>
|
5880 | |
|
5881 | |
|
5882 | |
<div class="item">
|
5883 | |
<div class="name def" id="netCDF4.MFDataset.close">
|
5884 | |
<p>def <span class="ident">close</span>(</p><p>self)</p>
|
5885 | |
</div>
|
5886 | |
|
5887 | |
<p class="inheritance">
|
5888 | |
<strong>Inheritance:</strong>
|
5889 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.close">close</a></code>
|
5890 | |
</p>
|
5891 | |
|
5892 | |
|
5893 | |
|
5894 | |
<div class="desc"><p>close all the open files.</p></div>
|
5895 | |
<div class="source_cont">
|
5896 | |
</div>
|
5897 | |
|
5898 | |
</div>
|
5899 | |
|
5900 | |
|
5901 | |
<div class="item">
|
5902 | |
<div class="name def" id="netCDF4.MFDataset.ncattrs">
|
5903 | |
<p>def <span class="ident">ncattrs</span>(</p><p>self)</p>
|
5904 | |
</div>
|
5905 | |
|
5906 | |
<p class="inheritance">
|
5907 | |
<strong>Inheritance:</strong>
|
5908 | |
<code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.ncattrs">ncattrs</a></code>
|
5909 | |
</p>
|
5910 | |
|
5911 | |
|
5912 | |
|
5913 | |
<div class="desc"><p>return the netcdf attribute names from the master file.</p></div>
|
|
5513 |
|
|
5514 |
|
|
5515 |
|
|
5516 |
<div class="desc"><p>Writes all buffered data in the <a href="#netCDF4.Dataset"><code>Dataset</code></a> to the disk file.</p></div>
|
5914 | 5517 |
<div class="source_cont">
|
5915 | 5518 |
</div>
|
5916 | 5519 |
|
|
5961 | 5564 |
<ul class="class_list">
|
5962 | 5565 |
<li><a href="#netCDF4.MFTime">MFTime</a></li>
|
5963 | 5566 |
<li>netCDF4._netCDF4._Variable</li>
|
5964 | |
<li>__builtin__.object</li>
|
|
5567 |
<li>builtins.object</li>
|
5965 | 5568 |
</ul>
|
5966 | |
<h3>Methods</h3>
|
|
5569 |
<h3>Static methods</h3>
|
5967 | 5570 |
|
5968 | 5571 |
<div class="item">
|
5969 | 5572 |
<div class="name def" id="netCDF4.MFTime.__init__">
|
|
5973 | 5576 |
|
5974 | 5577 |
|
5975 | 5578 |
|
5976 | |
<div class="desc"><p>Create a time Variable with units consistent across a multifile
|
|
5579 |
<div class="desc"><p><strong><code>__init__(self, time, units=None, calendar=None)</code></strong></p>
|
|
5580 |
<p>Create a time Variable with units consistent across a multifile
|
5977 | 5581 |
dataset.</p>
|
5978 | 5582 |
<p><strong><code>time</code></strong>: Time variable from a <a href="#netCDF4.MFDataset"><code>MFDataset</code></a>.</p>
|
5979 | 5583 |
<p><strong><code>units</code></strong>: Time units, for example, <code>'days since 1979-01-01'</code>. If <code>None</code>,
|
|
5990 | 5594 |
|
5991 | 5595 |
<div class="item">
|
5992 | 5596 |
<div class="name def" id="netCDF4.MFTime.ncattrs">
|
5993 | |
<p>def <span class="ident">ncattrs</span>(</p><p>...)</p>
|
|
5597 |
<p>def <span class="ident">ncattrs</span>(</p><p>self)</p>
|
5994 | 5598 |
</div>
|
5995 | 5599 |
|
5996 | 5600 |
|
|
6004 | 5608 |
|
6005 | 5609 |
<div class="item">
|
6006 | 5610 |
<div class="name def" id="netCDF4.MFTime.set_always_mask">
|
6007 | |
<p>def <span class="ident">set_always_mask</span>(</p><p>...)</p>
|
|
5611 |
<p>def <span class="ident">set_always_mask</span>(</p><p>self, val)</p>
|
6008 | 5612 |
</div>
|
6009 | 5613 |
|
6010 | 5614 |
|
|
6018 | 5622 |
|
6019 | 5623 |
<div class="item">
|
6020 | 5624 |
<div class="name def" id="netCDF4.MFTime.set_auto_chartostring">
|
6021 | |
<p>def <span class="ident">set_auto_chartostring</span>(</p><p>...)</p>
|
|
5625 |
<p>def <span class="ident">set_auto_chartostring</span>(</p><p>self, val)</p>
|
6022 | 5626 |
</div>
|
6023 | 5627 |
|
6024 | 5628 |
|
|
6032 | 5636 |
|
6033 | 5637 |
<div class="item">
|
6034 | 5638 |
<div class="name def" id="netCDF4.MFTime.set_auto_mask">
|
6035 | |
<p>def <span class="ident">set_auto_mask</span>(</p><p>...)</p>
|
|
5639 |
<p>def <span class="ident">set_auto_mask</span>(</p><p>self, val)</p>
|
6036 | 5640 |
</div>
|
6037 | 5641 |
|
6038 | 5642 |
|
|
6046 | 5650 |
|
6047 | 5651 |
<div class="item">
|
6048 | 5652 |
<div class="name def" id="netCDF4.MFTime.set_auto_maskandscale">
|
6049 | |
<p>def <span class="ident">set_auto_maskandscale</span>(</p><p>...)</p>
|
|
5653 |
<p>def <span class="ident">set_auto_maskandscale</span>(</p><p>self, val)</p>
|
6050 | 5654 |
</div>
|
6051 | 5655 |
|
6052 | 5656 |
|
|
6060 | 5664 |
|
6061 | 5665 |
<div class="item">
|
6062 | 5666 |
<div class="name def" id="netCDF4.MFTime.set_auto_scale">
|
6063 | |
<p>def <span class="ident">set_auto_scale</span>(</p><p>...)</p>
|
|
5667 |
<p>def <span class="ident">set_auto_scale</span>(</p><p>self, val)</p>
|
6064 | 5668 |
</div>
|
6065 | 5669 |
|
6066 | 5670 |
|
|
6074 | 5678 |
|
6075 | 5679 |
<div class="item">
|
6076 | 5680 |
<div class="name def" id="netCDF4.MFTime.typecode">
|
6077 | |
<p>def <span class="ident">typecode</span>(</p><p>...)</p>
|
|
5681 |
<p>def <span class="ident">typecode</span>(</p><p>self)</p>
|
6078 | 5682 |
</div>
|
6079 | 5683 |
|
6080 | 5684 |
|
|
6106 | 5710 |
<h3>Ancestors (in MRO)</h3>
|
6107 | 5711 |
<ul class="class_list">
|
6108 | 5712 |
<li><a href="#netCDF4.VLType">VLType</a></li>
|
6109 | |
<li>__builtin__.object</li>
|
|
5713 |
<li>builtins.object</li>
|
6110 | 5714 |
</ul>
|
6111 | 5715 |
<h3>Class variables</h3>
|
6112 | 5716 |
<div class="item">
|
|
6211 | 5815 |
<h3>Ancestors (in MRO)</h3>
|
6212 | 5816 |
<ul class="class_list">
|
6213 | 5817 |
<li><a href="#netCDF4.Variable">Variable</a></li>
|
6214 | |
<li>__builtin__.object</li>
|
|
5818 |
<li>builtins.object</li>
|
6215 | 5819 |
</ul>
|
6216 | 5820 |
<h3>Class variables</h3>
|
6217 | 5821 |
<div class="item">
|
|
6940 | 6544 |
<footer id="footer">
|
6941 | 6545 |
<p>
|
6942 | 6546 |
Documentation generated by
|
6943 | |
<a href="https://github.com/BurntSushi/pdoc">pdoc 0.3.2.dev16</a>
|
|
6547 |
<a href="https://github.com/BurntSushi/pdoc">pdoc 0.3.2.dev29</a>
|
6944 | 6548 |
</p>
|
6945 | 6549 |
|
6946 | 6550 |
<p>pdoc is in the public domain with the
|