c $Header: /usr/people/flittner/radtran/tomrad/pv2.2/src/RCS/tbprnt.f,v 2.22 2000/08/30 16:38:09 flittner Exp $ subroutine tbprnt(thenot) c c last mod. Sep. 6, 1998...def c purpose: combine several commons into switches.cmn. c c last mod. Oct. 19, 1998...def c purpose: add label for debugging output. c c last mod.: Mar. 14, 2000...def c purpose: Change sb and sbp to single elements. c implicit none include 'parameter.inc' c passed real*8 thenot c commons include 'totals.cmn' include 'switches.cmn' include 'contrl.cmn' include 'out.cmn' c local integer i,j,k c c c if(thenot.ne.thnot(1)) go to 50 c c**** print current solar zenith angle,fractional back c**** scatter factor and qr values for each albedo. c if (jprint(8) .eq. 1) write(33,999) if (jprint(8) .eq. 1) write(33,1000) thenot,sb, * (qr(i),i=1,nalb) c c**** print istar/ig at top of atmosphere. c if (jprint(8) .eq. 1) write(33,1100) * (i,thta(i),tnstr(i),i=1,imu) c c 50 continue c c**** print azimuth independent terms for scattered rad. c if (jprint(8) .eq. 1) write(33,1200) thenot,fs, * gg,(i,thta(i),eizero(i,1),i=1,imu) c c**** write eiaz1 heading c if (jprint(8) .eq. 1) write(33,2000) thenot, * (azmth(i),i=1,iazmth) c c**** print eiaz1 (cos(phi) azimuth dependent term) c do 100 i=1,imu c if (jprint(8) .eq. 1) write(33,2100) thta(i), * (eiaz1(i,j),j=1,iazmth) 100 continue c c**** print eiaz2 heading c if (jprint(8) .eq. 1) write(33,2200) thenot, * (azmth(j),j=1,iazmth) c c**** print eiaz2 (cos(2*phi) dependent term) c do 200 i=1,imu c if (jprint(8) .eq. 1) write(33,2100) thta(i), * (eiaz2(i,j),j=1,iazmth) 200 continue c c**** print istar total ground reflected radiation at top c**** of atmosphere. c c inc=nalb-1 do 400 k=1,nalb if (jprint(8) .eq. 1) write(33,3200) alb(k) if (jprint(8) .eq. 1) write(33,3300) (ristar(i,k),i=1,imu) c c **** print total intensity izero+i1+i2+istar at top c **** of atmosphere for each albedo and polar look angle. c if (jprint(8) .eq. 1) write(33,3400) thenot,alb(k), * (azmth(i),i=1,iazmth) do 500 i=1,imu if (jprint(8) .eq. 1) write(33,2100) thta(i), * (total(i,j,k),j=1,iazmth) 500 continue 400 continue return 999 format('tbprt. debugging output-----') 1000 format (1h1,t50,'thnot= ',f6.2,///,1x,'sb= ', 1 4x,(d12.6,1x),//,1x,'qr(11)= ',/, 2 2(13x,5(d12.6,1x),d12.6,/)) c 1100 format (5x,'theta ',5x,' tenstr',//,(1x,i2,3x,f6.2,2x,d12.6)) 1200 format(///,1x,'azimuth angle independent data for thenot= ', 1 f6.2,//,1x,'fs= ',d12.6,5x,'gg= ',d12.6,//, 2 5x,'theta',5x,'eizero',/, 3 (1x,i2,2x,f6.2,2x,d12.6)) c 2000 format(//,11x,'theta/phi table for eiaz1 term', 1 10x,'thenot= ',f6.2,//, 2 1x,'theta',/,10x,8(f6.2,7x)) c 2100 format(1x,f6.2,8(1x,d12.6)) c 2200 format(//,11x,'theta/phi table for eiaz2 term', 1 10x,'thenot= ',f6.2,//, 2 1x,'theta',/,10x,8(f6.2,7x)) c 3000 format(/,' albedo= ',11(f4.2,1x)) c c 3200 format(/,' albedo= ',f4.2) c 3300 format(/,' istar-- total reflected intensity for ', 1 'current albedo and polar look angles',/, 2 ' ristar(15,11)= ',/,3(15x,5(d12.6,1x),/)) 3400 format(//,11x,'theta/phi table for total intensity', 1 ' for thenot= ',f6.2,' and albedo= ',f4.2,//, 2 1x,'theta ',/,10x,8(f6.2,7x)) end