Hello Penic,
The easiest method is to copy the fortran source file in your current simulation folder and then modify it. And in the CAS file, you just need to include the keyword FORTRAN FILE (it is similar to the cli or slf file for instance). It will not overwrite the binaries from your installation/compilation folder, but will just substitute the subroutine modified for the current simuation. Moreover this file can contain several subroutines, if you need to modify more than one file.
It should be possible to modify the source file directly and compile only the modified files, but it is not recommanded (except you are an expert and want your modifications to be applied to all your simulations).
Hope it helps
Luc