c file: decout.for subroutine decout(cd, cm, cy) c + + + PURPOSE + + + + c This subroutine writes decomposition output c + + + COMMON BLOCKS + + + *$noereference include 'p1werm.inc' include 'm1subr.inc' include 'm1flag.inc' include 'd1glob.inc' include 's1layr.inc' include 'decomp/decomp.inc' *$reference c + + + DECLARE VARIABLES + + + c integer outday(13) integer cd, cm, cy c + + + FORMATS + + + 2000 format (i2,2x,i2,'/',i2,'/',i4,' 1',1x,f5.0,1x,f7.2,1x,f7.2,1x, & f7.2,1x,f7.2,2x,f6.2,3x,f6.2,3x,2(f6.2,3x),1x,3(f6.2,3x), & /,15x,' 2',1x,f5.0,1x,f7.2,1x,f7.2,1x,f7.2,1x,f7.2,/, & 15x,' 3',23x,f7.2,1x,f7.2) 2001 format (i2,2x,i2,'/',i2,'/',i4,' 1',1x,f5.0,1x,f7.2,1x,f7.2,1x, & f7.2,1x,f7.2,2x,f6.2,3x,2(f6.2,3x),1x,3(f6.2,3x), & /,15x,' 2',1x,f5.0,1x,f7.2,1x,f7.2,1x,f7.2,1x,f7.2,/, & 15x,' 3',23x,f7.2,1x,f7.2) 2005 format (1x,'subr',2x,i2,'/',i2,'/',i4,4x,'cumddg',13x,'dmgbm', & 13x,'dmrbm',/,1x,i2,3x,'layer',7x,3(' 1',6x,' 2',8x)) 2010 format (6x,i3,4x,3(f7.2,1x,f7.2,3x)) c + + + END SPECIFICATIONS + + + c write output for subregion 1 only c standing and surface residues c test code use goto to get output for specific days only C and remove 'c' for lines following 25 and 'end if' at 2025 c buried = goto 10 c stemcts = goto 15 c sir residues = goto 20 c no outdays = goto 25 c goto 25 c Buried residue South Section experiment outdays c10 outday(1)=1 c outday(2)=34 c outday(3)=65 c outday(4)=99 c outday(5)=126 c outday(6)=161 c outday(7)=191 c outday(8)=216 c c goto 25 C STEMCT experiment OUTDAYS c15 outday(1)=18 c outday(2)=98 c outday(3)=158 c outday(4)=223 c outday(5)=289 c outday(6)=379 c c goto 25 c cc surface sir residues output days c c20 outday(1)=1 c outday(2)=34 c outday(3)=65 c outday(4)=99 c outday(5)=126 c outday(6)=161 c outday(7)=191 c outday(8)=216 c outday(9)=251 c outday(10)=279 c outday(11)=307 c outday(12)=336 c outday(13)=370 c25 continue c if(daysim.eq.outday(1)) i=1 c if(daysim.eq.outday(i)) then c output above ground data on a daily basis if ((am0dfl .eq. 1) .or. (am0dfl .eq. 3)) then write (218,2001) am0csr, cd, cm, cy, c write (218,2000) am0csr, cd, cm, cy, & stmno(1,am0csr), cumdds(1,am0csr), dmsbm(1,am0csr), & cumddf(1,am0csr), dmfbm(1,am0csr), hzcovstd, hzcovflt, dasait, & sai(1,am0csr), dmsbmtot, dmfbmtot, c & sai(1,am0csr), dmsbmtot, dmfbmtot, admbt(am0csr), & stmno(2,am0csr), cumdds(2,am0csr), dmsbm(2,am0csr), & cumddf(2,am0csr), dmfbm(2,am0csr), cumddf(3,am0csr), & dmfbm(3,am0csr) end if c output below ground residues if ((am0dfl .eq. 2) .or. (am0dfl .eq. 3)) then write(19,2005) cd, cm, cy, am0csr do 100 isz = 1, nslay(am0csr) write (19,2010) isz,cumddg(1,isz,am0csr),cumddg(2,isz,am0csr), & dmgbm(1,isz,am0csr),dmgbm(2,isz,am0csr), & dmrbm(1,isz,am0csr),dmrbm(2,isz,am0csr) 100 continue end if c root residues c write (43,2020) daysim, c &(cumddg(1,isz,1), dmrbm(1,isz,1), isz = 1,nslay(1)), c &(cumddg(2,isz,1), dmrbm(2,isz,1), isz = 1,nslay(1)) c2020 format (i3,16(2x,f6.2,1x,f5.2)) c cover estimates for flat and standing residue c2025 format (2x,i3,8x,f5.4,2x,f6.4,8x,2(f6.4,3x),3x,3(f6.4,3x)) c end if return end