At first I thought it would be better to write e.g. subgrid_levels.arrow if Basin / subgrid is defined. That would still write an empty file if the input table is empty or there were no timesteps. But just never writing empty tables is much easier to implement and explain, and I expect the difference not to matter in practice.
Came up in https://github.com/Deltares/Ribasim/pull/1525#discussion_r1627515435
At first I thought it would be better to write e.g.
subgrid_levels.arrow
ifBasin / subgrid
is defined. That would still write an empty file if the input table is empty or there were no timesteps. But just never writing empty tables is much easier to implement and explain, and I expect the difference not to matter in practice.