subroutine updlay( * szlyd, bhrwc0, bhrwc, * seagmx, seagmn, bseags, * bhrwca, bhrwcw, * bhtsmn, bhtmx0, bhtsmx, * bsecr, * k4d, * slmin,slmax, * bslagm, * bs0ags, bslagx, bsdblk, * dcump, * bszlyt, bsdagd, bslay, bsdcr, * bsdsbk, * bhzwid) c + + + GLOBAL COMMON BLOCKS + + + *$noereference include 'p1werm.inc' *$reference c + + + ARGUMENT DECLARATIONS + + + real szlyd(0:mnsz), * bhrwc0(mnsz), bhrwc(mnsz), * seagmx(mnsz), seagmn(mnsz), bseags(0:mnsz), * bhrwca(mnsz), bhrwcw(mnsz), * bhtsmn(mnsz), bhtmx0(mnsz), bhtsmx(mnsz), * bsecr real k4d(mnsz) real slmin(mnsz),slmax(mnsz), * bslagm(0:mnsz), * bs0ags(0:mnsz), bslagx(0:mnsz), * bsdblk(0:mnsz), dcump, * bszlyt(mnsz), bsdagd(0:mnsz), * bsdcr, bsdsbk(mnsz), * bhzwid integer bslay c + + + LOCAL VARIABLES + + + real hrwc0(mnsz), hrwc1(mnsz) real c4p real k4f, k4w, c4m parameter (k4f = 1.4, k4w = 0.36) real se0, se, se1 integer ldx real chzwid c + + + LOCAL DEFINITIONS + + + c c hrwc0 - relative water content on prior day of each layer c hrwc1 - relative water content on current day of each layer c k4f - freezing process coef. to calc. aggregate stability c k4w - wetting process coef. to calc. aggregate stability c se - relative aggregate stability with partial update c se0 - relative aggregate stability prior to SOIL update c se1 - relative aggregate stability after SOIL update c + + + UPDATE LAYERS: + + + chzwid = bhzwid C *** do while ((szlyd(ldx) .le. 300.) .or. (ldx .eq. 1)) do ldx = 1, bslay c check for dry soil - then no changes if ((bhrwc(ldx) .le. bhrwcw(ldx)) .and. & (bhrwc0(ldx) .le. bhrwcw(ldx))) go to 90 call aggsta(bseags(ldx), seagmn(ldx), seagmx(ldx), * bhrwc0(ldx), bhrwc0(ldx), bhrwcw(ldx), * bhrwca(ldx), * hrwc1(ldx), bhrwc(ldx), * bhtmx0(ldx), bhtsmn(ldx), bhtsmx(ldx), k4d(ldx), * se0, k4f, se1, k4w, se) call asd(bslagm(ldx), slmin(ldx), * slmax(ldx), bhtsmx(ldx), bs0ags(ldx), * bslagx(ldx), c4p, se0, c4m, se1) call den(bsdblk(ldx), bsdsbk(ldx), * bszlyt(ldx), bsdagd(ldx), dcump, chzwid) 90 continue C *** if (szlyd(ldx) .gt. 300.) exit end do c calc. new crust stability bsecr = bseags(1) c update crust density (S-58) bsdcr = 0.576 + 0.603 * bsdsbk(1) end