Closed AEdwards476 closed 4 months ago
We examined this a bit further, using another FORTRAN compiler. The differences remain, and are around 20%, but only occur for outputs of around 10**-8, which is basically zero in both cases, so shouldn't noticeably change the output of the model.
When calculating isReg all the inputs are the same (e.g., time_lag['HEWS'] in python = HWSL in Fortran and data['HREG'] in python = HREG in Fortran) yet outputs are different, so the only explanation seems to be that TANH is going wrong. Having done the calculation manually it seems that it is going wrong in Fortran.
However, TANH is only going wrong for isReg, there is no issue when using TANH to calculate consumer preferences