Skip to content

Release 3.1.0

Choose a tag to compare

@ecomodeller ecomodeller released this 13 Mar 16:37
· 100 commits to main since this release

Highlights

Dimensions are now derived from geometry, ensuring that a Dataset always represents valid, writable DFS data. Previously it was possible to construct DataArrays with arbitrary dims that couldn't be stored back to a DFS file — this is no longer the case.

Breaking Changes

  • String-based time indexing removed — ds["2020-01-01"] no longer works; use .sel(time=...) instead
  • Spectral attributes removed from DataArray — use da.geometry.frequencies instead of da.frequencies
  • Non-equidistant grid selections raise ValueError — DFS files require equidistant grids; selecting non-equidistant indices would produce data that can't be written back
  • is_2d property removed from layered geometry

Deprecations (will be removed in v4.0)

  • dims parameter on DataArray constructor — dims are now derived from geometry to ensure consistency with the DFS file format
  • squeeze() — use isel() instead
  • axis='spatial' — use axis='space'
  • Implicit surface layer selection when plotting 3D data — use da.sel(layers='top').plot()

New Features

  • Dimensions derived from geometry — DataArray dims are now a computed property, guaranteeing that dimensions match the geometry and that data can always be round-tripped to a DFS file
  • Geometry0D class for time-series-only data
  • llms.txt auto-generated in docs build
  • Python 3.14 support

Bug Fixes

  • Fix quoted strings like '1E-3' being parsed as floats in PFS files
  • Fix MULTIPOLYGON quote accumulation on PFS read-write cycles
  • Fix open-ended slice crash (sel(y=slice(None, 0.0)))
  • Fix ItemInfo repr showing raw int instead of datavalue type name
  • Fix circular import in _track module
  • Fix numpy 2.4 and pandas 3.0 compatibility
  • Fix 3D geometry plot error message
  • Replace deprecated cKDTree with KDTree
  • Replace deprecated interp1d with make_interp_spline

Documentation

  • New statistics user guide (aggregations, weighted averages, exceedance probability)
  • Expanded dfs0, dfs1, dfs2, dfsu, and mesh documentation

Full Changelog: v3.0.1...v3.1.0