c file name: mpoint.for subroutine mpoint (thick, thickm, nlayer) c + + + PURPOSE + + + c to claculate depth to midpoint of soil layers given layers thickness. c + + + AUTHOR + + + c Imam Elminyawi c + + + KEY WORDS + + + c wind erosion, soil processes, .... c + + + GLOBAL COMMON BLOCKS + + + *$noereference include 'p1werm.inc' *$reference c + + + ARGUMENT DECLARATIONS + + + real thick(mnsz), thickm(mnsz) integer nlayer c + + + LOCAL VARIABLES + + + integer l real sum c + + + LOCAL DEFINITIONS + + + c l - loop index c sum - sum for thickness of layers c + + + END SPECIFICATIONS + + + sum = 0.0 do 10 l = 1, nlayer thickm(l) = sum + 0.5 * thick(l) sum = sum + thick(l) 10 continue return end