c This routine adjusts the burial coefficients for operation speed c and tillage depth subroutine buryadj( burycoef,mnrbc, & speed,stdspeed,minspeed,maxspeed, & depth,stddepth,mindepth,maxdepth) c argument declarations real burycoef(mnrbc) integer mnrbc real speed,stdspeed,minspeed,maxspeed real depth,stddepth,mindepth,maxdepth c argument definitions c burycoef - burial fraction coefficient to be adjusted c mnrbc - number of burial coefficients (residue burial classes) c speed - actual c stdspeed - standard, where coefficient remains unchanged c minspeed - minimum c maxspeed - maximum c depth - actual c stddepth - standard, where coefficient remains unchanged c mindepth - minimum c maxdepth - maximum c local variable declarations integer index real rspeed, rdepth real expspeed, s1speed, s2speed, expdepth parameter (expspeed = 0.5) parameter (s1speed = 0.6) parameter (s2speed = 0.4) parameter (expdepth = 2.7) c find speed adjustment parameter speed = max( min(speed, maxspeed), minspeed ) rspeed = (s1speed+s2speed*(speed/maxspeed)**expspeed)/ & (s1speed+s2speed*(stdspeed/maxspeed)**expspeed) c find depth adjustment parameter depth = max(min(depth, maxdepth), mindepth ) rdepth = (1.0-(1.0-depth/maxdepth)**expdepth)/ & (1.0-(1.0-stddepth/maxdepth)**expdepth) c adjust burial coefficients and keep within range 0 to 1 do 100 index=1,mnrbc burycoef(index) = burycoef(index)*rspeed*rdepth burycoef(index) = min( 1.0, max( 0.0, burycoef(index))) 100 continue return end