I have created a user written GFOSUB subroutine. The subroutine will have a number of values passed to it from ADAMS, based on these inputs it will assign desired values to a number of global variables within the subroutine and then calculate the appropriate…