Skip to content

Release 3.4.0

Latest

Choose a tag to compare

@ecomodeller ecomodeller released this 04 Nov 16:54

What's new in v3.4.0

New features

  • Area and layer selection on vertical profiles (#1103). Dfsu2DV.read(area=...), sel(area=...), sel(layers="top") and find_index(area=...) now work on a vertical profile, and sel(z=...) works on a vertical column. All of these used to raise, because profiles and columns inherited methods from the 3D mesh that only apply to a horizontal mesh.
  • Spectral geometries know their own file type (#1076). A GeometryFMAreaSpectrum or GeometryFMLineSpectrum built in code no longer needs dfsu_type=, which meant importing DfsuFileType from mikecore. Without it, printing the geometry or writing it to dfsu failed with AttributeError.

Breaking changes

  • A vertical column (GeometryFMVerticalColumn, what sel(x=..., y=...) returns on a 3D dfsu) is no longer a GeometryFM3D (#1103). It inherited the methods of a horizontal mesh, which do not apply to one water column, and sel(z=...), the selection that does apply, raised. As a result:
    • isinstance(geom, GeometryFM3D) is False for a column; check for GeometryFMVerticalColumn instead.
    • geometry2d, to_2d_geometry, boundary_polygons, boundary_polylines, contains and to_mesh are gone from columns. For the column's position use element_coordinates.
    • sel(x=..., y=...) and sel(area=...) on a column raise ValueError.
    • isel on a column that keeps one layer with keepdims=True returns a one-layer column instead of a GeometryFM2D.
    • isel with elements from several columns now returns a GeometryFM3D; it could previously return a column by mistake.

Documentation

The vertical profile notebook is now a docs example that runs on every docs build. The user guide no longer ends pages with file clean-up steps (#1072).

Full changelog: v3.3.1...v3.4.0