Repository navigation
Release 3.3.0
What's new in v3.3.0
New features
- Global options (#1039).
mikeio.set_options()/mikeio.get_options(), also usable as a context manager likexarray.set_options.display_max_itemscontrols how many item names a repr lists (Nonefor all), so a dfs0 with 60 items no longer prints justnumber of items: 60.show_progressis now the single switch for progress bars, and covers writing as well. - dfs2 custom blocks (#1007).
Dataset.custom_blocksexposes the named metadata arrays in the dfs header as adict[str, np.ndarray], andto_dfswrites them back. This is where MIKE 21 keeps the land value (M21_Misc[3]); previously a read/write round-trip dropped it, so MIKE Zero greyed the land value out and.m21fmsetups rejected the bathymetry. ~in file names is expanded (#1035), on read and write, as pandas and xarray do.ds.to_dfs("~/out.dfs0")used to create a directory literally named~without complaint.- Point selection on rotated
Grid2D(#960).contains()handles rotated grids, andDfs2.read()takesx/y, so extracting a single point from a large rotated grid no longer requires reading the whole array. - Writing to a path that cannot be created raises
OSErrorinstead of segfaulting the interpreter (#1056).
Breaking changes
- The old progress-bar switches — the
generic.show_progressmodule global and theshow_progressclass attribute on the readers — are removed in favour ofset_options(show_progress=True). Neither was documented or tested. The default is now off, sogenericfunctions no longer draw a bar unasked. - Dependency floors raised to the SPEC 0 24-month window (#1062): numpy ≥2.1, pandas ≥2.2, scipy ≥1.14, matplotlib ≥3.9, xarray ≥2024.9.
Documentation
Every public class, method and function now has a docstring, enforced by a test. New user guide pages for dfs3 and spectral dfsu, and a snow cover example for dfs2.
Full changelog: v3.2.0...v3.3.0