Open ecomodeller opened 6 months ago
Custom blocks are a form of metadata used in particular situations to add additional information to a dfs file.
Example of how custom blocks are added to an existing dfs2 file without custom blocks.
import mikeio import numpy as np ds = mikeio.read("tests/testdata/gebco_sound.dfs2") ds.to_dfs("new_file.dfs2", custom_blocks={"M21_Misc": np.array([327, 0.2, -900, 10, 0, 0, 0], np.float32)}, )
This PR adds support for adding custom blocks in the moment a dataset is written to a file.
Custom blocks are a form of metadata used in particular situations to add additional information to a dfs file.
Example of how custom blocks are added to an existing dfs2 file without custom blocks.
This PR adds support for adding custom blocks in the moment a dataset is written to a file.