Skip to content

Latest commit

 

History

History
364 lines (319 loc) · 16.8 KB

whats-new.rst

File metadata and controls

364 lines (319 loc) · 16.8 KB

What's New

v0.3 (unreleased)

Breaking Changes

  • aospy.Region no longer can be instantiated using lat_bounds and lon_bounds keywords. These have been replaced with the more explicit east_bound, west_bound, south_bound, and north_bound (266). By Spencer Hill.
  • Drop support for Python 2.7 and 3.4, since our core upstream dependency xarray is also dropping these soon (255, 280). By Spencer Hill.
  • Deprecate Constant class and constants.py module. Physical constants used internally by aospy are now stored in _constants.py (fixes 50 via 223). By Micah Kim.
  • Deprecate Units class, so now the units attribute of the Var class is a string. (fixes 50 via 222). By Micah Kim.
  • Deprecate CalcInterface class. Now, to instantiate a Calc object, pass it directly the parameters that previously would have been passed to CalcInterface (fixes 249 via 250). By Spencer Hill.
  • Deprecate utils.times.convert_scalar_to_indexable_coord, since as of xarray version 0.10.3 release, the functionality is no longer necessary (fixes 268 via 269. By Spencer Hill.

Documentation

  • Corrected link to documentation badge on repository main page (213). By DaCoEx.

Enhancements

  • Use an xarray.CFTimeIndex for dates from non-standard calendars and outside the Timestamp-valid range. This eliminates the need for the prior workaround, which shifted dates to within the range 1678 to 2262 prior to indexing (closes 98 via 273). By Spencer Clark.
  • Create utils.longitude module and Longitude class for representing and comparing longitudes. Used internally by aospy.Region to construct masks, but could also be useful for users outside the standard aospy workflow (266). By Spencer Hill.
  • Add support for Region methods mask_var, ts, av, and std for data that doesn't conform to aospy naming conventions, making these methods now useful in more interactive contexts in addition to within the standard main script-based work flow (266). By Spencer Hill.
  • Raise an exception with an informative message if submit_mult_calcs (and thus the main script) generates zero calculations, which can happen if one of the parameters is accidentally set to an empty list (closes 253 via 254). By Spencer Hill.
  • Suppress warnings from xarray when loading data whose dates extend outside the range supported by the numpy.datetime64 datatype. aospy has its own logic to deal with these cases (closes 221 via 239). By Spencer Hill.
  • Add units and description from Var objects to output netcdf files (closes 201 via 232). By Micah Kim.
  • Remove potentially confusing attributes from example netcdf files. (closes 214 via 216). By Micah Kim.
  • Cleanup logic for Dataset drop on dimensions with and without coords. Use Dataset isel instead. (closes 142 via 241). By Micah Kim.
  • Expose data_vars and coords options to xr.open_mfdataset in DataLoaders. These options control how variables and coordinates are concatenated when loaded in from multiple files; by default aospy uses data_vars='minimal' and coords='minimal', but there could be use cases where other options are desired. See the xarray documentation for more information (closes 236 via 240). By Spencer Clark.
  • Allow for variables to be functions of other computed variables (closes 3 via 263). By Spencer Clark.

Bug Fixes

  • Use the new Longitude class to support any longitude numbering convention (e.g. -180 to 180, 0 to 360, or any other) for both defining Region objects and for input data to be masked. Fixes bug wherein a region could be silently partially clipped off when masking input data with longitudes of a different numbering convention. Fixes 229 via 266. By Spencer Hill.
  • Cast input DataArrays with datatype np.float32 to np.float64 as a workaround for incorrectly computed means on float32 arrays in bottleneck (see pydata/xarray#1346). If one would like to disable this behavior (i.e. restore the original behavior before this fix), one can set the upcast_float32 keyword argument in their DataLoaders to False. Fixes 217 via 218. By Spencer Clark.
  • Switch from using scipy to netcdf4 as the engine when writing to netCDF files to avoid bugs when using libnetcdf version 4.5.0 (235). By Spencer Hill.
  • CalcSuite (and thus submit_mult_calc) now skips calculations that involve time reductions of non-time-defined variables. Calc now raises a ValueError when instantiated with a non-time-defined variable but has one or more time-defined reductions. (closes 202 via 242). By Micah Kim.

Testing

  • Create Travis CI environment that tests against the xarray development branch. (closes 224 via :pull: 226). By Micah Kim.
  • Use nbconvert and nbformat rather than runipy to test the tutorial Jupyter notebook, as runipy is deprecated (239). By Spencer Hill.
  • Add flake8 to Travis CI environment to check that new code adheres to pep8 style. Add verbose flag to pytest test suite. (closes 234 via 237). By Micah Kim.

Dependencies

  • aospy now requires a minimum version of distributed of 1.17.1 (fixes 210 via 211).
  • aospy now requires a minimum version of xarray of 0.10.6. See discussion in 199, 240, 268, 269, 273, and 275 for more details.

v0.2 (26 September 2017)

This release includes some new features plus several bugfixes. The bugfixes include some that previously made using aospy on pressure-interpolated data very problematic. We have also improved support for reading in data from the WRF and CAM atmospheric models.

As of this release, aospy has at least 2(!) confirmed regular users that aren't the original aospy developers, bringing the worldwide total of users up to at least 4. The first user-generated Github Issues have now also been created. We're a real thing!

Enhancements

  • Use dask.bag coupled with dask.distributed rather than multiprocess to parallelize computations (closes 169 via 172). This enables the optional use of an external distributed.Client to leverage computational resources across multiple nodes of a cluster. By Spencer Clark.
  • Improve support for WRF and NCAR CAM model data by adding the internal names they use for grid attributes to aospy's lists of potential names to search for. By Spencer Hill.
  • Allow a user to specify a custom preprocessing function in all DataLoaders to prepare data for processing with aospy. This could be used, for example, to add a CF-compliant units attribute to the time coordinate if it is not present in a set of files. Addresses 177 via 180. By Spencer Clark.
  • Remove dask.async import in model.py; no longer needed, and also prevents warning message from dask regarding location of get_sync function (195). By Spencer Hill.

Dependencies

  • multiprocess is no longer required for submitting aospy calculations in parallel (see discussion in 169 and pull request 172).
  • aospy now requires an installation of dask with version greater than or equal to 0.14 (see discussion in pull request 172).

Bug Fixes

  • Remove faulty logic for calculations with data coming from multiple runs. Eventually this feature will be properly implemented (fixes 117 via 178). By Spencer Hill.
  • Only run tests that require optional dependencies if those dependencies are actually installed (fixes 167 via 176). By Spencer Hill.
  • Remove obsolete operator.py module (fixes 174 via 175). By Spencer Clark.
  • Fix workaround for dates with years less than 1678 to support units attributes with a reference date years not equal to 0001 (fixes 188 via 189). By Spencer Clark.
  • Fix bug which would prevent users from analyzing a subset within the Timestamp-valid range from a dataset which included data from outside the Timestamp-valid range (fixed in 189). By Spencer Clark.
  • Toggle the mask_and_scale option to True when reading in netCDF files to enable missing values encoded as floats to be converted to NaN's (fixes 190 via 192). By Spencer Clark.
  • Force regional calculations to mask gridcell weights where the loaded datapoints were invalid instead of just masking points outside the desired region (fixes 190 via 192). By Spencer Clark.
  • Retain original input data's mask during gridpoint-by-gridpoint temporal averages (fixes 193 via 196). By Spencer Hill.
  • Always write output to a tar file in serial to prevent empty header file errors (fixes 75 via 197). By Spencer Clark.
  • Allow aospy to use grid attributes that are only defined in Run objects. Previously if a grid attribute were defined only in a Run object and not also in the Run's corresponding Model, an error would be raised (fixes 187 via 199). By Spencer Clark.
  • When input data for a calculation has a time bounds array, overwrite its time array with the average of the start and end times for each timestep. Prevents bug wherein time arrays equal to either the start or end bounds get mistakenly grouped into the wrong time interval, i.e. the wrong month or year (fixes :issue 185 via 200). By Spencer Hill.

v0.1.2 (30 March 2017)

This release improves the process of submitting multiple calculations for automatic execution. The user interface, documentation, internal logic, and packaging all received upgrades and/or bugfixes.

We also now have a mailing list. Join it to follow and/or post your own usage questions, bug reports, suggestions, etc.

Enhancements

  • Include an example library of aospy objects that works out-of-the-box with the provided example main script (155). By Spencer Clark and Spencer Hill.
  • Improve examples page of the documentation by using this new example object library (164). By Spencer Hill.
  • Improve readability/usability of the included example script aospy_main.py for submitting aospy calculations by moving all internal logic into new automate.py module (155). By Spencer Clark and Spencer Hill.
  • Enable user to specify whether or not to write output to .tar files (in addition to the standard output). Also document an error that occurs when writing output to .tar files for sufficiently old versions of tar (including the version that ships standard on MacOS), and print a warning when errors are caught during the 'tar' call (160). By Spencer Hill.

Bug fixes

  • Update packaging specifications such that the example main script and tutorial notebook actually ship with aospy as intended (fixes 149 via 161). By Spencer Hill.
  • Use the 'scipy' engine for the xarray.DataArray.to_netcdf call when writing aospy calculation outputs to disk to prevent a bug when trying to re-write to an existing netCDF file (fixes 157 via 160). By Spencer Hill.

v0.1.1 (2 March 2017)

This release includes fixes for a number of bugs mistakenly introduced in the refactoring of the variable loading step of calc.py (90), as well as support for xarray version 0.9.1.

Enhancements

  • Support for xarray version 0.9.1 and require it or a later xarray version. By Spencer Clark and Spencer Hill.
  • Better support for variable names relating to "bounds" dimension of input data files. "bnds", "bounds", and "nv" now all supported (140). By Spencer Hill.
  • When coercing dims of input data to aospy's internal names, for scalars change only the name; for non-scalars change the name, force them to have a coord, and copy over their attrs (140). By Spencer Hill.

Bug fixes

  • Fix bug involving loading data that has dims that lack coords (which is possible as of xarray v0.9.0). By Spencer Hill.
  • Fix an instance where the name for pressure half levels was mistakenly replaced with the name for the pressure full levels (126). By Spencer Clark.
  • Prevent workaround for dates outside the pd.Timestamp valid range from being applied to dates within the pd.Timestamp valid range (128). By Spencer Clark.
  • Ensure that all DataArrays associated with :pyaospy.Var objects have a time weights coordinate with CF-compliant time units. This allows them to be cast as the type np.timedelta64, and be safely converted to have units of days before taking time-weighted averages (128). By Spencer Clark.
  • Fix a bug where the time weights were not subset in time prior to taking a time weighted average; this caused computed seasonal averages to be too small. To prevent this from failing silently again, we now raise a ValueError if the time coordinate of the time weights is not identical to the time coordinate of the array associated with the :pyaospy.Var (128). By Spencer Clark.
  • Enable calculations to be completed using data saved as a single time-slice on disk (fixes 132 through 135). By Spencer Clark.
  • Fix bug where workaround for dates outside the pd.Timestamp valid range caused a mismatch between the data loaded and the data requested (fixes 138 through 139). By Spencer Clark.

v0.1 (24 January 2017)