FortranFan’s program does not need its keyword impure because the only I/O in subroutine dp_to_qp is to and from an internal file s which is local to the subroutine, by the f2018 standard C1598 in
section 15.7. I tried it successfully with both gfortran and ifort both after changing that keyword to pure and after removing it altogether. Of course the keyword pure was superfluous, by the f2018 standard 15.6.2.1 paragraph 4.