Save every nth time step without cbcpost

Hi, would like to ask there are any alternatives besides using cbcpost to save every nth timestep instead of outputting everysingle timestep to the .vtk / hdf5 file which results in it becoming quite big for longer simulations?

Thanks!

I’ve never used cbcpost, but, if you’re just looping over time steps in Python, you can always do something like

if(timestep_index % output_skip == 0):
    # (do output)

where timestep_index is some integer that is incremented each time step, and output_skip is a constant integer indicating how many time steps should be taken before each new checkpoint.

Awesome! This does the trick. Thank you!