c file: nconc.for c c subroutine nconc m (po, i p5,p1, m a) c c + + + PURPOSE + + + c This subroutine computes parameters of an equation describing the c N and P relations to biomass accumulation. c c + + + ARGUMENT DECLARATIONS + + + real a, po, p5, p1 c + + + LOCAL VARIABLES + + + integer i real a5,ea,ea1,eg,pog,eg1,peg,po1,rt,pg5,fu,dfda c c + + + LOCAL VARIABLE DEFINITIONS + + + c a5 - intermediate variables for solving the N or P uptake ratios c ea - intermediate variables for solving the N or P uptake ratios c ea1 - intermediate variables for solving the N or P uptake ratios c eg - intermediate variables for solving the N or P uptake ratios c peg - intermediate variables for solving the N or P uptake ratios c po1 - intermediate variables for solving the N or P uptake ratios c rt - intermediate variables for solving the N or P uptake ratios c pg5 - intermediate variables for solving the N or P uptake ratios c fu - intermediate variables for solving the N or P uptake ratios c dfda - intermediate variables for solving the N or P uptake ratios c a = 5. do 2 i=1,10 a5=a*.5 ea=exp(a) ea1=ea-1. eg=exp(-a5) pog=po*eg eg1=exp(a5) peg=p1*(ea-eg1) po1=po*(1.-eg) rt=peg-po1 pg5=.5*pog fu=rt/ea1+pog-p5 if (abs(fu) .lt. 1.e-7) go to 3 dfda=(ea1*(p1*(ea-.5*eg1)-pg5)-ea*rt)/(ea1*ea1)-pg5 a=a-fu/dfda 2 continue c WRITE (*,4) A,FU 3 p5=(p1*ea-po)/ea1 po=po-p5 return 4 FORMAT (//T10,'NCONC DID NOT CONVERGE',2E16.6) c STOP end