subroutine rid( * cf2cov, bbfscv, bbffcv, * bszrgh, * bsxrgs, bszrho, cumpa, dcump, bsvroc) c + + + ARGUMENT DECLARATIONS + + + real * cf2cov, bbfscv, bbffcv, * bszrgh, * bsxrgs, bszrho, cumpa, dcump, * bsvroc(*) c + + + LOCAL VARIABLES + + + real cf1rg c + + + LOCAL DEFINITIONS + + + c cf1rg - correction factor for ridge scale c RIDGE SECTION: c calculate biomass cover sheltering factor (eq. S-9 & S-10 combined) cf2cov = 1.0 - 0.6 * (bbfscv + (1.0 - bbfscv)*bbffcv) C c if ridge height is zero, skip ridge update if (bszrgh .ne. 0.0) then c calc. ridge scale factor (eq. S-8) cf1rg = (348.0 / bsxrgs)**0.3 c calculate apparent cum. precip. (eq. S-5) cumpa = ((1. - bszrgh/bszrho)/(0.034*cf1rg))**2. c update ridge height (eq. S-6) C *** debugging fix C *** write(*,*) '********* cumpa=',cumpa,'dcump',dcump,bszrgh/bszrho c if ((cumpa + dcump * cf2cov*(1.0-bsvroc(i)))*cf1rg .ge. 0.) then C *** write(*,*) 'soil3: ' ,(cumpa + dcump * cf2cov*(1.0-bsvroc(i))) C *** * *cf1rg C23456789*23456789*23456789*23456789*23456789*23456789*23456789*2345 bszrgh = bszrho * (1.0 - 0.034 * sqrt(cumpa + dcump * !errfor: (i) is undefined C *** debugging fix C *** * cf2cov * (1.0 - bsvroc(i)))*cf1rg) * cf2cov * (1.0 - bsvroc(1)))*cf1rg) C *** oedf c else c bszrgh = bszrho c write(*,*) 'soil: debugging fix executed 2' c endif C *** end of debugging fix C c check to see that minimum bszrgh/bszrho > 0.05 if not then set c the ratio to 0.05. if ((bszrgh/bszrho) .lt. 0.05) bszrgh = 0.05 * bszrho endif end