1 version 1.5.7 (tag v1.5.7rel) 2============================== 3 * don't try to mask vlens with default _FillValue, since vlens don't have a default _FillValue. 4 This gets rid of numpy DeprecationWarning (issue #1099). 5 * update docs to reflect the fact that a variable must be in collective mode before writing 6 compressed data to it in parallel. Added a test for this (examples/mpi_example_compressed.py). 7 Issue #1108. 8 * Fix OverflowError when dimension sizes become greater than 2**32-1 elements on Windows (Issue #1112). 9 * Don't return masked arrays for vlens (only for primitive and enum types - issue #1115). 10 11 version 1.5.6 (tag v1.5.6rel) 12============================== 13 * move CI/CD tests from travis/appveyor to Github Actions (PR #1061). 14 * move netCDF4 dir under src so module can be imported in source directory (PR #1062). 15 * change numpy.bool to numpy.bool_ and numpy.float to numpy.float_ (float and 16 bool are deprecated in numpy 1.20, issue #1065) 17 * clean up docstrings so that they work with latest pdoc. 18 * update cython numpy API to remove deprecation warnings. 19 * Add "fromcdl" and "tocdl" Dataset methods for import/export of CDL 20 via ncdump/ncgen called externally via the subprocess module (issue #1078). 21 * remove python 2.7 support. 22 * broadcast data (if possible)to conform to variable shape when writing to a slice 23 (issue #1083). 24 25 version 1.5.5.1 (tag v1.5.5.1rel) 26================================== 27 * rebuild binary wheels for linux and OSX to link netcdf-c 4.7.4 and hdf5 1.12.0. 28 29 version 1.5.5 (tag v1.5.5rel) 30============================== 31 * have setup.py always try use nc-config first to find paths to netcdf and 32 hdf5 libraries and headers. Don't use pkg-config to find HDF5 if HDF5 env 33 vars are set (or read from setup.cfg). 34 * Change MIT license text to standard OSI wording (PR #1046). 35 36 version 1.5.4 (tag v1.5.4rel) 37============================== 38 * fix printing of variable objects for variables that end with the letter 'u' 39 (issue #983). 40 * make sure root group has 'name' attribute (issue #988). 41 * add the ability to pack vlen floats to integers using 42 scale_factor/add_offset (issue #1003) 43 * use len instead of deprecated numpy.alen (issue #1008) 44 * check size on valid_range instead of using len (issue #1013). 45 * add `set_chunk_cache/get_chunk_cache` module functions to reset the 46 default chunk cache sizes before opening a Dataset (issue #1018). 47 * replace use of numpy's deprecated tostring() method with tobytes() 48 (issue #1023). 49 * bump minimal numpy version to 1.9 (first version to have tobytes()). 50 51 version 1.5.3 (tag v1.5.3rel) 52============================== 53 * make sure arrays are masked that are not filled when auto_fill is off 54 (issue #972). 55 * python 3.8 binary wheels. 56 57 version 1.5.2 (tag v1.5.2rel) 58============================== 59 * fix for scaling bug when _Unsigned attribute is set and byteorder of data 60 does not match native byteorder (issue #930). 61 * revise documentation for Python 3 (issue #946). 62 * establish support for Python 2.7, 3.5, 3.6 and 3.7 (issue #948). 63 * use dict built-in instead of OrderedDict for Python 3.7+ 64 (pull request #955). 65 * remove underline ANSI in Dataset string representation (pull request #956). 66 * remove newlines from string representation (pull request #960). 67 * fix for issue #957 (size of scalar var is a float since numpy.prod(())=1.0). 68 * make sure Variable.setncattr fails to set _FillValue (issue #959). 69 * fix detection of parallel HDF5 support with netcdf-c 4.6.1 (issue #964). 70 71 version 1.5.1.2 (tag v1.5.1.2rel) 72================================== 73 * fix another slicing bug introduced by the fix to issue #906 (issue #922). 74 75 version 1.5.1.1 (tag v1.5.1.1rel) 76================================== 77 * fixed __version__ attribute (was set incorrectly in 1.5.1 release). 78 * fix for issue #919 (assigning 2d array to 3d variable with singleton 79 first dimension with v[:] = a). 80 * minimum numpy changed from 1.9.0 to 1.10.0. 81 82 version 1.5.1 (tag v1.5.1rel) 83============================== 84 * fix issue #908 by adding workaround for incorrect value returned 85 by nc_inq_var_fill for netcdf-c < 4.5.1. 86 * fix bug writing slice to unlimited dimension that is not the first 87 (leftmost). Issue #906. 88 * make sure data gets converted to type of scale_factor when add_offset=0 89 and scale_factor=1 (issue #913). 90 * fix for reading empty (NIL) string attributes (issue #915). 91 92 version 1.5.0.1 (tag v1.5.0.1rel) 93================================== 94 * binary wheels for linux and macosx rebuilt against netcdf-c 4.6.3 (instead 95 of 4.4.1.1). 96 * add read-shared mode (mode='rs'). Significantly speeds up reads of NETCDF3 97 files (pull request #902). 98 99 version 1.5.0 (tag v1.5.0rel) 100=============================== 101 * added support for parallel IO in the classic netcdf-3 formats through the 102 pnetcdf library (pull request #897). 103 104 version 1.4.3.2 (tag v1.4.3.2) 105=============================== 106 * include missing membuf.pyx file in release source tarball. 107 108 version 1.4.3.1 (tag v1.4.3.1) 109=============================== 110 * fix bug in implementation of NETCDF4_CLASSIC support for parallel IO 111 in v1.4.3 release. 112 113 version 1.4.3 (tag v1.4.3rel) 114============================= 115 * make set_always_mask work in MFDataset. 116 * fix saving diskless files to disk with netcdf-c >= 4.6.2. 117 * write to an in-memory Dataset, memoryview buffer returned by Dataset.close() 118 (issue #865, requires netcdf-c >= 4.6.2) 119 * fix performance regression when using large sequences of consecutive 120 integers for indexing with netcdf-c >= 4.6.2 (issue #870). 121 * improved error messages for ncinfo and other utilities (issue #873). 122 * fix for int64 attributes not being created for NETCDF3_64BIT_DATA (CDF5) 123 files (issue #878). 124 * fix for MPI parallel error ("NetCDF: Attempt to use feature that was not 125 turned on when netCDF was built") using netcdf-c 4.6.2 (issue #883). 126 * Added methods `set_ncstring_attrs()` to Dataset, Group and Variable that 127 forces all text attributes to be written as variable length strings (netCDF 128 type NC_STRING - issue #882). 129 * Allow parallel mode with NETCDF4_CLASSIC files (issue #890). 130 131 version 1.4.2 (tag v1.4.2rel) 132============================= 133 * add get_dims Variable method (issue #824) 134 * make sure format keyword not ignored when mode is 'ws' (issue #827) 135 * fix numpy FutureWarning (non-tuple sequence for 136 multidimensional indexing is deprecated), issue #833. 137 * add 'master_file' kwarg to MFDataset.__init__ (issue #835). 138 * always use nc_get_vars for strided access over OpenDAP (issue #838). 139 * raise FutureWarning when trying to set multi-dimensional array attribute 140 while still silently flattening the array (issue #841). Will change 141 to ValueError in next release (1.4.3). 142 * fix parallel writes when both nc4 parallel and pnetcdf parallel options 143 enabled in the netcdf-c library (issue #820). 144 * fix for writing masked scalar character variable (issue #850). 145 146 version 1.4.1 (tag v1.4.1rel) 147============================= 148 * disable workaround for slow nc_get_vars for __netcdflibversion__ >= 4.6.2, 149 since a fix was added to speed up nc_get_vars in the C library. Issue 680. 150 * new Dataset and Variable methods (set_always_mask) to optionally 151 re-enable old behaviour (return masked arrays 152 only if selected slice contains missing values) (issue #809). 153 154 version 1.4.0 (tag v1.4.0rel) 155============================= 156 * fixed bug in detection of CDF5 library support in setup.py (pull request 157 #736, issue #713). 158 * fixed reading of variables with zero-length dimensions in NETCDF3_CLASSIC 159 files (issue #743). 160 * allow integer-like objects in VLEN slices (not just python ints, issue 161 #526, pull request #757). 162 * treating _FillValue as a valid_min/valid_max was too surprising, despite 163 the fact the thet netcdf docs 'attribute best practices' suggests that 164 clients should to this. Revert this change from issue #576 (issue #761). 165 * remove netcdftime, since it is now a separate package. date2num, num2date 166 and date2index still importable from netCDF4. 167 * fix 'Unreachable code' cython warning (issue #767). 168 * Change behavior of string attributes so that nc.stringatt = ['foo','bar'] 169 produces an vlen string array attribute in NETCDF4, instead of concatenating 170 into a single string ('foobar'). In NETCDF3/NETCDF4_CLASSIC, an IOError 171 is now raised, instead of writing 'foobar'. Issue #770. 172 * fix loading of enum type names (issue #775). 173 * make sure missing_value applies only to scaled short integers if 174 auto-scaling is on (issue #777). 175 * automatically create views of compound types with character arrays as 176 numpy strings (issue #773). Can be disabled using 177 'set_auto_chartostring(False)'. Numpy structured 178 array dtypes with 'SN' string subtypes can now be used to 179 define netcdf compound types (they get converted to ('S1',N) 180 character array types automatically). 181 * always return masked array by default, even if there are no 182 masked values (too surprising to get ndarray or MaskedArray depending 183 on slice, issue #785). 184 * treat valid_min/valid_max/_FillValue/missing_value as unsigned 185 integers if _Unsigned is set (to mimic behaviour of netcdf-java). 186 Conversion to unsigned type now occurs before masking and scale/offset 187 operation. Issue #794. 188 189 190 version 1.3.1 (tag v1.3.1rel) 191============================= 192 * add parallel IO capabilities. netcdf-c and hdf5 must be compiled with MPI 193 support, and mpi4py must be installed. To open a file for parallel access, 194 use `parallel=True` in `Dataset.__init__` and optionally pass the mpi4py Comm instance 195 using the `comm` kwarg and the mpi4py Info instance using the `info` kwarg. 196 IO can be toggled between collective and independent using `Variable.set_collective`. 197 See `examples/mpi_example.py`. Issue #717, pull request #716. 198 Minimum cython dependency bumped from 0.19 to 0.21. 199 * Add optional `MFTime` calendar overload to use across all files, for example, 200 `'standard'` or `'gregorian'`. If `None` (the default), check that the calendar 201 attribute is present on each variable and values are unique across files raising 202 a `ValueError` otherwise. 203 * Allow _FillValue to be set for vlen string variables (issue #730). 204 205 version 1.3.0 (tag v1.3.0rel) 206============================== 207 * always search for HDF5 headers when building, even when nc-config is used 208 (since nc-config does not always include the path to the HDF5 headers). 209 Also use H5get_libversion to obtain HDF5 version info instead of 210 H5public.h. Fixes issue #677. 211 * encoding kwarg added to Dataset.__init__ and Dataset.filepath (default 212 is to use sys.getfilesystemencoding()) so that oddball 213 encodings (such as cp1252 on windows) can be handled in Dataset 214 filepaths (issue #686). 215 * Calls to nc_get_vars are avoided, since nc_get_vars is very slow (issue 216 #680). Strided slices are now converted to multiple calls to 217 nc_get_vara. This speeds up strided slice reads by a factor of 10-100 218 (especially for NETCDF4/HDF5 files) in most cases. In some cases, strided reads 219 using nc_get_vars are faster (e.g. strided reads over many dimensions 220 such as var[:,::2,::2,::2])), so a variable method use_nc_get_vars was added. 221 var.use_nc_get_vars(True) will tell the library to use nc_get_vars instead 222 of multiple calls to nc_get_vara, which was the default behaviour previous 223 to this change. 224 * fix utc offset time zone conversion in netcdftime - it was being done 225 exactly backwards (issue #685 - thanks to @pgamez and @mdecker). 226 * Fix error message for illegal ellipsis slicing, add test (issue #701). 227 * Improve timezone format parsing in netcdftime 228 (https://github.com/Unidata/netcdftime/issues/17). 229 * make sure numpy datatypes used to define CompoundTypes have 230 isalignedstruct flag set to True (issue #705), otherwise. 231 segfaults can occur. Fix required raising them minimum numpy requirement 232 from 1.7.0 to 1.9.0. 233 * ignore missing_value, _FillValue, valid_range, valid_min and valid_max 234 when creating masked arrays if attribute cannot be safely 235 cast to variable data type (and issue a warning). When setting 236 these attributes don't cast to variable dtype unless it can 237 be done safely and issue a warning. Issue #707. 238 239 version 1.2.9 (tag v1.2.9rel) 240============================== 241 * Fix for auto scaling and masking when _Unsigned attribute set (create 242 view as unsigned type after scaling and masking). Issue #671. 243 * Always mask values outside valid_min, valid_max (not just when 244 missing_value attribue present). Issue #672. 245 * Fix setup.py so pip install doesn't fail if cython not installed. 246 setuptools >= 18.0 now required for installation (Issue #666). 247 248 version 1.2.8 (tag v1.2.8rel) 249============================== 250 * recognize _Unsigned attribute used by netcdf-java to designate unsigned 251 integer data stored with a signed integer type in netcdf-3 (issue #656). 252 * add Dataset init memory parameter to allow loading a file from memory 253 (pull request #652, issues #406 and #295). 254 * fix for negative times in num2date (issue #659). 255 * fix for failing tests in numpy 1.13 due to changes in numpy.ma (issue #662). 256 * Checking for _Encoding attribute for NC_STRING variables, otherwise use 257 'utf-8'. 'utf-8' is used everywhere else, 'default_encoding' global module 258 variable is no longer used. getncattr method now takes optional kwarg 259 'encoding' (default 'utf-8') so encoding of attributes can be specified 260 if desired. If _Encoding is specified for an NC_CHAR ('S1') variable, 261 the chartostring utility function is used to convert the array of 262 characters to an array of strings with one less dimension (the last 263 dimension is interpreted as the length of each string) when reading the 264 data. When writing the data, stringtochar is used to convert a numpy 265 array of fixed length strings to an array of characters with one more 266 dimension. chartostring and stringtochar now also have an 'encoding' kwarg. 267 Automatic conversion to/from character to string arrays can be turned off 268 via a new set_auto_chartostring Dataset and Variable method (default 269 is True). Addresses issue #654. 270 * Cython >= 0.19 now required, _netCDF4.c and _netcdftime.c removed from 271 repository. 272 273 version 1.2.7 (tag v1.2.7rel) 274============================== 275 * fix for issue #624 (error in conversion to masked array when variable slice 276 returns a scalar). This is a regression introduced in 1.2.5 associated 277 with support for vector missing_values. Test (tst_masked5.py) added for 278 vector missing_values. 279 * fix for python 3.6 compatibility (error retrieving character _FillValue attribute, 280 issue #626). Test with python 3.6 using travis CI. 281 282 version 1.2.6 (tag v1.2.6rel) 283============================== 284 * fix some test failures on big endian PPC64 that were due to 285 errors in byte-swapping logic. Also fixed bug in enum 286 code exposed on PPC64 (issue #608). 287 * remove support for python 2.6 (it probably still will work for a while 288 though). 289 * Sometimes checking that data being assigned to a variable has 290 an 'ndim' attribute is not sufficient, instead check to see that 291 the object supports the buffer interface (issue #613). 292 * make get_variables_by_attributes work in MFDataset (issue #610) 293 The hack is also applied for set_auto_maskandscale, set_auto_scale, 294 set_automask, so these don't have to be duplicated in MFDataset (pull 295 request #571). 296 297 version 1.2.5 (tag v1.2.5rel) 298============================== 299 * Add MFDataset.set_auto_maskandscale (plus set_auto_scale, set_auto_mask). 300 Fixes issue #570. 301 * Use valid_min/valid_max/valid_range attributes when defining mask 302 (issue #576). Values outside the valid range are considered to 303 be missing when defining the mask. 304 * Fix for issue #584 (add support for dates before -4712-1-1 in 360_day 305 and 365_day calendars to netcdftime.utime). 306 * Fix for issue #593: add support for datetime.timedelta operations 307 (adding and subtracting timedelta, subtracting two datetime 308 instances to compute time duration between them), implement 309 datetime.replace() and datetime.__str__(). datetime.__repr__() 310 includes the full state of an instance. Add datetime.calendar. 311 datetime comparison operators have full accuracy now. 312 * Fix for issue #585 by increasing the size of the buffer used to store the 313 filepath. 314 * Fix for issue #592: Add support for string array attributes. (When 315 reading, a vlen string array attribute is returned as a list of 316 strings. To write, use var.setncattr_string("name", ["two", "strings"]).) 317 * Fix for issue #596 - julian day calculations wrong for negative years, 318 caused incorrect rountrip num2date(date2num(date)) roundtrip for dates with year 319 < 0. 320 * Make sure negative years work in utime.num2date (issue #596). 321 * raise NotImplementedError when trying to pickle Dataset, Variable, 322 CompoundType, VLType, EnumType and MFDataset (issue #602). 323 * Fix for issue #527: initialize vldata[i].p in Variable._get(...). 324 325 version 1.2.4 (tag v1.2.4rel) 326============================== 327 * Fix for issue #554. It is now ensured that data is in native endian 328 byte order before passing to netcdf-c library. Data read from variable 329 with non-native byte order is also byte-swapped, so that dtype remains 330 consistent with netcdf variable. Behavior now consistent with h5py. 331 * raise warning for HDF5 1.10.x (issue #549), since backwards 332 incompatible files may be created. 333 * raise AttributeError instead of RuntimeError when attribute operation 334 fails. raise IOError instead of RuntimeError when nc_create or 335 nc_open fails (issue #546). 336 * Use NamedTemporaryFile instead of deprecated mktemp in tests 337 (pull request #543). 338 * add AppVeyor automated windows tests (pull request #540). 339 340 version 1.2.3.1 (tag v1.2.3.1rel) 341================================== 342 * fix bug in setup.py (pull request #539, introduced in issue #518). 343 344 version 1.2.3 (tag v1.2.3rel) 345============================== 346 * try to avoid writing NC_STRING attributes if possible, by 347 trying to convert unicode strings to ascii and write as NC_CHAR (issue 348 #529). This preserves compatibility with clients (like Matlab) that 349 can't deal with NC_STRING attributes. A 'setncattr_string' method 350 was added for Dataset and Variable to that users can force attributes 351 to be written as NC_STRING if necessary. 352 * fix failing tests with numpy 1.11 (issues #521 and #522). 353 * fix indentation bug in nc4tonc3 utility (issue #519). 354 * add the capability in setup.py to use pkg-config instead of 355 nc-config (pull request #518). 356 * make sure slices which return scalar masked arrays 357 are consistent with numpy.ma (issue #515). 358 * add test/tst_cdf5.py and test/tst_filepath.py (to test new 359 NETCDF3_64BIT_DATA format and filepath Dataset method). 360 * expose netcdftime.__version__ (issue #504). 361 * fix potential memory leak in Dataset.filepath in attempt to fix 362 mysterious segfaults on CentOS6 (issue #506). Segfaults 363 can apparently still occur on systems like CentOS6 with old versions of glibc. 364 365 version 1.2.2 (tag v1.2.2rel) 366 ============================= 367 * fix failing tests on python 2.6 (issue #497). Change minimum required 368 python from 2.5 to 2.6. 369 * Potential memory leaks fixed by freeing string pointers internally allocated 370 in netcdf-c using nc_free_string. Also use nc_free_vlens to free space allocated 371 for vlens inside netcdf-c (issue #495). 372 * invoke str on filename argument to Dataset constructor, so pathlib 373 instances can be used (issue #489). 374 * don't use hardwired NC_MAX_DIMS or NC_MAX_VARS internally to allocate space 375 for dimension or variable ids. Instead, find out the number of dims 376 and vars and use malloc. NC_MAX_NAME is still used to allocate space 377 for attribute and variable names, since there is no obvious way to 378 determine the length of these names. 379 * if trying to write a unicode attribute, check to see if it exists 380 first and is NC_CHAR, and if so, delete it and recreate it. Workaround for C 381 lib bug discovered in issue #485. 382 * support for NETCDF3_64BIT_DATA format supported in netcdf-c 4.4.0. 383 Similar to NETCDF3_64BIT (now NETCDF3_64BIT_OFFSET), but includes 384 64 bit dimensions and sizes, plus unsigned and 64 bit integer 385 data types. 386 * make sure chunksize does not exceed dimension size 387 (for non-unlimited dimensions) on variable creation (issue #480). 388 * add 'size' attribute to Dimension (same as len(d), where 389 d is a Dimension instance, issue #477). 390 * fix bug in nc3tonc4 with --unpackshort=1 (issue #474). 391 * dates do not have to be contiguous, i.e. can be before and after the 392 missing dates in Gregorian calendar (pull request #476). 393 394 version 1.2.1 (tag v1.2.1rel) 395 ============================= 396 * add the capability to slice variables with unsorted integer sequences, 397 or integer sequences with duplicates (issue #467). This was done 398 by converting boolean array slices to integer array slices internally, 399 instead of the other way around. 400 * raise TypeError if masked array assigned to a VLEN str variable slice 401 (issue #464). 402 * Ellipsis now can be used with scalar VLEN str variables (issue #458). 403 Slicing of scalar VLEN (non-str) variables now works. 404 * Allow non-positive reference years in non-real-world calendars 405 (issue #442). 406 407 version 1.2.0 (tag v1.2.0rel) 408 ============================= 409 * Fixes to setup.py for building on windows (issue #460). 410 * warnings now issued if file being read contains unsupported 411 variables or data types (they were previously being silently 412 skipped). 413 * added 'get_variables_by_attributes' method (issue #454). 414 * check for 'units' attribute in date2index (issue #453). 415 * added support for enum types (issue #452). 416 * added 'isopen' Dataset method (issue #450). 417 * raise ValueError if year 0 or negative year used in time units string. 418 The year 0 does not exist in the Julian and Gregorian 419 calendars (issue #442). 420 421 version 1.1.9 (tag v1.1.9rel) 422 ============================= 423 * fix for issue #391 (data is already byte-swapped to native 424 endian format by the HDF4 library). 425 * fix for issue #415 (copy.deepcopy does not work on 426 netcdftime datetime object). 427 * fix for issue #420 - len(v) where v is a scalar variable returned 428 unexpected IndexError, now returns "TypeError: len() on unsized object" 429 (same as numpy does for len() on a scalar array). 430 * translate docstrings from epydoc markup to markdown, so 431 pdoc can be used (epydoc is dead). 432 * add small offset in conversion to Julian date for numerical 433 stability (more accurate round trip calculations). This offset is removed 434 in back conversion only from microseconds. Pull request #433. 435 * add detection of unsigned integers to handling of automatic 436 packing (set_auto_scale and set_auto_maskandscale) when writing. 437 Pull request #435. 438 * use USE_SETUPCFG env var to over-ride use of setup.cfg. If USE_SETUPCFG 439 evaluates to false, setup.cfg will not be used and all configuration 440 variables can be set from environment variables. Useful when using 'pip 441 install' and nc-config is broken (issue #438). 442 * fix for integer overflow in date2index (issue #444). 443 444 version 1.1.8 (tag v1.1.8rel) 445 ============================= 446 * v[...] now returns a numpy scalar array (not just a scalar) when 447 v is a scalar netcdf variable (issue #413). 448 * unix-like paths can now be used in createVariable and createGroup. 449 v = nc.createVariable('/path/to/var1',('xdim','ydim'),float) 450 will create a Variable named 'var1', while also creating the Groups 451 'path' and 'path/to' if they do not already exist. 452 Similarly, g = nc.createGroup('/path/to') acts like 'mkdir -p' in unix, creating 453 the Groups 'path' and '/path/to', if they don't already exist. 454 Users who relied on nc.createGroup(groupname) failing when the 455 group already exists will have to modify their code, since nc.createGroup 456 will now return the existing group instance. 457 Dataset.__getitem__ also added. nc['/path/to'] returns 458 a Group instance, and nc['/path/to/var1'] returns a Variable 459 instance. 460 * change minimum required numpy to 1.7.0, fix so all tests pass with 1.7.0. 461 Added travis tests for minimum required cython, numpy (issue #404). 462 * enable abbreviations to time units specification, as allowed in CF (issue 463 #402). Now, instead of just 'seconds' and 'seconds', 'secs', 'sec' and 's' 464 are also allowed (similar to minutes, days and hours). 465 * install utility scripts in utils directory with setuptools entry points 466 (pull request #392 from @mindw). Code for utilities moved 467 to netCDF4_utils.py - makes utilities more windows-friendly. 468 * make sure booleans are treated correctly in setup.cfg. Add 469 use_cython (default True) to setup.cfg. If set to False, then 470 cython will not be used to compile netCDF4.pyx (existing netCDF4.c 471 will be used instead). 472 * use "from Cython.Build import cythonize" instead of 473 "from Cython.Distutils import build_ext" in setup.py (issue #393) 474 to conform to new cython build mechanism (CEP 201, described at 475 https://github.com/cython/cython/wiki/enhancements-distutils_preprocessing). 476 * unicode attributes now written as strings, not bytes (using 477 nc_put_att_string instead of nc_put_att_text, issue #388). 478 * add __orthogonal_indexing__ attribute to Variable, Dataset and Group (issue #385) to 479 denote that Variable objects do not follow numpy indexing semantics for integer and 480 boolean array indices. 481 * make sure application of scale_factor and add_offset works correctly when 482 scale_factor not given (issue #381). 483 * add man pages for nc3tonc4, nc4tonc3, ncinfo in man directory. 484 Not installed by setup.py (contributed by Ross Gammon, issue #383). 485 * replace tabs with spaces by running reindent.py on all *.py and *.pyx files 486 (issue #378). 487 * refactor netCDF4_utils and netCDF4 module into netCDF4 package. 488 Refactoring effectively removes netCDF4 utils private attributes from 489 netCDF4 namespace, so has the potential to break code using private 490 attributes (issue #409). 491 492 version 1.1.7 (tag v1.1.7rel) 493 ============================= 494 * check to make sure cython >= 0.19 is available before trying 495 to use it (otherwise compilation with fail). Issue 367. 496 * add ipython notebooks from Unidata workshop in examples directory. 497 * fix ellipsis variable slicing regression (issue 371). 498 * release the Global Interpreter Lock (GIL) when calling the C 499 library for read operations. Speeds up multi-threaded reads 500 (issue 369). Caution - the HDF5 library may need to be compiled 501 with the threadsafe option to ensure that global data structures 502 are not corrupted by simultaneous manipulation by different threads. 503 * Make sure USE_NCCONFIG environment variable takes precedence over value 504 of use_ncconfig in setup.cfg. With this change, 'pip install netCDF4' 505 with USE_NCCONFIG=1 will use environment variables to find paths to 506 libraries and include files, instead of relying on nc-config (issue #341). 507 508 version 1.1.6 (tag v1.1.6rel) 509 ============================= 510 511 * fix for issue 353 (num2date can no longer handle units like 'hours since 512 2000-01-01 0'). 513 * fix for issue 354 (num2date no longer supports multi-dimensional arrays). 514 * fix for spurious UserWarning about endian-ness mismatch (issue 364). 515 * make calendar name keyword for num2date/date2num case insensitive 516 (issue 362). 517 * make sure units parser returns time-zone naive datetime instance that 518 includes UTC offset (issue 357). UTC offset was applied incorrectly in 519 netcdftime.date2num and num2date. No longer need to depend on 520 python-dateutil. 521 522 version 1.1.5 (tag v1.1.5rel) 523 ============================= 524 525 * add dependency on python-dateutil in setup.py and install docs. 526 * use python datetime in num2date and date2num whenever possible. Remove 527 duplicate num2date and date2num functions from netcdftime. Addresses issue 528 #344. Add microsecond capability to netcdftime.datetime. Roundtrip 529 accuracy of num2date/date2num now down to less than a millisecond. 530 * use nc-config by default to find dependencies. setup.py modified to handle failure 531 to find nc-config more gracefully (issue #340). If you wish to use env vars to point 532 to the libs, you must first move the setup.cfg file out of the way 533 (rename it to setup.cfg.save), or set USE_NCCONFIG to 0. 534 * if endian-ness of variable is specified, adjust datatype to reflect this when opening 535 a file (issue 346). 536 * fix for issue #349 (seconds outside the range 0-59 in netcdftime.num2date). 537 538 version 1.1.4 (tag v1.1.4rel) 539 ============================= 540 541 * speedup conversion of array indices to slices (issue #325). 542 * fix for issue #330 (incorrect values for seconds returned by netcdftime). 543 * fix reading of scalar vlen variables (issue #333). 544 * setting fill_value=False in createVariable for vlen and compound variables 545 now does nothing, instead of causing an error when the Dataset is closed 546 (issue #331). 547 * cython will regenerate netCDF4.c when install is run, not just build. 548 Makes 'pip install' do the right thing when cython is installed (issue #263). 549 550 version 1.1.3 (tag v1.1.3rel) 551 ============================= 552 553 * checked in _datetime.c to git (resolves issue #315). Note - _datetime.c 554 was *not* included in the 1.1.2 release. 555 * Changed __str__ to __repr__ in MFDataset, to be consistent with Dataset 556 (issue #317). IPython uses __repr__ to make use-friendly human-readable summaries 557 of objects in the terminal. 558 559 version 1.1.2 (tag v1.1.2rel) 560 ============================= 561 562 * fix for issue 312 (allow slicing with objects that can be cast to ints). 563 * indexing netCDF variables with integer sequences and boolean arrays now 564 behave the same way (integer sequences are converted to boolean arrays 565 internally). Addresses issue #300. Since indexing using integer sequences 566 does not behave exactly as before, some client code may break. For example, 567 previously when integer index arrays had the same length, and that length 568 was equal to the number of dimensions of the array being indexed, 569 netcdf4-python mirrored the numpy indexing behavior and treated the elements 570 of the index arrays as individual sets of integer indices. This special 571 case has been removed. An IndexError is now raised when the new behavior 572 would produce a different result than the old, i.e. when the 573 indices in an integer sequence are not sorted, or there are duplicate 574 indices in the sequence. 575 * fix for issue #310 (masked arrays not returned correctly when variable 576 has non native endian-ness). 577 * fix for issue #306 (slicing variable with "-1" when there is only 578 one element along that dimension). 579 * Improved speed of num2date and date2num for standard, julian, gregorian 580 and proleptic gregorian calendars by vectorizing the functions. See Issue #296 581 * Fix for issue #301 ("Datestring parser chokes on years with extra space"). 582 * Add name property for Dimension, Variable and Group instances (to access string 583 name associated with instance). 584 * Allow for null byte attributes (so _FillValue='\x00' can be set manually). 585 Issue 273. 586 * Added __repr__ (matching __str__) for all types (pull request #291). 587 IPython uses __repr__ to make use-friendly human-readable summaries 588 of objects in the terminal. 589 590 591 version 1.1.1 (tag v1.1.1rel) 592 ============================== 593 594 * make sure _FillValue is a byte for character arrays in Python 3 (issue 595 271). 596 * add numpy to install_requires in setup.py (issue #282, fixes issue #211). 597 'pip install netcdf4-python' will no longer fail if numpy not installed. 598 * Fix for issue 278 (UnicodeDecodeError reading netcdf.h from setup.py with 599 Python 3.4). 600 * Make netcdftime.datetime immutable and hashable (issue 255). 601 * Fix issue with slicing of scalar VLEN arrays (issue 270). 602 * Add set_auto_mask and set_auto_scale methods to control auto scaling and 603 auto masking separately. (issue 269). Also added set_auto_maskandscale, 604 set_auto_scale, set_auto_mask Dataset/Group methods that recursively walk 605 through all variables in the Dataset/Group. 606 * Make sure file_format attribute propagated to Group instances (issue 265). 607 * Fix for issue #259 ("Cannot use broadcasting to set all elements of a 608 Variable to a given value"). 609 610 version 1.1.0 (tag v1.1.0rel) 611 ============================= 612 613 * revert weakref change, so that previous behaviour (Dimensions and Variables 614 keep strong references to parent Dataset) is the default. New keyword 615 argument 'keepweakref' for Dataset.__init__ can be set to true to get 616 weak references. 617 618 version 1.0.9 (tag v1.0.9rel) 619 ============================= 620 621 * speed up the creation of new Group instances (issue 239). 622 623 * fix logic errors in setup.py (issue 236). 624 625 * it is now possible to create and set variable length string variables with 626 numpy string datatypes (pull request 224). 627 628 * add .travis.yml (for travis-ci testing on github), silence warnings from 629 test output (issue 225). 630 631 * modify __unicode__ for Variable and Dimension to return more useful error 632 message when Dataset object has been garbage collected. 633 634 * use weak references to group instances when creating Dimension and Variable 635 objects. This prevents cyclic references messing up garbage collection (issue 636 218, pull request 219). 637 638 * accessing values from a 0-dimensional Variable now returns a 0-dimensional 639 numpy array, not a 1-dimensional array (issue 220). To write code 640 compatible with both the old and new (fixed) behavior, wrap values accessed 641 from a 0-dimensional Variable with numpy.asscalar. 642 643 * add an __array__ method to Variable to make numpy ufuncs faster (issue 216). 644 645 * change download_url in setup.py to point to pypi instead of googlecode. 646 647 * fix for date2index error when time variable has only one entry (issue 215). 648 649 * silence warnings ("Non-trivial type declarators in shared declaration (e.g. 650 mix of pointers and values). Each pointer declaration should be on its own 651 line") with Cython 0.2. 652 653 * reduced memory usage for Variable.__getitem__ under Python 2. 654 655 version 1.0.8 (tag v1.0.8rel) 656 ============================= 657 658 * change file_format Dataset attribute to data_model (keeping file_format 659 for backward compatibility). Add disk_format attribute (underlying 660 disk format, one of NETCDF3, HDF4, HDF5, DAP2, DAP4, PNETCDF or UNDEFINED). 661 Uses nc_inq_format_extended, added in version 4.3.1 of library. If using 662 earlier version of lib, disk_format will be set to UNDEFINED. 663 664 * default _FillValue now ignored for byte data types (int8 and uint8) as per 665 http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/Fill-Values.html#Fill-Values 666 "If you need a fill value for a byte variable, it is recommended that you 667 explicitly define an appropriate _FillValue attribute, as generic utilities 668 such as ncdump will not assume a default fill value for byte variables". 669 ncinfo now returns fill mode information (issue 209). 670 671 * check to see if filling was disabled before masking data equal to 672 default fill value (issue 209). 673 674 * add variable type information to Dataset.__repr__ (output of ncinfo). 675 676 version 1.0.7 (tag v1.0.7rel) 677 ============================= 678 679 * add the ability to specify the locations of hdf4,jpeg and curl libs, in 680 case netCDF4 was built statically with HDF4 and/or OpenDAP support (issue 681 207). 682 683 * add 'ncinfo' utility (like 'ncdump -h' but less verbose). 684 685 * more information displayed when Dataset or Group instance is printed. 686 687 * fix for issue 194 (versions after 1.0.5 fail for netcdf 4.1.1, due to 688 call to nc_inq_path, which was added in netcdf 4.1.2). Fixed by adding 689 compile time API check similar to what was done for nc_rename_grp. If 690 filepath Dataset method is called an exception will be raised at runtime 691 if the module was built with netcdf < 4.1.2, or cython was not installed 692 at build time. 693 694 * fix for issues 202 and 206 (exception raised by numpy.isnan for character data types). 695 696 * if dateutils not installed and time unit accuracy < 1 second requested, have 697 netcdftime raise an ImportError. 698 699 version 1.0.6 (svn revision 1312) 700 ================================ 701 702 * issue warning of endian-ness of dtype argument does not match endian kwarg in 703 createVariable. 704 705 * make sure netcdf type NC_CHAR always returned in numpy array dtype 'S1' 706 (sometimes arrays of type 'U1' were being returned). Fixes intermittently failing 707 test tst_compoundatt.py on python 3.3. 708 709 * fix for issue 201 (if data associated with numpy array not the 710 same endian-ness as dtype, data was written incorrectly). Now 711 bytes are swapped if necessary. Variable.endian() now returns 712 'native' instead of None for NETCDF3 formatted files. createVariable 713 now enforces endian='native' for NETCDF3 files. Added tst_endian.py 714 test case. 715 716 * fix for issue 200 (library version detection failed on cygwin). 717 718 * fix for issue 199 (nc4tonc3 utility not copying global attributes). 719 720 * fix for issue 198 (setup.py chokes when no arguments given). 721 722 * fix for issue 197 (slicing of netCDF variables using lists of integers). 723 724 * create 'path' attribute for group instance using posixpath, instead 725 of os.path (to ensure the unix path is used on all platforms). Issue 196. 726 727 * fix for issue 196 (test failures on win32 due to files being deleted 728 before they are closed). 729 730 version 1.0.5 (svn revision 1278) 731 ================================ 732 733 * change setup.py to compile the Cython sources directly, if 734 cython is available. 735 This allows for "ifdef" like capability to modify source at compile time to 736 account for changes in netcdf API (e.g. the forthcoming addition of the 737 nc_rename_grp in version 4.3.1). 738 739 * added a "renameGroup" method, which raises an exception if 740 the netcdf lib version linked does not support it. Requires 741 netcdf >= 4.3.1. 742 743 * support for more than one missing value (missing_value attribute 744 is a vector) when converting to masked array. 745 746 * add 'renameAttribute' method to Dataset, Group and Variable. 747 748 * fix so that var[:] = x works if x is a scalar, and var is a netcdf variable 749 with an unlimited dimension that has shape () - i.e. no data has been 750 written to it yet. Before this change, var[:] = x did not write any data. 751 Now the scalar x will be written as the first entry in var along the 752 unlimited dimension. 753 754 * remove dos line feeds from nc3tonc4 (issue 181). 755 756 * add datatype property for Variable that returns numpy dtype for primitive 757 datatypes (same as dtype attribute) but returns CompoundType or VLType 758 instance for compound or vlen variables (issue 178). 759 760 * fix logic for deciding where to look for nc-config in setup.py (issue 177). 761 762 * issue a warning and don't try to apply scale_factor or add_offset if these 763 attributes are not convertible to floats (issue 176). 764 765 * add filepath method to Dataset instance to return file path (or opendap 766 URL) used to create Dataset (issue 172). 767 768 * fix for issue 170 (opening a remote DAP dataset fails after creating 769 a NETCDF4 formatted file). 770 771 * fix for issue 169 (error in chartostring function on 64-bit windows). 772 773 * add support for missing_value or _FillValue == NaN (issue 168). 774 775 * added a Dimension.group() method (issue 165). 776 777 version 1.0.4 (svn revision 1229) 778 ================================= 779 780 * fixed alignment bug that could cause memory corruption 781 when reading compound type variables. All users of compound 782 types should upgrade. 783 784 version 1.0.3 (svn revision 1219) 785 ================================= 786 787 * don't try to write empty data array to netcdf file (fixed failing 788 test with netcdf 4.3.0rc2). 789 790 * date2num, num2date and date2index now can handle units of microseconds and milliseconds 791 (for proleptic_gregorian calendar, or gregorian and standard calendars 792 as long as the time origin is after 1582-10-15). Issue 159. 793 794 * Added a _grp attribute to Dimension (issue 165). 795 796 * don't bundle ordereddict (issue 164). 797 798 * support reading of vlen string attributes (issue 156). 799 800 * add --vars option to nc3tonc4 (issue 154). 801 802 * Don't try to set fletcher32 checksum on scalar variables (it causes HDF5 803 to crash). Fixes issue 150. 804 805 * Add --istart/--istop options to nc3tonc4 (issue 148, courtesy of 806 Rich Signell). 807 808 * fix for proleptic_gregorian in netcdftime.py (courtesy of Matthias Cuntz). 809 810 version 1.0.2 (svn revision 1196) 811 ================================= 812 813 * disable version check for HDF5, which is broken by hdf5 1.8.10. 814 815 * make sure all files have a calendar attribute in MFTime (issue 144). 816 817 * more robust fix to issue 90 (array shape modified by assignment to 818 a netCDF variable with one more dimension), including test case. 819 820 version 1.0.1 (svn revision 1190) 821 ================================= 822 823 * fix error that occurred when retrieving data from a variable that has a 824 missing_value attribute specified as a string (issue 142). 825 826 * automatically close netcdf files when there are no references 827 left to Dataset object (using __dealloc__ method). Fixes issue 137. 828 829 * fix for slicing of scalar vlen string variables (issue 140). 830 831 * fix to allow writing of unicode data to a NC_CHAR variable. 832 833 * allow for writing of large variables (> 2**32 elements). Fixes issue 130. 834 835 version 1.0fix1 836 =============== 837 838 * fix python 3 incompatibility in setup.py (issue 125). 839 840 version 1.0 (svn revision 1164) 841 =============================== 842 * add 'aggdim' keyword to MFDataset, so the name of the dimension 843 to aggregate over can be specified (instead of using the unlimited 844 dimension). aggdim=None by default, which results in the previous 845 behavior. aggdim must be the leftmost dimension of all the variables 846 to be aggregated. 847 848 * raise IndexError when indexing a netcdf variable out of range 849 so iterating over a variable in a for loop behaves as expected 850 (as described in http://effbot.org/zone/python-for-statement.htm). 851 Fixes issue 121. 852 853 * added MacPorts portfile (so it can be installed via MacPorts 854 on macosx using a "local Portfile repository"). Installs 855 from svn HEAD using 'port install netcdf4-python'. 856 857 * added experimental 'diskless' file capability (only added to the C 858 lib after the 4.2 release). Controlled by kwarg 'diskless' to 859 netCDF4.Dataset (default False). diskless=True when creating a file 860 results in a file that exists only in memory, closing the file 861 makes the data disapper, except if persist=True keyword given in 862 which case it is persisted to a disk file on close. diskless=True 863 when opening a file creates an in-memory copy of the file for faster access. 864 865 * add the ability to specify the location of the required libs 866 (and whether to use nc-config) with setup.cfg, 867 instead of using environment variables. 868 869 * fix ISO9601 date parser so it recognizes time zone offsets in time unit 870 strings (contributed by David Hassel, issue 114, r1117). 871 872 * add setncatts Dataset,Group and Variable method to add a bunch of 873 attributes (given in a python dictionary) at once. Speeds things 874 up for NETCDF3 and NETCDF4_CLASSIC files a lot, since nc_redef/nc_enddef 875 not need to be called for each attribute (issue 85, r1113). Adding 1000 876 attributes is about 35 times faster using setncatts to add them all at once. 877 Makes no difference for NETCDF4 formatted files, since nc_redef/nc_enddef 878 is not called. 879 880 * only round after apply scale_factor and add_offset if variable type is 881 integer (issue 111, r1109). 882 883 * Fixed bug with all False Boolean index (r1107). 884 885 * added support for after, before and nearest selection method to date2index 886 fast "first guess" indexing (r1106). 887 888 * Remove white space in time units string (netcdftime._parse_date). 889 An extra space in the time units of one CMIP3 model caused an error 890 (r1105). 891 892 * based on results with examples/bench_compress2.py, change 893 default complevel for zlib compression from 6 to 4. If complevel=0, 894 turn compression off entirely (set zlib=False) (r1102). 895 896 version 0.9.9 (svn revision 1099) 897 ================================ 898 * changed default unicode encoding from "latin-1" to "utf-8", since 899 this is the python 3 default, and the only encoding that appears to 900 work for dimension and variable names. 901 902 * added test case for unicode attributes, variable and dimension names. 903 904 * fixes for unicode variable, dimension and group names. 905 906 * fix for unicode attributes in python3 (ncdump did not intrepret them as 907 text strings). Issue 107. 908 909 * add --format option to nc4tonc3 utility (can be either NETCDF3_CLASSIC or 910 NETCDF3_64BIT). Fixes issue 104. 911 912 version 0.9.8 (svn revision 1080) 913 ================================ 914 * use numpy.ma.isMA to check for masked array (instead of checking 915 for presence of 'mask' attribute). 916 917 * fixes for AIX with ibm xlc compiler. 918 919 * make sure unicode attributes don't get converted to ascii strings (issue 920 98). 921 922 version 0.9.7 (svn revision 1073) 923 ================================ 924 * Added __str__ methods to Dataset, Variable, Dimension, CompoundType, 925 VLType and MFDataset, so useful human-readable information is provided when these 926 objects are printed in an interactive session. 927 928 * don't try to apply scale_factor and offset if scale_factor=1 and 929 add_offset=0 (to avoid making copies of large arrays). 930 931 * changed netCDF4._default_fillvals to netCDF4.default_fillvals (to make part 932 of public API). Added to docs (issue 94). 933 934 version 0.9.6 (svn revision 1043) 935 ================================= 936 * changed default unicode encoding from "ascii" to "latin-1" (iso-8859-1). 937 938 * add "unicode_error" module variable to control what happens when characters 939 cannot be decoded by the encoding specified by the "default_encoding" module 940 variable (which is "ascii" by default). unicode_error = "replace" by default 941 which means bad characters are replace by "?". Previously an error was 942 raised, the old behavior can be obtained by setting unicode_error = 'strict'. 943 Fixes issue 92. 944 945 * add __enter__ and __exit__ methods so you can do "with Dataset(url) as f:" 946 (issue 89). 947 948 * don't add extra singleton dimensions to rhs numpy arrays when assigning to 949 a netcdf variable. Fixes issue 90. 950 951 * coerce missing_value attribute to same type as variable (for primitive 952 types). Fixes issue 91. 953 954 version 0.9.5 (svn revision 1031) 955 ================================ 956 * fix for compound variables on python 3.2. 957 958 * fix slicing of masked MFDataset variables (issue 83). 959 960 * round to nearest integer after packing with scale_factor and add_offset 961 (instead of truncation) (issue 84). 962 963 * if add_offset missing, but scale_factor present, assume add_offset zero. 964 if scale_factor missing, but add_offset present, assume scale_factor one. 965 (this is consistent with unidata recommendations - issue 86). 966 967 * only try to convert strings to bytes for python 3 so Dataset can 968 be subclassed (issue 87). 969 970 version 0.9.4 (svn revision 1018) 971 ================================ 972 * tested with python 2.7.1/3.1.3 using netcdf 4.1.2 and hdf5 1.8.6. 973 974 * Added a 'default_encoding' module variable that controls how unicode 975 strings are encoded into bytes. Default is 'ascii'. 976 977 * now works on Python 3. 978 979 * netCDF3 module removed. If you still need it, get it from netCDF4 0.9.3. 980 981 * regenerated C source with Cython 0.14.1. 982 983 * Added a MFTime class. Provide a unified interface to MFDataset time 984 variable using different time units. 985 986 * Fixed bug in netcdftime (issue 75) that occurs when time specified is within 987 one second of the end of the month. 988 989 * on unix-like systems, the environment variable USE_NCCONFIG can be set to 990 tell setup.py to use the nc-config script installed by netcdf to figure out 991 where all the libs and headers are (without having to specify NETCDF_DIR, 992 HDF5_DIR, etc). Only works with netcdf 4.1.2. 993 994 version 0.9.3 (svn revision 930) 995 ================================ 996 * fix chunk sizes bug (chunk sizes pointer should be size_t, not int). Fixes 997 issue 66. Added test in tst_compression.py 998 999 * fixed writing of data with missing values with scale/offset packing. Added 1000 test (tst_masked2.py). 1001 1002 * fix iso8601 regex in netcdftime date parser so it can parse 'hours since 1-1-1 ...' 1003 (year had to be 4 digits previously) 1004 1005 version 0.9.2 (svn revision 907) 1006 ================================ 1007 * fix netcdftime bug with '360_day' calendar. Fixes issue 59. 1008 1009 * make sure scalar slice of 1d variable returns array scalar (not array of 1010 shape (1,)). Fixes issue 57. 1011 1012 * updated date parser in netcdftime. Can now handle units like 1013 "seconds since 1970-01-01T00:00:00Z". 1014 1015 * added support in setup.py for specifying the locations of the HDF5/netcdf-4 headers 1016 and libs separately with environment variables (HDF5_INCDIR, HDF5_LIBDIR).i 1017 Patch contributed by Patrice Dumas. 1018 1019 * add masked array support to num2date (dates for missing times set to None). 1020 1021 * add chunk_cache keyword to createVariable. HDF5 default is 1mb, which can 1022 cause problems when creating 1000's of variables. In such cases, 1023 chunk_cache can be reduced, or set to zero. 1024 1025 * add set_var_chunk_cache and get_var_chunk_cache Variable methods. 1026 1027 * raise AttributeError when trying to set _FillValue attribute (it can only 1028 be reliably set on variable creation, using the fill_value keyword to 1029 createVariable). 1030 1031version 0.9.1 (svn revision 879) 1032================================ 1033 * raise ImportError if netcdf-4 < 4.1.1 or hdf5 <= 1.8.4. 1034 1035 * add __netcdf4libversion__ and __hdf5libversion__ module variables. 1036 1037 * make sure data is not truncated to integers before scale_factor and 1038 add_offset is applied (issue 46). 1039 1040 * fix bug in date2num with noleap calendar in netcdftime (issue 45). 1041 1042 * fix bug in 360day calendar in netcdftime (issue 44). 1043 1044 * python 2.4 compatibility restored (by modifying OrderedDict). Fixes issue 1045 37. 1046 1047 * make sure int64 attributes cast to int32 when format=NETCDF4_CLASSIC. This 1048 was causing tst_multifile.py to fail on 64-bit platforms. 1049 1050 * fix tutorial.py to cast 64 bit integers to 32 bit when writing to 32-bit 1051 integer vlen (was causing tutorial.py to fail on 64-bit platforms). 1052 1053 * remove nose dependency from tst_netcdftime.py. 1054 1055version 0.9 (svn revision 846) 1056============================== 1057 * fixed bug (issue 30) with date2index occurring with dates outside the support. 1058 1059 * make sure that auto masking works with MFDataset. 1060 1061 * fix bug (issue 34) when slicing MFDataset variables with dimensions of 1062 length 1. 1063 1064 * used ordered dictionaries for variables, dimensions, groups etc to 1065 preserve creation order (makes it easier to copy files, fixes issue 28). 1066 1067 * change auto_maskandscale default to True. This means data will 1068 automatically be converted to and from masked arrays. Data scaled as short 1069 integers using the scale_factor and add_offset attributes will also be 1070 automatically converted to/from float arrays. 1071 1072 * add setncattr, getncattr, delncattr methods (for setting/getting/deleting netcdf 1073 attributes with names that clash with the reserved python attributes). 1074 1075version 0.8.2 (svn revision 769) 1076================================ 1077 * compound type tests re-enabled. Compound and vlen types now fully 1078 supported in netcdf-4.1-beta2. 1079 1080 * make sure data retrieved from a netCDF variable is not coerced to a python 1081 scalar (it should remain a numpy scalar array). 1082 1083 * fix docs to point out that an unlimited dimension can be created by setting 1084 size to *either* None or 0 in createDimension. 1085 1086 * fix another slicing corner case. 1087 1088 * remove auto pickling/unpickling into vlen strings (too cute, sometimes 1089 produced surprising results). 1090 1091version 0.8.1 (svn revision 744) 1092================================ 1093 * added 'cmptypes' and 'vltypes' Group/Dataset attributes, which contain 1094 dictionaries that map the names of compound and vlen types to 1095 CompoundType and VLType instances. 1096 1097 * Experimental variable-length (vlen) data type support added. 1098 1099 * changes to accomodate compound types in netcdf-4.1-beta snapshots. 1100 Compound types now work correctly for snapshots >= 20090603. 1101 1102 * Added __len__ method and 'size' property to Variable class. 1103 1104 * In date2index, replaced the brute force method by the bisection method and 1105 added a 'select' keyword to find the index of the date before, after or 1106 nearest the given date. 1107 1108 * Fixed bug occurring when indexing with a numpy array of length 1. 1109 1110 * Fixed bug that occured when -1 was used as a variable index. 1111 1112 * enabled 'shared access' mode for NETCDF3 formatted files (mode='ws', 1113 'r+s' or 'as'). Writes in shared mode are unbuffered, which can 1114 improve performance for non-sequential access. 1115 1116 * fixed bug in renameVariable that caused failure when new name is longer 1117 than old name, and file format is NETCDF3_64BIT or NETCDF3_CLASSIC. 1118 1119version 0.8 (svn revision 685) 1120============================== 1121 * added 'stringtoarr' utility function for converting python strings 1122 to numpy character arrays of a specified size. 1123 1124 * initial support for compound data types (which are mapped to structured 1125 numpy arrays). Compound data types are created with the createCompoundTYpe 1126 Dataset or Group method. Both attributes and variables can be compound 1127 types. 1128 1129 * make sure 64-bit integer attributes converted to 32 bits when writing to 1130 a NETCDF3 formatted file. 1131 1132 * added nc4tonc3 utility for converted NETCDF4_CLASSIC files to NETCDF3_64BIT 1133 files (useful for sharing data with colleagues that don't have netcdf-4 1134 capable clients). 1135 1136version 0.7.7 (svn revision 626) 1137================================ 1138 1139 * David Huard reworked fancy indexing - it is now much more efficient and 1140 less of a memory hog. Now works differently than numpy fancy indexing - 1d 1141 arrays of boolean or integer indices work independently on each dimension. 1142 This enables things like: 1143 >>> tempdat = temp[[0,1,3],lats>0,lons>0] 1144 (retrieves 1st, 2nd and 4th levels, all Northern Hem. and Eastern 1145 Hem. grid points - note that this would raise an IndexError in numpy) 1146 1147* added opendap test (tst_dap.py). 1148 1149* bugfix for nc3tonc4 utility. 1150 1151* fix MFDataset.Variable. __getattr__ to raise AttributeError instead of 1152 KeyError when attribute not found. 1153 1154* netcdftime version number upped to 0.7. 1155 1156version 0.7.6 (svn revision 574) 1157================================ 1158 1159* added date2index function, courtesy of David Huard, which finds the indices 1160 in a netCDF time variable corresponding to a sequence of datetime instances. 1161 1162* make _get_att/_set_att raise AttributeError instead of RuntimeError, so that 1163 getattr(object, 'nonexistantattribute', None) works. (thanks David Huard) 1164 1165* v[:] = data now works along unlim dim, i.e. you can do this: 1166 1167 file = Dataset('test.nc', "w") 1168 file.createDimension("time", None) # unlimited dimension 1169 var = file.createVariable("var", 'd', ("time",)) 1170 # you used to have to do this 1171 #var[0:10] = numpy.arange(10) 1172 # but now you can simply do this 1173 var[:] = numpy.arange(10) 1174 1175version 0.7.5 (svn revision 549) 1176================================ 1177* return a scalar array, not a python scalar, when a slice returns a single 1178 number. This is more consistent with numpy behavior, and fixes a bug 1179 in MFDataset slicing. 1180* added 'exclude' parameter to MFDataset.__init__ 1181* added set_auto_maskandscale method to MFDataset variables. 1182 1183version 0.7.4 (svn revision 540) 1184================================ 1185* ensure all arithmetic is done with float64 in netcdftime (Rob Hetland). 1186* fixes for netcdf-4.0-beta2 ('chunking' keyword to createVariable 1187 replaced by 'contiguous'). Now works with netcdf-4.0-beta2 and hdf5-1.8.0 1188 final, but is incompatible with netcdf-4.0-beta1. 1189 1190version 0.7.3.1 (svn revision 507) 1191================================== 1192* netCDF3 docs were missing from 0.7.3. 1193* make sure quantization function preserves fill_value of masked arrays. 1194 1195version 0.7.3 (svn revision 501) 1196================================ 1197* MFnetCDF4 module merged into netCDF4 and netCDF3 (now 1198 called MFDataset). 1199* added netCDF3 module for those who can't install the netCDF 4 lib. 1200* added set_auto_maskandscale Variable method to enable automatic 1201 packing and unpacking of short integers (using scale_factor 1202 and add_offset attributes) and automatic conversion to/from 1203 masked arrays (using missing_value or _FillValue attribute) 1204 on a per-variable basis. 1205 var.set_auto_maskandscale(True) turns automatic 1206 conversion on (it is off by default). 1207* automatically pack/unpack short integer variables 1208 if scale_factor and add_offset variable attributes are set. 1209* added support for masked arrays. If you try to write a masked 1210 array to a variable with the missing_value or _FillValue attributes 1211 set, the masked array is filled with that value before being written 1212 to the file. If you read data from a variable with the missing_value 1213 or _FillValue attribute set, a masked array is returned with the 1214 appropriate values masked. 1215* added date2num and num2date functions. 1216* added capability to use 'fancy indexing' with variable objects 1217 (i.e. using sequences of integers or booleans in slices). WARNING: 1218 if a sequence of integers or booleans is used to slice a netCDF4 1219 variable, all of the data in that dimension is read into a numpy 1220 array, and then the sequence is used to slice the numpy array, 1221 returning just the requested elements to the user. This can 1222 potentially gobble a lot of memory and degrade performance 1223 (especially if 'fancy indexing' is done on the left-most dimension). 1224* added convenience functions stringtochar and chartostring for 1225 converting character arrays to arrays of fixed-length strings and 1226 vice-versa. Example usage in examples/test_stringarr.py. 1227 122820070826 - version 0.7.1 (svn revision 400) 1229=========================================== 1230* added 'endian()' and 'chunking()' Variable methods (to inquire about 1231 endian and chunking variable settings). 1232 1233* 'ndim' attribute was not public (so it couldn't be accessed from python). 1234 Fixed. 1235 1236* added 'endian' kwarg to createVariable (to set the endian-ness 1237 used in the HDF5 file). 1238 1239* can now manually set HDF5 chunksizes for each dimension at 1240 variable creation, using 'chunksizes' kwarg to createVariable. 1241 1242* added "getlibversion()" function to get info about version 1243 of netcdf-4 library used to build module. 1244 1245* if a variable has an unsupported datatype (such as 'compound', or 1246 'vlen'), then instead of raising an exception, just skip it. 1247 Print a useful error message when an attribute with an unsupported 1248 datatype is accessed. 1249 1250* if variable dimension is specified as 'dimname' or ('dimname') 1251 in createVariable, it is automatically converted to a tuple ('dimname',). 1252 Better error messages when specified dimension can't be found. 1253 1254* createVariable accepts numpy dtype object as datatype. dtype variable 1255 attribute is now a numpy dtype object. 1256 125720070723 - version 0.7 (svn revision 361) 1258========================================= 1259* renamed MFnetCDF4_classic --> MFnetCDF4. 1260 1261* eliminated netCDF4_classic module (all file formats handled by 1262 netCDF4 module now). 1263 1264* removed all user-defined data type stuff (it was hacky and made 1265 the code too complex - wait till there is a real use case to 1266 refactor and put back in). 1267 1268* added 'ndim' variable attribute (number of variable dimensions). 1269 127020070424 - version 0.6.3 (svn revision 302) 1271=========================================== 1272* passes all tests with netcdf-4.0-beta1/hdf5-1.8.0-beta1. 1273 1274* if slice index is not a slice object, assume it's an integer (and 1275 try to convert to one if it is not). This allows numpy scalar arrays 1276 to work as slice indices. 1277 1278* (netCDF4_classic only) try to make sure file is not left in 'define mode' 1279 when execption is raised. 1280 1281* if slicing a variable results in a array with shape (1,), just return 1282 a scalar (except for compound types). 1283 1284* added instructions for using the netCDF4_classic module to serve 1285 data over http with the DAP using pydap (http://pydap.org). 1286 1287* added --quiet and --chunk options to nc3tonc4. 1288 1289* Turned off zlib compression by default so as not to violate the 1290 'principle of least surprise'. Shuffle filter still activated 1291 by default when zlib compression turned on. 1292 1293* Fixed bug in fletcher32 checksum activation call. Renamed compression() 1294 variable method to filters(), include fletcher32 checksum flag in output. 1295 1296* added utility for converting GRIB1 files to compressed 1297 NETCDF4_CLASSIC files (requires PyNIO). 1298 1299* added 'compression()' variable method that returns a dict with 1300 compression filter parameter settings for that variable. (rev 237) 1301 1302* reimplemented 'shape' and 'dimensions' variable attributes as 1303 properties. 1304 1305* fixed bug when 'chunking' keyword in createVariable was set to 'sub' 1306 (caused Bus Error on MacOS X). 1307 1308* Setting 'shuffle=0' keyword in createVariable was turning off 1309 zlib compression filter instead of shuffle filter. Fixed. 1310 131120070213 - version 0.6.2 1312======================== 1313* updated for compatibility with netcdf-4.0-alpha18 and hdf5 1.8.0alpha5 1314 (shared dimensions actually work now). 1315 1316* netCDF4.createVariable can now use old single character Numeric typecodes 1317 for datatype specification. 1318 1319* Improvements to MFDataset (now called MFnetCDF4_classic) by Rob Hetland. 1320 132120061121 - version 0.6.1 1322======================== 1323* bugfixes for negative strides. 1324 1325* bugfix for empty string attributes. 1326 1327* support for shared dimensions (variables can use dimensions defined 1328 only in a parent group). This doesn't actually work yet, because of 1329 a bug in netcdf-4.0-alpha17. 1330 1331* now requires Pyrex (C source files generated on the fly when setup.py 1332 is run). 1333 133420061003 - version 0.6 1335====================== 1336* if fill_value keyword to createVariable is set to the Boolean 1337 False (not an integer that evaluates to False), no pre-filling 1338 is done for that variable. 1339 1340* updated to be compatible with netcdf-4.0-alpha17. 1341 Can now install pure-python netcdftime separately with setup-netcdftime.py. 1342 netcdftime will try to use numpy, but fall back to Numeric if numpy 1343 not installed. 1344 1345* generated source files with a version of pyrex 1346 (from http://codespeak.net/svn/lxml/pyrex/) that produces 1347 extensions compatible with python 2.5. 1348 1349* added new module for multi-file access of NETCDF3 and NETCDF4_CLASSIC 1350 files (MFDataset). Based on CDFMF from pycdf. 1351 1352* implement negative strides in variable slicing 1353 (feature missing from Scientific.IO.NetCDF). Now variables support 1354 full python extended slicing syntax. 1355 135620060925 - version 0.5.1 1357======================== 1358* on 64-bit systems integer attributes in netCDF4_classic failed, since there 1359 is no 64-bit integer data type. Fixed by downcasting to 32-bit integer. 1360 136120060920 - version 0.5 1362====================== 1363* Compound type support! (members must be fixed data primitive types - 1364 no user-defined types or NC_STRING variables allowed). Attributes 1365 are still restricted to primitive data types (no vlen or compound 1366 type attributes). 1367 1368* Assigning single values to a slice now does the Right Thing, i.e. 1369 >>> data[:] = 1 1370 fills all the elements with 1 (instead of raising an IndexError). 1371 1372* Tested with numpy 1.0b5, netcdf-4.0-alpha16, HDF5 1.7.52 alpha. 1373 1374* Added renameDimension and renameVariable methods to Dataset and Group classes. 1375 1376* netCDF attributes can be deleted using python del (i.e. 'del dset.foo'). 1377 1378* Moved examples from test and test_classic to examples and 1379 examples_classic directories. 1380 1381* Added proper unit tests (in test and test_classic directories). 1382 1383* NULL characters are removed from text attributes. 1384 1385* Variable _FillValue can be set using new keyword argument 'fill_value' 1386 to createVariable Dataset and Group method. 1387 1388* docstrings now formatted with epydoc (http://epydoc.sf.net). 1389 1390* improved Scientific.IO.NetCDF compatibility for netCDF4_classic 1391 (typecode method, ability to use old Numeric typecodes). 1392 1393* zlib=False or complevel=0 disables shuffle filter in createVariable. 1394 1395* subversion repository hosted on Google projects 1396 (http://code.google.com/p/netcdf4-python/). 1397 1398* examples_classic/bench2.py is a performance comparison with 1399 Scientific.IO.NetCDF (the numpy version provided by pynetcdf). 1400 1401* __dict__ attribute of Dataset, Group or Variable provides a python 1402 dictionary with all netCDF attribute name/value pairs (just like 1403 Scientific.IO.NetCDF). 1404 140520060710 - version 0.4.5 1406======================== 1407* fixed to work with recent svn versions of numpy 1408 1409* Now requires at least numpy 0.9.8. 1410 1411* Raise a AttributeError if user tries to rebind a private attribute 1412 (like 'variables', 'dimensions' or 'dtype'). 1413 141420060629 - version 0.4.4 1415======================== 1416* fixed to work with netcdf-4.0-alpha14. 1417 1418* automatically cast _FillValue attribute to variable type, to 1419 avoid surprising error message. 1420 142120060320 - version 0.4.3 1422======================== 1423updated netcdftime module yet again 1424added 'all_leap'/'366_day' and '360_day' calendars. 1425netCDFTime class renamed utime, fwd and inv methods 1426renamed date2num and num2date. These methods can now handle 1427numpy arrays as well as scalars. 1428a 'real' python datetime instance is returned if calendar 1429is gregorian, otherwise a 'datetime-like' instance is returned 1430(python datetime can't handle funky dates in 'all_leap' and '360_day' 1431calendars). 1432 143320060316 - version 0.4.2 1434======================== 1435udunits module replaced by pure python version, renamed 'netcdftime' 1436No longer requires udunits library. Includes 4 calendars 1437('julian','standard'/'gregorian','proleptic_gregorian','noleap'/'365_day'). 1438Calendar names and their interpretations follow the CF metadata convention. 1439 144020060310 - version 0.4.1 1441======================== 1442udunits module included for doing time conversions. 1443 144420060306 - version 0.4 1445====================== 1446 1447netCDF4_classic module can now write NETCDF3_CLASSIC, NETCDF4_64BIT 1448as well as NETCDF4_CLASSIC files. The file format is given as 1449an optional keyword to the Dataset constructor ('NETCDF4_CLASSIC' 1450is the default). Preliminary work on compound types done - but 1451awaiting the next alpha of the netCDF 4 library to complete (bugs 1452in alpha12 prevent it from working properly if the compound type 1453has fields which are arrays). 1454 145520060217 - version 0.3.1 1456======================== 1457refactored user-defined data type support - user-defined 1458data types are now described by an instance of the class 1459UserType. usertype and usertype_name keyword args 1460eliminated from createVariable. 1461 146220060214 - version 0.3 1463====================== 1464support for variable length strengths (typecode = 'S') and 1465variable-length, or 'ragged' arrays (vlen user-defined datatype). 1466Arrays of python objects can be saved as pickled strings with 1467datatype = 'S'. 1468 146920050128 - version 0.2.5 1470======================== 1471added support for scalar variables (and assignValue, getValue 1472Variable methods for Scientific.IO.NetCDF compatibility). 1473 147420051123 - version 0.2.4 1475======================== 1476numpy 0.9.4 compatibility 1477Changed data type codes from ('d', 'f', 'i', 'h', ...) to 1478('f8', 'f4', 'i4', 'i2', ...). 1479 148020050110 - version 0.2.3 1481======================== 1482added ellipsis slicing capability 1483 148420050106 - version 0.2.2 1485======================== 1486changed scipy_core to numpy. 1487 148820051228 - version 0.2.1 1489======================== 1490bugfixes, added 'nc3tonc4' utility to convert netCDF version 3 files 1491to NETCDF4_CLASSIC files (with compression). The converted files 1492can be read from netCDF 3 clients that have been re-linked to the netCDF 4 1493library. 'chunking' keyword added to createVariable in netCDF4 module. 1494 149520051224 - version 0.2 1496====================== 1497Added netCDF4_classic module - which creates files in NETCDF4_CLASSIC 1498format. These files are compatible with netCDF 3 clients which have 1499been linked against the netCDF 4 lib. This module does not use any 1500new features of the netCDF 4 API except zlib compression. Unlike 1501any other netCDF 3 python client, it can transparently compress data 1502with zlib compression and the HDF5 shuffle filter. 1503 150420051222 - version 0.1 1505====================== 1506First release. Supports groups, multiple unlimited dimensions, zlib 1507compression (plus shuffle filter and fletcher32 checksum) and all new 1508primitive data types. No support for user-defined data types yet. 1509