In the TPL, nyrRetro is read in from gmacs.dat as the # of years to drop for the retrospective analysis (0 for no retro analysis). A couple of lines later, a new variable nyrRetroNo is set equal to nyrRetro. nyrRetro is then set equal to nyr-nyrRetro (i.e., it is now the last year of the retrospective analysis). This redefinition of nyrRetro is confusing and could easily be missed when looking at the code.
Solution: Make nyrRetroNo an init_int and read it in from gmacs.dat as nyrRetro currently is. Define nyrRetro as a regular int where nyrRetroNo is currently defined and set nyrRetro = nyr-nyrRetroNo. Same result as before, but no redefinition.
In the TPL, nyrRetro is read in from gmacs.dat as the # of years to drop for the retrospective analysis (0 for no retro analysis). A couple of lines later, a new variable nyrRetroNo is set equal to nyrRetro. nyrRetro is then set equal to nyr-nyrRetro (i.e., it is now the last year of the retrospective analysis). This redefinition of nyrRetro is confusing and could easily be missed when looking at the code.
Solution: Make nyrRetroNo an init_int and read it in from gmacs.dat as nyrRetro currently is. Define nyrRetro as a regular int where nyrRetroNo is currently defined and set nyrRetro = nyr-nyrRetroNo. Same result as before, but no redefinition.