The attached pathogens calcs seem to use attachment fraction differently to expectation. The suggested edits result in a model that conserves mass exactly. Note the need to see dt in the suggested attachment code changes (which I have hardwired to 900 in the pull request, this needs t be changed).
I have also checked the timeseries of attached fraction, and if everything else is turned off (settling, mortality etc) then the attached fraction does indeed approach the user specified target as expected. I have tested this for increased and decreases in the attached fraction goal relative to the initial conditions and it works well.
Also, pth_a is not initialised to zero if not simulated in a given path group, so if such a group is set up to follow a group that does simulated attached paths, then the pth_a value from the previous group is retained and used (incorrectly) as a non zero value in calculations and diagnostics of the group that doesn't include attachment.
The attached pathogens calcs seem to use attachment fraction differently to expectation. The suggested edits result in a model that conserves mass exactly. Note the need to see dt in the suggested attachment code changes (which I have hardwired to 900 in the pull request, this needs t be changed).
I have also checked the timeseries of attached fraction, and if everything else is turned off (settling, mortality etc) then the attached fraction does indeed approach the user specified target as expected. I have tested this for increased and decreases in the attached fraction goal relative to the initial conditions and it works well.
Also, pth_a is not initialised to zero if not simulated in a given path group, so if such a group is set up to follow a group that does simulated attached paths, then the pth_a value from the previous group is retained and used (incorrectly) as a non zero value in calculations and diagnostics of the group that doesn't include attachment.