!*==asd2m.spg processed by SPAG 6.70Rc at 15:34 on 10 Dec 2012 !*------------------ SPAG Configuration Options -------------------- !*--0323,76 000101,-1 000000102011332010100002000000210211210,136 10 -- !*--1100000011112111000000000000,10,10,10,10,10,10,900,100 200000000 -- !*--000000010000000000000,72,72 73,42,38,33 00011112110000100000000 -- !*---------------------------------------------------------------------- !$Author: joelevin $ !$Date: 2011-03-24 11:33:26 -0500 (Thu, 24 Mar 2011) $ !$Revision: 11724 $ !$HeadURL: https://eweru-dev1.eweru.ksu.edu/svn/code/weps1/branches/WEPS_F90_update/weps.src/src/lib_asd/asd2m.for $ subroutine asd2m(mnot,minf,gmd,gsd,nlay,mf) use i_p1werm use i_asd use s_erf implicit none !*--ASD2M17 ! !*** Start of declarations rewritten by SPAG ! ! Dummy arguments ! integer :: nlay real,dimension(mnsz) :: gmd,gsd,minf,mnot real,dimension(msieve+1,mnsz) :: mf intent (in) gmd,gsd,minf,mnot,nlay intent (inout) mf ! ! Local variables ! real,dimension(msieve+1) :: d integer :: i,j real :: lngmd,lngsd,prev,this ! !*** End of declarations rewritten by SPAG ! ! + + + PURPOSE + + + ! This subroutine performs the inverse of subroutine m2asd. ! asd2m computes the mass fractions for each sieve cut from the ! lognormal representation of the soil aggregate size distribution. ! ! The routine decides which lognormal case to apply based on the ! value of logcas: ! ! logcas = 0 --> "normal" lognormal case (mnot = 0, minf = infinity) ! logcas = 1 --> "abnormal" lognormal case (mnot != 0, minf = infinity) ! logcas = 2 --> "abnormal" lognormal case (mnot = 0, minf != infinity) ! logcas = 3 --> "abnormal" lognormal case (mnot != 0, minf != infinity) ! ! + + + KEYWORDS + + + ! aggregate size distribution, asd, sieves, mass fractions ! ! + + + ARGUMENT DECLARATIONS + + + ! ! ! + + + ARGUMENT DEFINITIONS + + + ! mnot - minimum size aggregate (assumed value is known) ! minf - maximum size aggregate (assumed value is known) ! gmd - geometric mean diameter of aggregate size distribution ! (or transformed asd for "modified" lognormal cases) ! gsd - geometric standard deviation of aggregate size distribution ! (or transformed asd for "modified" lognormal cases) ! nlay - number of soil layers used ! mf - mass fractions of aggregates within sieve cuts ! (sum of all mass fractions are expected to = 1.0) ! ! + + + ACCESSED COMMON BLOCK VARIABLE DEFINITIONS + + + ! ! nsieve - number of sieves used ! sdia - array containing sieve size diameters ! mdia - geometric mean dia. for each sieve cut ! logcas - flag to represent which lognormal case to apply ! ! ! + + + PARAMETERS + + + ! ! + + + LOCAL VARIABLES + + + ! + + + FUNCTION DEFINITIONS + + + ! + + + LOCAL VARIABLE DEFINITIONS + + + ! ! d - transformed sieve dia. values ! (if "abnormal" lognormal cases) ! lngmd - natural log of gmd ! lngsd - natural log of gsd ! prev - contain previous sieve dia. cumulative prob ! this - contain this sieve dia. cumulative prob ! i - loop variable for sieve sizes ! j - loop variable for soil layers ! ! + + + END SPECIFICATIONS + + + do j = 1,nlay ! compute transformed sieve dia. sizes if (logcas==3) then do i = 1,nsieve if (sdia(i)