<p>could you combine those two subroutines please</p><p>-------------------------</p><p>module evalFunction</p><p>contains</p><p>subroutine evalRHS(fH,P,Ar,D,g,f,L,H)</p><p>implicit none</p><p>real(8)::fH</p><p>real(8)::P,Ar,D,g,f,L</p><p>real(8)::H</p><p>real(8),parameter::Pi=3.14159</p><p>fH=P/Ar-Pi*D**2/(4*Ar)*sqrt(2*g*D/(F*L)*H)</p><p>end subroutine evalRHS</p><p>subroutine euler(fH,P,Ar,D,g,f,L,H0,dt,Tf,n)</p><p>implicit none</p><p>real(8)::H,Hold,Tf,fH,P,Ar,D,g,f,L,H0,dt,t</p><p>integer::i,n</p><p>open(44,file="diagnostics.txt")</p><p>write(41,*) "ema2 midterm euler test1"</p><p>open(41,file="results.txt")</p><p>write(41,*) "itime t_beg H_beg fH_beg H_end"</p><p>t=dt</p><p>H=H0</p><p>i=0</p><p>do i=1,n</p><p>Hold=H</p><p>call evalRHS(fH,P,Ar,D,g,f,L,H)</p><p>H=H+fH*dt</p><p>write(41,'(8X,I4,5X,F11.5,3X,F10.5,3X,F11.6,2X,F10.5)')i,t-dt,Hold,fH,H</p><p>t=t+dt</p><p>if(t>TF)then</p><p>write(44,*)"ALGORITHM_OK"</p><p>exit</p><p>end if</p><p>end do</p><p>close (41)</p><p>close (44)</p><p>end subroutine