Skip to content

Releases: MAVENSDC/cdflib

1.3.2

18 Nov 17:30
f6ff6ab
Compare
Choose a tag to compare

Adding anonymous s3 access to cdflib

1.3.1

14 May 19:34
Compare
Choose a tag to compare

General Updates

  • Added tox to serve as the unit testing infrastructure, and changed which unit tests were run (see the github actions to see what exactly is running)
  • Added tests to check future versions of numpy and astropy
  • Added back in the remote data unit tests

xarray_to_cdf

  • Added an ISTP check to determine is attribute and variable names are compliant

cdfwrite

  • Clearer error message surrounding data type conversions to CDF data types

1.3.0

10 May 22:42
Compare
Choose a tag to compare

General Updates

  • Added .devcontainer to support development of cdflib on github
  • Renamed the master branch to "main"
  • Added netcdf4 to the test dependencies
  • unit tests no longer test to_unixtime and from_unixtime conversions. The loss in the decimal place that occurs from floating point arithmetic causes too many issues. It may be deprecated functionality in the future.

xarray_to_cdf

  • In general, numpy types now have a 1-to-1 correspondence with CDF data types in xarray_to_cdf and cdf_to_xarray. See the documentation for more details
  • Added an ISTP check in xarray_to_cdf to verify that epochs are monotonically increasing
  • Added an ISTP check in xarray_to_cdf to determine if we need a LABL_PTR_1 or LABLAXIS
  • Added ability to manually set the CDF data type of a variable in xarray_to_cdf
  • Added checks in xarray_to_cdf to ensure all CDF_EPOCH16 variables can be cast to a complex128 data type
  • Added automatic conversion of python datetime objects to CDF time variables in xarray_to_cdf, deprecating the from_datetime and datetime_to_cdftt2000 flags
  • Added automatic conversion of numpy datetime64 arrays to CDF time variables in xarray_to_cdf, deprecating the datetime64_to_cdftt2000
  • Automatically populates the FILLVAL attribute with the appropriate ISTP compliant fillvals
  • Ignores variables attributes named "TIME_ATTRS" and "CDF_DATA_TYPE" from being written to the CDF. While these are used to modify the function's behavior, they will no longer show up in the CDF file.
  • NaNs and NaTs will automatically be converted to the appropriate FILLVAL. To keep NaNs in the cdf file, use "nan_to_fillval=False"

cdf_to_xarray

  • To help avoid some "lossy" conversion from CDF files, cdf_to_xarray will append 2 attributes to the variables in the object created. CDF_DATA_TYPE will hold the type of CDF data the variable was if it was not obvious. TIME_ATTRS contains a list of attributes that represeted time. These attributes enable better conversion of the xarray object back to a CDF file. These attributes are also automatically ignored when writing to the CDF file.
  • fillval_to_nan will now automatically convert CDF time variables to datetime64('NaT')

1.2.6

05 Mar 22:06
Compare
Choose a tag to compare

Fixing a bug that occurs in cdf_to_xarray when DEPEND_0 has a length of 1

1.2.5

02 Mar 00:07
Compare
Choose a tag to compare

Allowing lists of numpy datetime64 objects to appear in variable attributes

1.2.4

19 Feb 21:59
Compare
Choose a tag to compare

Making it more explicit that attributes given a "None" value will be skipped.

1.2.3

18 Oct 21:40
Compare
Choose a tag to compare

Minor change to xarray_to_cdf:

  • Convert FILLVAL to the same data type as the primary data when "istp=True" is specified

1.2.2

13 Oct 20:26
Compare
Choose a tag to compare

cdfwrite

  • Added some support for casting numbers correctly if they have different inputs to the CDF. For example, if CDF_REAL8 is specified as the CDF type to use but the data is given as an integer, the data will be cast to a float64 before being written to the CDF.

1.2.1

02 Oct 21:15
Compare
Choose a tag to compare
  • In the xarray_to_cdf function, added the datetime64_to_cdftt2000 to flag to convert np.datetime64 to cdftt2000
  • in the xarray_to_cdf function, made a change to the datetime converter than was causing the data to be cast as a float, losing a little precision when using datetime64 ints
  • Added unit tests for the above improvements, as well as the issue from 1.1.2 with arrays of numpy strings being read in as variable data

1.2.0

15 Sep 15:45
73974a7
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.1.2...1.2.0