c c subroutine invert i (nlay,density,laythk,sand,silt,clay, i ph,magnes,sodium,calcarb,cation,exchsod, i organic,nhumus,phumus,plabile,sumbase,aggden, i drystab,soilwatr,soilair,ftnbar,thrdbar,avawatr, i satwatr,root,blwgnd, i massf) c + + + PURPOSE + + + c c This subroutine reads in the array(s) containing the components c that need to be inverted. It then calls the subroutine invproc c and the actual inversion process is performed. c c c c + + + KEYWORDS + + + c inversion, tillage *$noereference include 'p1werm.inc' include 'manage/asd.inc' *$reference c c + + + ARGUMENT DECLARATIONS + + + integer nlay real sand(mnsz),silt(mnsz),clay(mnsz),ph(mnsz), & magnes(mnsz),sodium(mnsz),calcarb(mnsz),cation(mnsz), & exchsod(mnsz),organic(mnsz),nhumus(mnsz),phumus(mnsz), & plabile(mnsz),sumbase(mnsz),aggden(mnsz),drystab(mnsz) real soilwatr(mnsz),soilair(mnsz),ftnbar(mnsz),thrdbar(mnsz), & avawatr(mnsz),satwatr(mnsz) real root(mnbpls,mnsz),blwgnd(mnbpls,mnsz) real massf(msieve+1,mnsz) real density(mnsz),laythk(mnsz) c c c + + + ARGUMENT DEFINITIONS + + + c c aggden - aggregrate density c avawatr - available soil water content c blwgnd - below ground biomass c calcarb - fraction of calcium carbonate c cation - cation exchange capcity c clay - fraction of clay c drystab - dry aggregrate stability c density - soil density c exchsod - exchangable sodium percentage c ftnbar - 15 bar soil water content c laythk - layer thickness c magnes - magnesium ion concentration c massf - mass fractions for sieve cuts c nhumus - organic N concentration of humus c nlay - number of soil layers used c organic - fraction of organic matter c ph - soil Ph c phumus - organic P concentration of humus c plabile - fraction of fertilizer P that is labile c sand - fraction of sand c silt - fraction of silt c soilair - soil air entery potential c soilwatr - soil water content (mass bases) c sumbase - sum of bases c root - root mass by layers c satwatr - saturation soil water content c sodium - sodium ion concentration c thrdbar - 1/3 bar soil water content c c + + + ACCESSED COMMON BLOCK VARIABLE DEFINITIONS + + + c c mnsz - max number of soil layers c c + + + PARAMETERS + + + c c + + + LOCAL VARIABLES + + + c integer i,j,k real dum2(mnsz) c c + + + LOCAL VARIABLE DEFINITIONS + + + c c dum2 - dummy variable containing a variable array to c be passed to the inversion process routine c i - loop variable on decomposition pools c j - loop variable on asd sieves c k - loop variable on the number of layers c c + + + END SPECIFICATIONS + + + c Make calls to the inversion process for all variables that need c to be inverted. c c************************SOIL VARIABLES******************** call invproc(nlay,laythk,sand) call invproc(nlay,laythk,silt) call invproc(nlay,laythk,clay) call invproc(nlay,laythk,ph) call invproc(nlay,laythk,magnes) call invproc(nlay,laythk,sodium) call invproc(nlay,laythk,calcarb) call invproc(nlay,laythk,cation) call invproc(nlay,laythk,exchsod) call invproc(nlay,laythk,organic) call invproc(nlay,laythk,nhumus) call invproc(nlay,laythk,phumus) call invproc(nlay,laythk,plabile) call invproc(nlay,laythk,sumbase) call invproc(nlay,laythk,aggden) call invproc(nlay,laythk,drystab) c************************SOIL VARIABLES******************** c c************************HYDROLOGY VARIABLES******************** call invproc(nlay,laythk,soilwatr) call invproc(nlay,laythk,soilair) call invproc(nlay,laythk,ftnbar) call invproc(nlay,laythk,thrdbar) call invproc(nlay,laythk,avawatr) call invproc(nlay,laythk,satwatr) c************************HYDROLOGY VARIABLES******************** c c************************ASD MASS FRACTIONS******************** c need to invert mass fractions for all sieve cuts and layers c do 170 j=1,msieve do 200 k=1,nlay dum2(k)=massf(j,k) 200 continue call invproc(nlay,laythk,dum2(1)) do 201 k=1,nlay massf(j,k)=dum2(k) 201 continue 170 continue c************************ASD MASS FRACTIONS******************** c c************************DECOMPOSITION VARIABLES******************** c need to invert both pools and layers for these next two variables do 175 i=1,mnbpls do 202 k=1,nlay dum2(k)=root(i,k) 202 continue call invproc(nlay,laythk,dum2(1)) do 203 k=1,nlay root(i,k)=dum2(k) 203 continue 175 continue do 180 i=1,mnbpls do 204 k=1,nlay dum2(k)=blwgnd(i,k) 204 continue call invproc(nlay,laythk,dum2(1)) do 205 k=1,nlay blwgnd(i,k)=dum2(k) 205 continue 180 continue c************************DECOMPOSITION VARIABLES******************** c end