Counterfactual climate is a hypothetical climate in a world without climate change. For impact models, such climate should stay as close as possible to the observed past, as we aim to compare impact events of the past (for which we have data) to the events in the counterfactual. The difference between past impacts and counterfactual impacts is a proxy for the impacts caused by climate change.
The procedure applied to generate the ISIMIP3 counterfactual climate forcing data is described in the Counterfactual climate forcing data fact sheet.
Please find the code in this github repository.