! !$Author$ !$Date$ !$Revision$ !$HeadURL$ ! c c subroutine orient i (sr,rdght,rdgwt,rdgspac,rdgdir, i dikeht,dikespac,depth,rdgflag) *$noereference include 'p1werm.inc' include 's1sgeo.inc' *$reference c + + + PURPOSE + + + c c This subroutine performs an oriented roughness calculation c after a tillage operation. Actually it performs a check of the c ridge flag (rdgflag) and does the coresponding manipulation c of the rigde and dike parameters. The three valid values of the c ridge flag are c 0 - operation has no effect on the ridge or dike c 1 - set all oriented roughness parameters to the implement c values. c 2 - Modify the ridges using the tillage tool values. Modification c depends on the current ridge depth and the characteristics of c tillage implement. If the modified ridge height is less than c that specified for the implement then the ridge height is c adjusted to the implement value. c c c + + + KEYWORDS + + + c oriented roughness (OR), tillage (primary/secondary) c c + + + ARGUMENT DECLARATIONS + + + c c c + + + ARGUMENT DEFINITIONS + + + c c c + + + ACCESSED COMMON BLOCK VARIABLE DEFINITIONS + + + c c c + + + PARAMETERS + + + c c + + + LOCAL VARIABLES + + + c real rdght,rdgwt,rdgspac,rdgdir,dikeht,dikespac real depth integer rdgflag,i,sr c c + + + LOCAL VARIABLE DEFINITIONS + + + c c rdght - ridge height (mm) c rdgwt - ridge width (mm) c rdgspac - ridge spacing (mm) c rdgdir - ridge direction (clockwise from true north) c dikespc - dike spacing (mm) c dikeht - dike height (mm) c depth - tillage depth (mm) c rdgflag - flag (0-3) telling what need to be done c i - interger used to increment subregion c sr - subregion number used in current run c + + + END SPECIFICATIONS + + + c c Perform the calculation of the oriented OR after a tillage c operation. c if (rdgflag.eq.0) then c do not change the current values for the oriented roughness elseif (rdgflag.eq.1) then c set the oriented roughness values equal to those specified c for the tillage tool. do 100 i=1,sr aszrgh(i)=rdght asxrgw(i)=rdgwt asxrgs(i)=rdgspac asargo(i)=rdgdir asxdks(i)=dikespac asxdkh(i)=dikeht 100 continue elseif (rdgflag.eq.2) then if ((depth/2.0).le.rdght) then do 200 i=1,sr aszrgh(i)=rdght asxrgw(i)=rdgwt asxrgs(i)=rdgspac asargo(i)=rdgdir asxdks(i)=dikespac asxdkh(i)=dikeht 200 continue else do 300 i=1,sr aszrgh(i)=aszrgh(i)-2.0*depth if (aszrgh(i).lt.rdght) then aszrgh(i)=rdght endif 300 continue endif else c print *, 'The ridge flag (for oriented roughness)' c print *, ' was not set correctly' endif end