When doing a restart run, particle IDs are read in from the NetCDF file but the next_id in the model is set to 1. So when new particles are created, it will start at 1 and increase. As a result, eventually different particles will share the same IDs and if these particles attempt to coagulate, the code will cause it to exit (as we test particle IDs in coagulation).
To fix this, we should set the next_id variable to the maximum value of the aero_id array +1 when inputing the aero_state for a restart.
This occurs in the fractal tests on relatively rare occasions as those tests use restart files.
When doing a restart run, particle IDs are read in from the NetCDF file but the
next_id
in the model is set to 1. So when new particles are created, it will start at 1 and increase. As a result, eventually different particles will share the same IDs and if these particles attempt to coagulate, the code will cause it to exit (as we test particle IDs in coagulation).To fix this, we should set the
next_id
variable to the maximum value of theaero_id
array +1 when inputing theaero_state
for a restart.This occurs in the fractal tests on relatively rare occasions as those tests use restart files.