forked from Unidata/netcdf4-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changelog
882 lines (641 loc) · 34.5 KB
/
Changelog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
version 1.0.9 (not yet released)
================================
* add .travis.yml (for travis-ci testing on github), silence warnings from
test output (issue 225).
* modify __unicode__ for Variable and Dimension to return more useful error
message when Dataset object has been garbage collected.
* use weak references to group instances when creating Dimension and Variable
objects. This prevents cyclic references messing up garbage collection (issue
218, pull request 219).
* accessing values from a 0-dimensional Variable now returns a 0-dimensional
numpy array, not a 1-dimensional array (issue 220). To write code
compatible with both the old and new (fixed) behavior, wrap values accessed
from a 0-dimensional Variable with numpy.asscalar.
* add an __array__ method to Variable to make numpy ufuncs faster (issue 216).
* change download_url in setup.py to point to pypi instead of googlecode.
* fix for date2index error when time variable has only one entry (issue 215).
* silence warnings ("Non-trivial type declarators in shared declaration (e.g.
mix of pointers and values). Each pointer declaration should be on its own
line") with Cython 0.2.
version 1.0.8 (tag v1.0.8rel)
=============================
* change file_format Dataset attribute to data_model (keeping file_format
for backward compatibility). Add disk_format attribute (underlying
disk format, one of NETCDF3, HDF4, HDF5, DAP2, DAP4, PNETCDF or UNDEFINED).
Uses nc_inq_format_extended, added in version 4.3.1 of library. If using
earlier version of lib, disk_format will be set to UNDEFINED.
* default _FillValue now ignored for byte data types (int8 and uint8) as per
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/Fill-Values.html#Fill-Values
"If you need a fill value for a byte variable, it is recommended that you
explicitly define an appropriate _FillValue attribute, as generic utilities
such as ncdump will not assume a default fill value for byte variables".
ncinfo now returns fill mode information (issue 209).
* check to see if filling was disabled before masking data equal to
default fill value (issue 209).
* add variable type information to Dataset.__repr__ (output of ncinfo).
version 1.0.7 (tag v1.0.7rel)
=============================
* add the ability to specify the locations of hdf4,jpeg and curl libs, in
case netCDF4 was built statically with HDF4 and/or OpenDAP support (issue
207).
* add 'ncinfo' utility (like 'ncdump -h' but less verbose).
* more information displayed when Dataset or Group instance is printed.
* fix for issue 194 (versions after 1.0.5 fail for netcdf 4.1.1, due to
call to nc_inq_path, which was added in netcdf 4.1.2). Fixed by adding
compile time API check similar to what was done for nc_rename_grp. If
filepath Dataset method is called an exception will be raised at runtime
if the module was built with netcdf < 4.1.2, or cython was not installed
at build time.
* fix for issues 202 and 206 (exception raised by numpy.isnan for character data types).
* if dateutils not installed and time unit accuracy < 1 second requested, have
netcdftime raise an ImportError.
version 1.0.6 (svn revision 1312)
================================
* issue warning of endian-ness of dtype argument does not match endian kwarg in
createVariable.
* make sure netcdf type NC_CHAR always returned in numpy array dtype 'S1'
(sometimes arrays of type 'U1' were being returned). Fixes intermittently failing
test tst_compoundatt.py on python 3.3.
* fix for issue 201 (if data associated with numpy array not the
same endian-ness as dtype, data was written incorrectly). Now
bytes are swapped if necessary. Variable.endian() now returns
'native' instead of None for NETCDF3 formatted files. createVariable
now enforces endian='native' for NETCDF3 files. Added tst_endian.py
test case.
* fix for issue 200 (library version detection failed on cygwin).
* fix for issue 199 (nc4tonc3 utility not copying global attributes).
* fix for issue 198 (setup.py chokes when no arguments given).
* fix for issue 197 (slicing of netCDF variables using lists of integers).
* create 'path' attribute for group instance using posixpath, instead
of os.path (to ensure the unix path is used on all platforms). Issue 196.
* fix for issue 196 (test failures on win32 due to files being deleted
before they are closed).
version 1.0.5 (svn revision 1278)
================================
* change setup.py to compile the Cython sources directly, if
cython is available.
This allows for "ifdef" like capability to modify source at compile time to
account for changes in netcdf API (e.g. the forthcoming addition of the
nc_rename_grp in version 4.3.1).
* added a "renameGroup" method, which raises an exception if
the netcdf lib version linked does not support it. Requires
netcdf >= 4.3.1.
* support for more than one missing value (missing_value attribute
is a vector) when converting to masked array.
* add 'renameAttribute' method to Dataset, Group and Variable.
* fix so that var[:] = x works if x is a scalar, and var is a netcdf variable
with an unlimited dimension that has shape () - i.e. no data has been
written to it yet. Before this change, var[:] = x did not write any data.
Now the scalar x will be written as the first entry in var along the
unlimited dimension.
* remove dos line feeds from nc3tonc4 (issue 181).
* add datatype property for Variable that returns numpy dtype for primitive
datatypes (same as dtype attribute) but returns CompoundType or VLType
instance for compound or vlen variables (issue 178).
* fix logic for deciding where to look for nc-config in setup.py (issue 177).
* issue a warning and don't try to apply scale_factor or add_offset if these
attributes are not convertible to floats (issue 176).
* add filepath method to Dataset instance to return file path (or opendap
URL) used to create Dataset (issue 172).
* fix for issue 170 (opening a remote DAP dataset fails after creating
a NETCDF4 formatted file).
* fix for issue 169 (error in chartostring function on 64-bit windows).
* add support for missing_value or _FillValue == NaN (issue 168).
* added a Dimension.group() method (issue 165).
version 1.0.4 (svn revision 1229)
=================================
* fixed alignment bug that could cause memory corruption
when reading compound type variables. All users of compound
types should upgrade.
version 1.0.3 (svn revision 1219)
=================================
* don't try to write empty data array to netcdf file (fixed failing
test with netcdf 4.3.0rc2).
* date2num, num2date and date2index now can handle units of microseconds and milliseconds
(for proleptic_gregorian calendar, or gregorian and standard calendars
as long as the time origin is after 1582-10-15). Issue 159.
* Added a _grp attribute to Dimension (issue 165).
* don't bundle ordereddict (issue 164).
* support reading of vlen string attributes (issue 156).
* add --vars option to nc3tonc4 (issue 154).
* Don't try to set fletcher32 checksum on scalar variables (it causes HDF5
to crash). Fixes issue 150.
* Add --istart/--istop options to nc3tonc4 (issue 148, courtesy of
Rich Signell).
* fix for proleptic_gregorian in netcdftime.py (courtesy of Matthias Cuntz).
version 1.0.2 (svn revision 1196)
=================================
* disable version check for HDF5, which is broken by hdf5 1.8.10.
* make sure all files have a calendar attribute in MFTime (issue 144).
* more robust fix to issue 90 (array shape modified by assignment to
a netCDF variable with one more dimension), including test case.
version 1.0.1 (svn revision 1190)
=================================
* fix error that occurred when retrieving data from a variable that has a
missing_value attribute specified as a string (issue 142).
* automatically close netcdf files when there are no references
left to Dataset object (using __dealloc__ method). Fixes issue 137.
* fix for slicing of scalar vlen string variables (issue 140).
* fix to allow writing of unicode data to a NC_CHAR variable.
* allow for writing of large variables (> 2**32 elements). Fixes issue 130.
version 1.0fix1
===============
* fix python 3 incompatibility in setup.py (issue 125).
version 1.0 (svn revision 1164)
===============================
* add 'aggdim' keyword to MFDataset, so the name of the dimension
to aggregate over can be specified (instead of using the unlimited
dimension). aggdim=None by default, which results in the previous
behavior. aggdim must be the leftmost dimension of all the variables
to be aggregated.
* raise IndexError when indexing a netcdf variable out of range
so iterating over a variable in a for loop behaves as expected
(as described in http://effbot.org/zone/python-for-statement.htm).
Fixes issue 121.
* added MacPorts portfile (so it can be installed via MacPorts
on macosx using a "local Portfile repository"). Installs
from svn HEAD using 'port install netcdf4-python'.
* added experimental 'diskless' file capability (only added to the C
lib after the 4.2 release). Controlled by kwarg 'diskless' to
netCDF4.Dataset (default False). diskless=True when creating a file
results in a file that exists only in memory, closing the file
makes the data disapper, except if persist=True keyword given in
which case it is persisted to a disk file on close. diskless=True
when opening a file creates an in-memory copy of the file for faster access.
* add the ability to specify the location of the required libs
(and whether to use nc-config) with setup.cfg,
instead of using environment variables.
* fix ISO9601 date parser so it recognizes time zone offsets in time unit
strings (contributed by David Hassel, issue 114, r1117).
* add setncatts Dataset,Group and Variable method to add a bunch of
attributes (given in a python dictionary) at once. Speeds things
up for NETCDF3 and NETCDF4_CLASSIC files a lot, since nc_redef/nc_enddef
not need to be called for each attribute (issue 85, r1113). Adding 1000
attributes is about 35 times faster using setncatts to add them all at once.
Makes no difference for NETCDF4 formatted files, since nc_redef/nc_enddef
is not called.
* only round after apply scale_factor and add_offset if variable type is
integer (issue 111, r1109).
* Fixed bug with all False Boolean index (r1107).
* added support for after, before and nearest selection method to date2index
fast "first guess" indexing (r1106).
* Remove white space in time units string (netcdftime._parse_date).
An extra space in the time units of one CMIP3 model caused an error
(r1105).
* based on results with examples/bench_compress2.py, change
default complevel for zlib compression from 6 to 4. If complevel=0,
turn compression off entirely (set zlib=False) (r1102).
version 0.9.9 (svn revision 1099)
================================
* changed default unicode encoding from "latin-1" to "utf-8", since
this is the python 3 default, and the only encoding that appears to
work for dimension and variable names.
* added test case for unicode attributes, variable and dimension names.
* fixes for unicode variable, dimension and group names.
* fix for unicode attributes in python3 (ncdump did not intrepret them as
text strings). Issue 107.
* add --format option to nc4tonc3 utility (can be either NETCDF3_CLASSIC or
NETCDF3_64BIT). Fixes issue 104.
version 0.9.8 (svn revision 1080)
================================
* use numpy.ma.isMA to check for masked array (instead of checking
for presence of 'mask' attribute).
* fixes for AIX with ibm xlc compiler.
* make sure unicode attributes don't get converted to ascii strings (issue
98).
version 0.9.7 (svn revision 1073)
================================
* Added __str__ methods to Dataset, Variable, Dimension, CompoundType,
VLType and MFDataset, so useful human-readable information is provided when these
objects are printed in an interactive session.
* don't try to apply scale_factor and offset if scale_factor=1 and
add_offset=0 (to avoid making copies of large arrays).
* changed netCDF4._default_fillvals to netCDF4.default_fillvals (to make part
of public API). Added to docs (issue 94).
version 0.9.6 (svn revision 1043)
=================================
* changed default unicode encoding from "ascii" to "latin-1" (iso-8859-1).
* add "unicode_error" module variable to control what happens when characters
cannot be decoded by the encoding specified by the "default_encoding" module
variable (which is "ascii" by default). unicode_error = "replace" by default
which means bad characters are replace by "?". Previously an error was
raised, the old behavior can be obtained by setting unicode_error = 'strict'.
Fixes issue 92.
* add __enter__ and __exit__ methods so you can do "with Dataset(url) as f:"
(issue 89).
* don't add extra singleton dimensions to rhs numpy arrays when assigning to
a netcdf variable. Fixes issue 90.
* coerce missing_value attribute to same type as variable (for primitive
types). Fixes issue 91.
version 0.9.5 (svn revision 1031)
================================
* fix for compound variables on python 3.2.
* fix slicing of masked MFDataset variables (issue 83).
* round to nearest integer after packing with scale_factor and add_offset
(instead of truncation) (issue 84).
* if add_offset missing, but scale_factor present, assume add_offset zero.
if scale_factor missing, but add_offset present, assume scale_factor one.
(this is consistent with unidata recommendations - issue 86).
* only try to convert strings to bytes for python 3 so Dataset can
be subclassed (issue 87).
version 0.9.4 (svn revision 1018)
================================
* tested with python 2.7.1/3.1.3 using netcdf 4.1.2 and hdf5 1.8.6.
* Added a 'default_encoding' module variable that controls how unicode
strings are encoded into bytes. Default is 'ascii'.
* now works on Python 3.
* netCDF3 module removed. If you still need it, get it from netCDF4 0.9.3.
* regenerated C source with Cython 0.14.1.
* Added a MFTime class. Provide a unified interface to MFDataset time
variable using different time units.
* Fixed bug in netcdftime (issue 75) that occurs when time specified is within
one second of the end of the month.
* on unix-like systems, the environment variable USE_NCCONFIG can be set to
tell setup.py to use the nc-config script installed by netcdf to figure out
where all the libs and headers are (without having to specify NETCDF_DIR,
HDF5_DIR, etc). Only works with netcdf 4.1.2.
version 0.9.3 (svn revision 930)
================================
* fix chunk sizes bug (chunk sizes pointer should be size_t, not int). Fixes
issue 66. Added test in tst_compression.py
* fixed writing of data with missing values with scale/offset packing. Added
test (tst_masked2.py).
* fix iso8601 regex in netcdftime date parser so it can parse 'hours since 1-1-1 ...'
(year had to be 4 digits previously)
version 0.9.2 (svn revision 907)
================================
* fix netcdftime bug with '360_day' calendar. Fixes issue 59.
* make sure scalar slice of 1d variable returns array scalar (not array of
shape (1,)). Fixes issue 57.
* updated date parser in netcdftime. Can now handle units like
"seconds since 1970-01-01T00:00:00Z".
* added support in setup.py for specifying the locations of the HDF5/netcdf-4 headers
and libs separately with environment variables (HDF5_INCDIR, HDF5_LIBDIR).i
Patch contributed by Patrice Dumas.
* add masked array support to num2date (dates for missing times set to None).
* add chunk_cache keyword to createVariable. HDF5 default is 1mb, which can
cause problems when creating 1000's of variables. In such cases,
chunk_cache can be reduced, or set to zero.
* add set_var_chunk_cache and get_var_chunk_cache Variable methods.
* raise AttributeError when trying to set _FillValue attribute (it can only
be reliably set on variable creation, using the fill_value keyword to
createVariable).
version 0.9.1 (svn revision 879)
================================
* raise ImportError if netcdf-4 < 4.1.1 or hdf5 <= 1.8.4.
* add __netcdf4libversion__ and __hdf5libversion__ module variables.
* make sure data is not truncated to integers before scale_factor and
add_offset is applied (issue 46).
* fix bug in date2num with noleap calendar in netcdftime (issue 45).
* fix bug in 360day calendar in netcdftime (issue 44).
* python 2.4 compatibility restored (by modifying OrderedDict). Fixes issue
37.
* make sure int64 attributes cast to int32 when format=NETCDF4_CLASSIC. This
was causing tst_multifile.py to fail on 64-bit platforms.
* fix tutorial.py to cast 64 bit integers to 32 bit when writing to 32-bit
integer vlen (was causing tutorial.py to fail on 64-bit platforms).
* remove nose dependency from tst_netcdftime.py.
version 0.9 (svn revision 846)
==============================
* fixed bug (issue 30) with date2index occurring with dates outside the support.
* make sure that auto masking works with MFDataset.
* fix bug (issue 34) when slicing MFDataset variables with dimensions of
length 1.
* used ordered dictionaries for variables, dimensions, groups etc to
preserve creation order (makes it easier to copy files, fixes issue 28).
* change auto_maskandscale default to True. This means data will
automatically be converted to and from masked arrays. Data scaled as short
integers using the scale_factor and add_offset attributes will also be
automatically converted to/from float arrays.
* add setncattr, getncattr, delncattr methods (for setting/getting/deleting netcdf
attributes with names that clash with the reserved python attributes).
version 0.8.2 (svn revision 769)
================================
* compound type tests re-enabled. Compound and vlen types now fully
supported in netcdf-4.1-beta2.
* make sure data retrieved from a netCDF variable is not coerced to a python
scalar (it should remain a numpy scalar array).
* fix docs to point out that an unlimited dimension can be created by setting
size to *either* None or 0 in createDimension.
* fix another slicing corner case.
* remove auto pickling/unpickling into vlen strings (too cute, sometimes
produced surprising results).
version 0.8.1 (svn revision 744)
================================
* added 'cmptypes' and 'vltypes' Group/Dataset attributes, which contain
dictionaries that map the names of compound and vlen types to
CompoundType and VLType instances.
* Experimental variable-length (vlen) data type support added.
* changes to accomodate compound types in netcdf-4.1-beta snapshots.
Compound types now work correctly for snapshots >= 20090603.
* Added __len__ method and 'size' property to Variable class.
* In date2index, replaced the brute force method by the bisection method and
added a 'select' keyword to find the index of the date before, after or
nearest the given date.
* Fixed bug occurring when indexing with a numpy array of length 1.
* Fixed bug that occured when -1 was used as a variable index.
* enabled 'shared access' mode for NETCDF3 formatted files (mode='ws',
'r+s' or 'as'). Writes in shared mode are unbuffered, which can
improve performance for non-sequential access.
* fixed bug in renameVariable that caused failure when new name is longer
than old name, and file format is NETCDF3_64BIT or NETCDF3_CLASSIC.
version 0.8 (svn revision 685)
==============================
* added 'stringtoarr' utility function for converting python strings
to numpy character arrays of a specified size.
* initial support for compound data types (which are mapped to structured
numpy arrays). Compound data types are created with the createCompoundTYpe
Dataset or Group method. Both attributes and variables can be compound
types.
* make sure 64-bit integer attributes converted to 32 bits when writing to
a NETCDF3 formatted file.
* added nc4tonc3 utility for converted NETCDF4_CLASSIC files to NETCDF3_64BIT
files (useful for sharing data with colleagues that don't have netcdf-4
capable clients).
version 0.7.7 (svn revision 626)
================================
* David Huard reworked fancy indexing - it is now much more efficient and
less of a memory hog. Now works differently than numpy fancy indexing - 1d
arrays of boolean or integer indices work independently on each dimension.
This enables things like:
>>> tempdat = temp[[0,1,3],lats>0,lons>0]
(retrieves 1st, 2nd and 4th levels, all Northern Hem. and Eastern
Hem. grid points - note that this would raise an IndexError in numpy)
* added opendap test (tst_dap.py).
* bugfix for nc3tonc4 utility.
* fix MFDataset.Variable. __getattr__ to raise AttributeError instead of
KeyError when attribute not found.
* netcdftime version number upped to 0.7.
version 0.7.6 (svn revision 574)
================================
* added date2index function, courtesy of David Huard, which finds the indices
in a netCDF time variable corresponding to a sequence of datetime instances.
* make _get_att/_set_att raise AttributeError instead of RuntimeError, so that
getattr(object, 'nonexistantattribute', None) works. (thanks David Huard)
* v[:] = data now works along unlim dim, i.e. you can do this:
file = Dataset('test.nc', "w")
file.createDimension("time", None) # unlimited dimension
var = file.createVariable("var", 'd', ("time",))
# you used to have to do this
#var[0:10] = numpy.arange(10)
# but now you can simply do this
var[:] = numpy.arange(10)
version 0.7.5 (svn revision 549)
================================
* return a scalar array, not a python scalar, when a slice returns a single
number. This is more consistent with numpy behavior, and fixes a bug
in MFDataset slicing.
* added 'exclude' parameter to MFDataset.__init__
* added set_auto_maskandscale method to MFDataset variables.
version 0.7.4 (svn revision 540)
================================
* ensure all arithmetic is done with float64 in netcdftime (Rob Hetland).
* fixes for netcdf-4.0-beta2 ('chunking' keyword to createVariable
replaced by 'contiguous'). Now works with netcdf-4.0-beta2 and hdf5-1.8.0
final, but is incompatible with netcdf-4.0-beta1.
version 0.7.3.1 (svn revision 507)
==================================
* netCDF3 docs were missing from 0.7.3.
* make sure quantization function preserves fill_value of masked arrays.
version 0.7.3 (svn revision 501)
================================
* MFnetCDF4 module merged into netCDF4 and netCDF3 (now
called MFDataset).
* added netCDF3 module for those who can't install the netCDF 4 lib.
* added set_auto_maskandscale Variable method to enable automatic
packing and unpacking of short integers (using scale_factor
and add_offset attributes) and automatic conversion to/from
masked arrays (using missing_value or _FillValue attribute)
on a per-variable basis.
var.set_auto_maskandscale(True) turns automatic
conversion on (it is off by default).
* automatically pack/unpack short integer variables
if scale_factor and add_offset variable attributes are set.
* added support for masked arrays. If you try to write a masked
array to a variable with the missing_value or _FillValue attributes
set, the masked array is filled with that value before being written
to the file. If you read data from a variable with the missing_value
or _FillValue attribute set, a masked array is returned with the
appropriate values masked.
* added date2num and num2date functions.
* added capability to use 'fancy indexing' with variable objects
(i.e. using sequences of integers or booleans in slices). WARNING:
if a sequence of integers or booleans is used to slice a netCDF4
variable, all of the data in that dimension is read into a numpy
array, and then the sequence is used to slice the numpy array,
returning just the requested elements to the user. This can
potentially gobble a lot of memory and degrade performance
(especially if 'fancy indexing' is done on the left-most dimension).
* added convenience functions stringtochar and chartostring for
converting character arrays to arrays of fixed-length strings and
vice-versa. Example usage in examples/test_stringarr.py.
20070826 - version 0.7.1 (svn revision 400)
===========================================
* added 'endian()' and 'chunking()' Variable methods (to inquire about
endian and chunking variable settings).
* 'ndim' attribute was not public (so it couldn't be accessed from python).
Fixed.
* added 'endian' kwarg to createVariable (to set the endian-ness
used in the HDF5 file).
* can now manually set HDF5 chunksizes for each dimension at
variable creation, using 'chunksizes' kwarg to createVariable.
* added "getlibversion()" function to get info about version
of netcdf-4 library used to build module.
* if a variable has an unsupported datatype (such as 'compound', or
'vlen'), then instead of raising an exception, just skip it.
Print a useful error message when an attribute with an unsupported
datatype is accessed.
* if variable dimension is specified as 'dimname' or ('dimname')
in createVariable, it is automatically converted to a tuple ('dimname',).
Better error messages when specified dimension can't be found.
* createVariable accepts numpy dtype object as datatype. dtype variable
attribute is now a numpy dtype object.
20070723 - version 0.7 (svn revision 361)
=========================================
* renamed MFnetCDF4_classic --> MFnetCDF4.
* eliminated netCDF4_classic module (all file formats handled by
netCDF4 module now).
* removed all user-defined data type stuff (it was hacky and made
the code too complex - wait till there is a real use case to
refactor and put back in).
* added 'ndim' variable attribute (number of variable dimensions).
20070424 - version 0.6.3 (svn revision 302)
===========================================
* passes all tests with netcdf-4.0-beta1/hdf5-1.8.0-beta1.
* if slice index is not a slice object, assume it's an integer (and
try to convert to one if it is not). This allows numpy scalar arrays
to work as slice indices.
* (netCDF4_classic only) try to make sure file is not left in 'define mode'
when execption is raised.
* if slicing a variable results in a array with shape (1,), just return
a scalar (except for compound types).
* added instructions for using the netCDF4_classic module to serve
data over http with the DAP using pydap (http://pydap.org).
* added --quiet and --chunk options to nc3tonc4.
* Turned off zlib compression by default so as not to violate the
'principle of least surprise'. Shuffle filter still activated
by default when zlib compression turned on.
* Fixed bug in fletcher32 checksum activation call. Renamed compression()
variable method to filters(), include fletcher32 checksum flag in output.
* added utility for converting GRIB1 files to compressed
NETCDF4_CLASSIC files (requires PyNIO).
* added 'compression()' variable method that returns a dict with
compression filter parameter settings for that variable. (rev 237)
* reimplemented 'shape' and 'dimensions' variable attributes as
properties.
* fixed bug when 'chunking' keyword in createVariable was set to 'sub'
(caused Bus Error on MacOS X).
* Setting 'shuffle=0' keyword in createVariable was turning off
zlib compression filter instead of shuffle filter. Fixed.
20070213 - version 0.6.2
========================
* updated for compatibility with netcdf-4.0-alpha18 and hdf5 1.8.0alpha5
(shared dimensions actually work now).
* netCDF4.createVariable can now use old single character Numeric typecodes
for datatype specification.
* Improvements to MFDataset (now called MFnetCDF4_classic) by Rob Hetland.
20061121 - version 0.6.1
========================
* bugfixes for negative strides.
* bugfix for empty string attributes.
* support for shared dimensions (variables can use dimensions defined
only in a parent group). This doesn't actually work yet, because of
a bug in netcdf-4.0-alpha17.
* now requires Pyrex (C source files generated on the fly when setup.py
is run).
20061003 - version 0.6
======================
* if fill_value keyword to createVariable is set to the Boolean
False (not an integer that evaluates to False), no pre-filling
is done for that variable.
* updated to be compatible with netcdf-4.0-alpha17.
Can now install pure-python netcdftime separately with setup-netcdftime.py.
netcdftime will try to use numpy, but fall back to Numeric if numpy
not installed.
* generated source files with a version of pyrex
(from http://codespeak.net/svn/lxml/pyrex/) that produces
extensions compatible with python 2.5.
* added new module for multi-file access of NETCDF3 and NETCDF4_CLASSIC
files (MFDataset). Based on CDFMF from pycdf.
* implement negative strides in variable slicing
(feature missing from Scientific.IO.NetCDF). Now variables support
full python extended slicing syntax.
20060925 - version 0.5.1
========================
* on 64-bit systems integer attributes in netCDF4_classic failed, since there
is no 64-bit integer data type. Fixed by downcasting to 32-bit integer.
20060920 - version 0.5
======================
* Compound type support! (members must be fixed data primitive types -
no user-defined types or NC_STRING variables allowed). Attributes
are still restricted to primitive data types (no vlen or compound
type attributes).
* Assigning single values to a slice now does the Right Thing, i.e.
>>> data[:] = 1
fills all the elements with 1 (instead of raising an IndexError).
* Tested with numpy 1.0b5, netcdf-4.0-alpha16, HDF5 1.7.52 alpha.
* Added renameDimension and renameVariable methods to Dataset and Group classes.
* netCDF attributes can be deleted using python del (i.e. 'del dset.foo').
* Moved examples from test and test_classic to examples and
examples_classic directories.
* Added proper unit tests (in test and test_classic directories).
* NULL characters are removed from text attributes.
* Variable _FillValue can be set using new keyword argument 'fill_value'
to createVariable Dataset and Group method.
* docstrings now formatted with epydoc (http://epydoc.sf.net).
* improved Scientific.IO.NetCDF compatibility for netCDF4_classic
(typecode method, ability to use old Numeric typecodes).
* zlib=False or complevel=0 disables shuffle filter in createVariable.
* subversion repository hosted on Google projects
(http://code.google.com/p/netcdf4-python/).
* examples_classic/bench2.py is a performance comparison with
Scientific.IO.NetCDF (the numpy version provided by pynetcdf).
* __dict__ attribute of Dataset, Group or Variable provides a python
dictionary with all netCDF attribute name/value pairs (just like
Scientific.IO.NetCDF).
20060710 - version 0.4.5
========================
* fixed to work with recent svn versions of numpy
* Now requires at least numpy 0.9.8.
* Raise a AttributeError if user tries to rebind a private attribute
(like 'variables', 'dimensions' or 'dtype').
20060629 - version 0.4.4
========================
* fixed to work with netcdf-4.0-alpha14.
* automatically cast _FillValue attribute to variable type, to
avoid surprising error message.
20060320 - version 0.4.3
========================
updated netcdftime module yet again
added 'all_leap'/'366_day' and '360_day' calendars.
netCDFTime class renamed utime, fwd and inv methods
renamed date2num and num2date. These methods can now handle
numpy arrays as well as scalars.
a 'real' python datetime instance is returned if calendar
is gregorian, otherwise a 'datetime-like' instance is returned
(python datetime can't handle funky dates in 'all_leap' and '360_day'
calendars).
20060316 - version 0.4.2
========================
udunits module replaced by pure python version, renamed 'netcdftime'
No longer requires udunits library. Includes 4 calendars
('julian','standard'/'gregorian','proleptic_gregorian','noleap'/'365_day').
Calendar names and their interpretations follow the CF metadata convention.
20060310 - version 0.4.1
========================
udunits module included for doing time conversions.
20060306 - version 0.4
======================
netCDF4_classic module can now write NETCDF3_CLASSIC, NETCDF4_64BIT
as well as NETCDF4_CLASSIC files. The file format is given as
an optional keyword to the Dataset constructor ('NETCDF4_CLASSIC'
is the default). Preliminary work on compound types done - but
awaiting the next alpha of the netCDF 4 library to complete (bugs
in alpha12 prevent it from working properly if the compound type
has fields which are arrays).
20060217 - version 0.3.1
========================
refactored user-defined data type support - user-defined
data types are now described by an instance of the class
UserType. usertype and usertype_name keyword args
eliminated from createVariable.
20060214 - version 0.3
======================
support for variable length strengths (typecode = 'S') and
variable-length, or 'ragged' arrays (vlen user-defined datatype).
Arrays of python objects can be saved as pickled strings with
datatype = 'S'.
20050128 - version 0.2.5
========================
added support for scalar variables (and assignValue, getValue
Variable methods for Scientific.IO.NetCDF compatibility).
20051123 - version 0.2.4
========================
numpy 0.9.4 compatibility
Changed data type codes from ('d', 'f', 'i', 'h', ...) to
('f8', 'f4', 'i4', 'i2', ...).
20050110 - version 0.2.3
========================
added ellipsis slicing capability
20050106 - version 0.2.2
========================
changed scipy_core to numpy.
20051228 - version 0.2.1
========================
bugfixes, added 'nc3tonc4' utility to convert netCDF version 3 files
to NETCDF4_CLASSIC files (with compression). The converted files
can be read from netCDF 3 clients that have been re-linked to the netCDF 4
library. 'chunking' keyword added to createVariable in netCDF4 module.
20051224 - version 0.2
======================
Added netCDF4_classic module - which creates files in NETCDF4_CLASSIC
format. These files are compatible with netCDF 3 clients which have
been linked against the netCDF 4 lib. This module does not use any
new features of the netCDF 4 API except zlib compression. Unlike
any other netCDF 3 python client, it can transparently compress data
with zlib compression and the HDF5 shuffle filter.
20051222 - version 0.1
======================
First release. Supports groups, multiple unlimited dimensions, zlib
compression (plus shuffle filter and fletcher32 checksum) and all new
primitive data types. No support for user-defined data types yet.