moved setg subroutine to adaptive fortran module