Dear Carlos,
you need to use a source user routine, to code your arbitrary function.
If you didn’t use it before, I suggest to try the updated version: source_newgen.f
The following lecture introduces its usage, and it has some basic information on Fortran programming:
Cheers,
David