      SUBROUTINE COMPSEU(DTIME,II,ITU)
      SAVE
      PARAMETER(KMX=96,KMXP=96,IMXP=21,IMXP2=IMXP+1)
      include "blank.h"
      include "solars.h"
      include "sodium.h"
      COMMON/TRAVLH/RK(50),ALP(20),RB(20),RKM(60)                       
      COMMON/WIND/UU(KMX),WW(KMX)                                       
      COMMON/OXOXOX2/O3OR(KMX,-1:IMXP2),XNOX(KMX),
     1  OOXR(KMX,-1:IMXP2),FNOX(KMX,-1:IMXP2),XNOX1,
     1  PS2B(-1:IMXP2)
      COMMON/NOZNOZ2/SNO2NO(KMXP,-1:IMXP2),RNONOZ(KMXP,-1:IMXP2),
     1  FNNOZ(KMXP,-1:IMXP2)
      COMMON/NOZTRF/XNNOZ(KMX)                                          
      COMMON/DENTRF/QNN(KMX),QNMN(KMX),QNC(KMX),QN1D(KMX),DSNCHM(KMX),  
     1DSICHM(KMX),QO3PR(KMX),E630Z(KMX),E63DR(KMX),E63N2D(KMX),         
     2E6300(KMX),QHOXO2(KMX),QHOXNO(KMX),QHOXT(KMX),PARCD(KMX),         
     3SPED(KMX),SHAL(KMX),ALAMXX(KMX),ALAMXY(KMX),XNOF(KMX),QJOUL(KMX)  
      COMMON/PERTRF/TNO(KMX),TNP(KMX),FDIFP(KMX)                        
      COMMON/EDDYTRE/FDIFO(KMX)                                         
      COMMON/WINDTRF/UN(KMX),VN(KMX),WN(KMX),UI(KMX),VI(KMX),WI(KMX)
     1,WGAM(KMX),DWGAM(KMX),UIT,VUT

      COMMON/CH4H2CO2/RJCH4(KMXP,-1:IMXP2),FK9OP(KMXP,-1:IMXP2),
     1  SCO2I(KMXP,-1:IMXP2),RSKIONS(KMXP,-1:IMXP2),
     2  RJCO2T(KMXP,-1:IMXP2),RKCO2P(KMXP,-1:IMXP2),SCOI(KMXP,-1:IMXP2)
                                                                        
      COMMON/CRATES2/RK12(KMXP,-1:IMXP2),RK13(KMXP,-1:IMXP2),
     1  RK14(KMXP,-1:IMXP2),RK15(KMXP,-1:IMXP2)
                                                                        
      COMMON/DISSHOX2/SH2OT(KMXP,-1:IMXP2),YIOP(KMXP,-1:IMXP2),
     1  YIHP(KMXP,-1:IMXP2),YIOHP(KMXP,-1:IMXP2),SH2OSRB(KMXP,-1:IMXP2),
     2  SH2OLYA(KMXP,-1:IMXP2),SH2OSRC(KMXP,-1:IMXP2),
     3  SH2OEUV(KMXP,-1:IMXP2),SHOXI(KMXP,-1:IMXP2)
                                                                        
      COMMON/FIELDS2/FT(KMXP,-1:IMXP2),FNO2(KMXP,-1:IMXP2),
     1  FNO(KMXP,-1:IMXP2),FNN2(KMXP,-1:IMXP2),FNAR(KMXP,-1:IMXP2),
     2  FNHE(KMXP,-1:IMXP2),FNNO(KMXP,-1:IMXP2),FNN2D(KMXP,-1:IMXP2),
     3  FNN4S(KMXP,-1:IMXP2),FRJ(KMXP,-1:IMXP2),FW(KMXP,-1:IMXP2),
     4  FNHOX(KMXP,-1:IMXP2),PPN2D(KMXP,-1:IMXP2),FNE(KMXP,-1:IMXP2),
     5  PPN4S(KMXP,-1:IMXP2),FK4O2P(KMXP,-1:IMXP2),
     6  FK5O2P(KMXP,-1:IMXP2),FF107,FTE(KMXP,-1:IMXP2),
     7  FDIFK(KMXP,-1:IMXP2),FU(KMXP,-1:IMXP2),FWI(KMXP,-1:IMXP2),
     8  FUI(KMXP,-1:IMXP2),FNAS(KMXP,-1:IMXP2),FNAO(KMXP,-1:IMXP2),
     9  FNAO2(KMXP,-1:IMXP2),FNAOH(KMXP,-1:IMXP2)
      COMMON/FIELDT2/FNH2O(KMXP,-1:IMXP2),FNH2O2(KMXP,-1:IMXP2),
     1  FNO1D(KMXP,-1:IMXP2),FNH2(KMXP,-1:IMXP2),FNOH(KMXP,-1:IMXP2),
     2  FNHO2(KMXP,-1:IMXP2),FNO3(KMXP,-1:IMXP2),FNH(KMXP,-1:IMXP2),
     3  FNCH4(KMXP,-1:IMXP2),FNCO(KMXP,-1:IMXP2),FNCO2(KMXP,-1:IMXP2),
     4  FNNO2(KMXP,-1:IMXP2)
                                                                        
      COMMON/FLUX2/FLUXNO(-1:IMXP2),IBNDNO,FLUXCO(-1:IMXP2),IBNDCO
                                                                        
      COMMON/H2FORG2/RJH2OLY(KMXP,-1:IMXP2)
                                                                        
      COMMON/HEFLUX2/FLUXHE(-1:IMXP2)
                                                                        
      COMMON/HOXSTUF2/HO2HR(KMXP,-1:IMXP2),OHHR(KMXP,-1:IMXP2),
     1  HHOXR(KMXP,-1:IMXP2),ANT(KMXP,-1:IMXP2),BNT(KMXP,-1:IMXP2),
     2  CNT(KMXP,-1:IMXP2),DNT(KMXP,-1:IMXP2),ASNT(KMXP,-1:IMXP2),
     3  CONPR(KMXP,-1:IMXP2),DSNT(KMXP,-1:IMXP2)
                                                                        
      COMMON/HOXUPP2/FHOX(-1:IMXP2)
                                                                        
      COMMON/IONHOX2/PHOXIC(KMX,-1:IMXP2)
                                                                        
      COMMON/NEWRAT2/HO2OH(KMXP,-1:IMXP2),HOH(KMXP,-1:IMXP2),
     1  OHHOX(KMXP,-1:IMXP2)
                                                                        
      COMMON/OPION2/FIOP(KMXP,-1:IMXP2)
                                                                        
      COMMON/PSIB2/PARB(-1:IMXP2),PHB(-1:IMXP2),PNOB(-1:IMXP2),
     1  PN4SB(-1:IMXP2),PCH4B(-1:IMXP2),PH2B(-1:IMXP2),PCO2B(-1:IMXP2),
     2  PCOB(-1:IMXP2),PHOXB(-1:IMXP2),PH2OB(-1:IMXP2)
                                                                        
                                                                        
      COMMON/PHOTOO2/XHE(-1:IMXP2),XARG(-1:IMXP2)
                                                                        
      COMMON/RATEBLK2/RKK(25,KMXP,-1:IMXP2),ALPP(10,KMXP,-1:IMXP2),
     1RBB(20,KMXP,-1:IMXP2),RKMM(50,KMXP,-1:IMXP2)
                                                                        
      COMMON/RJH2O2O2/RRJH2O2(KMXP,-1:IMXP2)
                                                                        
      COMMON/SOURCE2/FS11(KMXP,-1:IMXP2),FS12(KMXP,-1:IMXP2),
     1  FS21(KMXP,-1:IMXP2),FS22(KMXP,-1:IMXP2),FS1(KMXP,-1:IMXP2),
     2  FS2(KMXP,-1:IMXP2)
      DIMENSION DJOP(KMX),DJO2P(KMX)                                    
      COMMON/SODIUMP/PNA(KMXP,-1:IMXP2),XLNA(KMXP,-1:IMXP2),
     1XLBNA(-1:IMXP2),PNAI(KMXP,-1:IMXP2),XLNAI(KMXP,-1:IMXP2),
     2XLBNAI(-1:IMXP2),RNAO(KMXP,-1:IMXP2),RNAO2(KMXP,-1:IMXP2),
     3RNAOH(KMXP,-1:IMXP2)
      FF107=F107                                                        
      IIRX=1                                                            
      STEP=DTIME/FLOAT(IIRX)                                            
      DO 777 IIR=1,IIRX                                                 
      DO 99 K=1,KMX                                                     
      RRJH2O2(K,II)=1.E-20
      TN(K)=TNO(K)+TNP(K)                                               
      CALL RATECOE(TI(K),TE(K),TN(K))                                   
      CALL RATECOF(TI(K),TE(K),TN(K))                                   
      DO 4819 I=1,20
 4819 RKK(I,K,II)=RK(I)                                                 
      DO 4820 I=1,7                                                     
 4820 ALPP(I,K,II)=ALP(I)                                               
      DO 4821 I=1,13                                                    
 4821 RBB(I,K,II)=RB(I)                                                 
      RBB(14,K,II)=XJNO2(K)                                             
      RBB(15,K,II)=RB(15)                                               
      DO 4822 I=8,43                                                    
 4822 RKMM(I,K,II)=RKM(I)                                               
      FALP14S=0.2                                                       
      FALP12D=0.8                                                       
      FALP23P=0.15                                                      
      FALP21D=0.85                                                      
      FALP34S=0.1                                                       
      FALP32D=0.9                                                       
      BRN2D=0.6                                                         
      BRN4S=1.-BRN2D                                                    
      RBB(8,K,II)=XJNO(K)                                               
      RBB(9,K,II)=RB9(K)                                                
      QN2D=QNSPE(K)*BRN2D+QNSP(K)+QINP(K)*BRN2D                         
      QN4S=QNSPE(K)*BRN4S+QNSP(K)+QINP(K)*BRN4S                         
      PN2D=QN2D+RK(3)*XIN2P(K)*XNO(K)+ALP(1)*XINOP(K)*XNE(K)*           
     1FALP12D+ALP(3)*XIN2P(K)*XNE(K)*FALP32D                            
      PN4S=QN4S+RK(2)*XIOP(K)*XNN2(K)+RK(6)*XINP(K)*XNO2(K)+ALP(1)      
     1*XINOP(K)*XNE(K)*FALP14S+2.*ALP(3)*XIN2P(K)*XNE(K)*               
     2FALP34S+ALP(3)*XIN2P(K)*XNE(K)*FALP32D+RK(8)*XINP(K)*XNO(K)       
      EDDYC=2.0E-6                                                      
      EDDYMB=8.5E-7
      ZPMB=-9.0
      EDDYLB=8.0E-8                                                     
      EZB=-14.                                                          
      TURZP=-6.5
      FDIFK(K,II)=EDDYC*EXP(0.5*(TURZP-ZP(K)))                          
      IF(ZP(K).LE.TURZP) FDIFK(K,II)=EDDYMB*EXP(ALOG(EDDYC/EDDYMB)      
     1*(ZP(K)-ZPMB)/(TURZP-ZPMB))                                       
      IF(ZP(K).LE.ZPMB) FDIFK(K,II)=EDDYLB*EXP(ALOG(EDDYMB/EDDYLB)      
     1*(ZP(K)-ZP(1))/(ZPMB-EZB))                                        
      FDIFK(K,II)=FDIFO(K)+FDIFP(K)                                     
      FT(K,II)=TN(K)                                                    
      FTE(K,II)=TE(K)                                                   
      FNO1D(K,II)=XNO1D(K)                                              
      FRJ(K,II)=DSO2(K)                                                 
      FW(K,II)=WW(K)                                                    
      FU(K,II)=UU(K)                                                    
      PPN2D(K,II)=PN2D                                                  
      FNE(K,II)=XNE(K)                                                  
      PPN4S(K,II)=PN4S                                                  
      FK4O2P(K,II)=RK(4)*XIO2P(K)                                       
      FK5O2P(K,II)=RK(5)*XIO2P(K)                                       
      FK9OP(K,II)=RK(9)*XIOP(K)                                         
      RSKIONS(K,II)=RK(13)*XIOP(K)+RK(14)*XIN2P(K)                      
      SCOI(K,II)=RK(13)*XIOP(K)*XNCO2(K)                                
      SCO2I(K,II)=1.E-20                                                
      RJCH4(K,II)=DCH4LYA(K)+DCH4EUV(K)                                 
      RKCO2P(K,II)=DCO2LYA(K)+DCO2SRC(K)+DCO2SRB(K)                     
      RJCO2T(K,II)=DCO2LYA(K)+DCO2SRC(K)+DCO2SRB(K)+DCO2EUV(K)          
      SH2OT(K,II)=DH2OT(K)                                              
      YIOP(K,II)=XIOP(K)                                                
      YIHP(K,II)=XIHP(K)                                                
      YIOHP(K,II)=1.E-20                                                
      SH2OSRB(K,II)=DH2OSRB(K)                                          
      SH2OSRC(K,II)=DH2OSRC(K)                                          
      SH2OEUV(K,II)=DH2OEUV(K)                                          
      SH2OLYA(K,II)=DH2OLYA(K)                                          
      SHOXI(K,II)=QHOXI(K)                                              
      RJH2OLY(K,II)=DH2OLYA(K)                                          
      PHOXIC(K,II)=(QHOXO2(K)+QHOXNO(K))*QTIN(K)                        
      FIOP(K,II)=XIOP(K)*RK(22)                                         
      XM=XNO(K)+XNO2(K)+XNN2(K)                                         
      XNOX(K)=XNO(K)+XNO3(K)
      XNNOZ(K)=XNNO(K)+XNNO2(K)                                         
      FNOX(K,II)=XNOX(K)
      FNNOZ(K,II)=XNNOZ(K)
      FM=XNO(K)+XNO2(K)+XNN2(K)                                         
      DJOP(K)=QOP(K)/XNO(K)                                             
      DJO2P(K)=QO2P(K)/XNO2(K)                                          
      O3OR(K,II)=RKM(13)*XNO2(K)*FM/(DO3HAR(K)+DO3HUG(K)+DO3CHAP(K)+
     1  RKM(21)*XNOH(K)+RKM(26)*XNHO2(K)+RKM(29)*XNH(K)+RB(11)*XNNO(K)+
     2  RKM(16)*XNO(K))
      SS=O3OR(K,II)
      OOXR(K,II)=1./(1.+O3OR(K,II))
      RR=OOXR(K,II)
      A4=0.12*DH2OLYA(K)*XNH2O(K)+RKM(22)*XNOH(K)*XNOH(K)+RKM(32)*      
     1XNH(K)*XNHO2(K)+RB(3)*XN4S(K)*XNNO(K)+RB(6)*XN2D(K)*XNNO(K)+(     
     2XJNO(K)+RBB(9,K,II))*XNNO(K)+XJNO2(K)*XNNO2(K)+RK(4)*XIO2P(K)     
     2*XN4S(K)                                                          
     3+RK(7)*XINP(K)*XNO2(K)+RK(10)*XIOP(K)*XN2D(K)+RK(12)*XIOP(K)*     
     4XNH(K)+ALP(1)*XINOP(K)*XNE(K)+2.*ALP(2)*XIO2P(K)*XNE(K)           
      A5=2.*(DSO2SR(K)+DSO2SRB(K)+DSO2LYA(K))+RB(1)*XN4S(K)             
     1+RB(2)*XN2D(K)+RK(1)*XIOP(K)                                      
      B1=RKM(10)*XNH2O(K)*XNO1D(K)+RKM(11)*XNH2(K)*XNO1D(K)             
      B2=2.*RKM(16)*SS*RR*RR                                            
      B3=RKM(21)*XNOH(K)*SS*RR+RKM(26)*XNHO2(K)*SS*RR+RKM(29)*XNH(K)*SS 
     1*RR+RKM(17)*XNOH(K)*RR+RKM(18)*XNHO2(K)*RR+RB(11)*XNNO(K)*SS*RR+  
     2RB(13)*XNNO2(K)*RR+RB(15)*XNNO2(K)*SS*RR+DJOP(K)*RR+              
     3RKM(40)*FM*XNCO(K)*RR                                             
      C1=2.*RKM(16)*SS*RR*RR                                            
      C2=RKM(17)*XNOH(K)*RR+(DO3HAR(K)+DO3HUG(K)+DO3CHAP(K))*SS*RR+     
     1RKM(18)*XNHO2(K)*RR+RKM(21)*XNOH(K)*SS*RR+2.*RKM(26)*XNHO2(K)*SS  
     2*RR+RKM(29)*XNH(K)*SS*RR+RB(11)*XNNO(K)*SS*RR                     
     3+RB(13)*XNNO2(K)*RR                                               
      C3=RKM(23)*XNOH(K)*XNHO2(K)+RKM(27)*XNHO2(K)*XNHO2(K)+RKM(30)*    
     1XNH(K)*XNHO2(K)+RK(5)*XNNO(K)*XIO2P(K)                            
      D1=RKM(28)*FM*XNH(K)+RB(1)*XN4S(K)+RB(2)*XN2D(K)+RK(1)*XIOP(K)    
     1+RK(6)*XINP(K)+RK(7)*XINP(K)+RK(21)*XIN2P(K)+(DSO2SR(K)+DSO2SRB(K)
     2+DSO2LYA(K))+DJO2P(K)                                             
  900 FORMAT(1X,*I AM HERE*)                                            
      IF(K.GT.1) GO TO 993                                              
      B2=B2+2.*RKM(12)*FM*RR*RR                                         
      B4=B1-A4-A5*XNO2(1)                                               
      XNOX1=(-B3+SQRT(B3*B3-4.*B2*B4))/(2.*B2)                          
      XNOXS=XNOX1                                                       
      XNO(1)=XNOXS*OOXR(1,II)
      XNO3(1)=O3OR(1,II)*XNO(1)
      PS2B(II)=(XNO(1)*16.+XNO3(1)*48.)/(XNO2(1)*32.+XNN2(1)*28.)
  993 CONTINUE                                                          
      FS11(K,II)=-D1                                                    
      FS12(K,II)=C2+C1*XNOX(K)
      FS21(K,II)=A5                                                     
      FS22(K,II)=-B3-B2*XNOX(K)
      FS1(K,II)=C3                                                      
      FS2(K,II)=A4-B1                                                   
C******************************************************************
C NEUTRAL SODIUM IN THE ARGON SLOT
      XJNAP=2.0E-5
      RKSI1=1.4E-9
      RKSI2=1.0E-9
      RKSI3=6.2E-10
      RKC1=2.5E-31*(200./TN(K))**1.6
      RKCM1=1.4E-15
      RKC2=3.2E-29
      RKCM2=1.2E-17
      RKC3=1.0E-9
      RKC4=1.0E-9
      RKC5=1.2E-6
      RKC6=1.2E-6
      RKSI4=0.
      RKSI5=0.
      RKS1=1.5E-9*EXP(-220./TN(K))
      RKS2=0.3E-9*EXP(-383./TN(K))
      RKS2S=1.2E-9*EXP(-383./TN(K))
      RKS2T=RKS2+RKS2S
      RKS3=4.7E-30*(200./TN(K))**1.22
      XJNAO2=4.0E-3
      XJNAOH=1.0E-3
      RKS6=1.0E-9*EXP(-1300./TN(K))
      RKS7=8.0E-10*EXP(-374./TN(K))
      RKS8=1.5E-9*EXP(636./TN(K))
      RKS8S=3.2E-10*EXP(-550./TN(K))
      RKS8T=RKS8+RKS8S
      RKS9=3.0E-10*EXP(-668./TN(K))
      RKS10=1.0E-10
      RKS11=3.E-10*EXP(-2000./TN(K))
      RKS12=5.E-10*EXP(-1000./TN(K))
      XM=XNO(K)+XNO2(K)+XNN2(K)
C     XNAOP(K)=RKSI4*XNO3(K)*XNASP(K)/(RKSI5*XNE(K))
      XNAPN2(K)=RKC1*XNN2(K)*XM*XNASP(K)/(RKC3*XNCO2(K)+RKCM1*XM)
      XNAPCO2(K)=(RKC2*XNCO2(K)*XM*XNASP(K)+RKC3*XNCO2(K)*XNAPN2(K))
     1/(RKCM2*XM+RKC4*XNH2O(K)+RKC5*XNE(K))
      XNAPH2O(K)=RKC4*XNH2O(K)*XNAPCO2(K)/(RKC6*XNE(K))
C     AS=2.E-3
C     AS=2.E-2
C     ZPS=100.
C     H1S=24.
C     H2S=40.
C     PNAM(K)=AS*EXP(-((ZPHT(K)-ZPS)/H1S)**2)*EXP((ZPHT(K)-ZPS)/H2S)
      AS=1.E-4
      ZPSS=89.
      H1SS=3.
      PNAM(K)=AS*EXP(-((ZPHT(K)-ZPSS)/H1SS)**2)
      A1=XJNAO2+RKS6*XNO(K)+RKS10*XNOH(K)+RKS11*XNH(K)
      B1=RKS1*XNO3(K)
      B2=RKS6*XNO(K)*RKS3*XNO2(K)*XNN2(K)/A1
      B3=RKS2T*XNO(K)+RKS7*XNH2O(K)+RKS8T*XNO3(K)+RKS9*XNH(K)
     1-RKS6*XNO(K)*RKS8*XNO3(K)/A1
      A3=(B1+B2)/B3
      B4=RKS3*XNO2(K)*XNN2(K)
      A2=(B4+RKS8*XNO3(K)*(B1+B2)/B3)/A1
      A4=(RKS7*XNH2O(K)*A3+(RKS10*XNOH(K)+RKS11*XNH(K))*A2)/(RKS12*
     1XNH(K)+XJNAOH)
      PNAS(K)=PNAM(K)+RKC5*XNE(K)*XNAPCO2(K)+RKC6*XNE(K)*XNAPH2O(K)
     1+RKSI5*XNE(K)*XNAOP(K)
      XLNAS(K)=XJNAP+RKSI1*XIO2P(K)+RKSI2*XINOP(K)+RKSI3*XIN2P(K)
     1+RKS1*XNO3(K)+RKS3*XNO2(K)*XNN2(K)-((RKS2T*XNO(K)+RKS8S*XNO3(K)
     2+RKS9*XNH(K))*A3+XJNAO2*A2+(XJNAOH+RKS12*XNH(K))*A4)
C     XLNAS(K)=XJNAP+RKSI1*XIO2P(K)+RKSI2*XINOP(K)+RKSI3*XIN2P(K)
      IF(K.EQ.1) XLBNA(II)=PNAS(K)/XLNAS(K)
      PNA(K,II)=PNAS(K)
      XLNA(K,II)=XLNAS(K)
      RNAO(K,II)=A3
      RNAO2(K,II)=A2
      RNAOH(K,II)=A4
C     IF(ITU.NE.1) GO TO 748
C     FNAS(K,II)=FNAR(K,II)/(1.+A3+A2+A4)
C     FNAO(K,II)=FNAS(K,II)*A3
C     FNAO2(K,II)=FNAS(K,II)*A2
C     FNAOH(K,II)=FNAS(K,II)*A4
C748  CONTINUE
      DIP=50.
      SI=SIN(DIP/57.295)
      SII=SI*SI
      CI=COS(DIP/57.295)
      CII=CI*CI
      VINP=3.E-10*(XNO(K)+XNO2(K)+XNN2(K))
      XMASO=23.
      BGAUS=0.4
      WOI=9.57946E+3*BGAUS/XMASO
      RHOI=VINP/WOI
      COI=1./(1+RHOI*RHOI)
      UI(K)=COI*(RHOI*RHOI*UN(K)+RHOI*(-VN(K)*SI-WN(K)*CI))
     1+COI*(UIT+RHOI*VUT)
      VI(K)=COI*(RHOI*RHOI*VN(K)+RHOI*UN(K)*SI+VN(K)*CII-WN(K)*SI*CI)
     1+COI*(VUT*SI-RHOI*UIT*SI)
      WI(K)=COI*(RHOI*RHOI*WN(K)+RHOI*UN(K)*CI-VN(K)*SI*CI+
     1WN(K)*SII)+COI*(VUT*CI-RHOI*UIT*CI)
      WGAM(K)=WI(K)
      FWI(K,II)=WI(K)/SHT(K)
      FUI(K,II)=VI(K)
      PNAP=0.
      PNASP(K)=(XJNAP+RKSI1*XIO2P(K)+RKSI2*XINOP(K)+RKSI3*XIN2P(K))
     1*XNAS(K)+PNAP
      XM=XNO(K)+XNO2(K)+XNN2(K)
      ASP=RKC1*XNN2(K)*XM/(RKC3*XNCO2(K)+RKCM1*XM)
      BSP=RKC2*XNCO2(K)*XM
      CSP=RKCM2*XM+RKC4*XNH2O(K)+RKC5*XNE(K)
      XLNASP(K)=RKC1*XNN2(K)*XM+RKC2*XNCO2(K)*XM+RKSI4*XNO3(K)
     1-RKCM1*XM*ASP-RKCM2*XM*(BSP+RKC3*XNCO2(K)*ASP)/CSP
      IF(K.EQ.1) XLBNAI(II)=PNASP(K)/XLNASP(K)
      PNAI(K,II)=PNASP(K)
      XLNAI(K,II)=XLNASP(K)
  99  CONTINUE                                                          
C*********************
C     IF(II.EQ.IMXP)THEN
C       CALL CONREC(FNNO(1,1),KMXP,KMXP,IMXP,0.,0.,0.,0,0,-1430B)
C       CALL FRAME
C       CALL CONREC(FNNO2(1,1),KMXP,KMXP,IMXP,0.,0.,0.,0,0,-1430B)
C       CALL FRAME
C     ENDIF
C*********************
C IBNDNO=0, FLUX AT LOWER BOUNDARY, IBNDNO=1,PHOTOCHEMICAL EQUILIBRIUM  
      IBNDNO=1                                                          
      FLUXNO(II)=0.                                                     
      FLUXHE(II)=0.                                                     
      IBNDCO=1                                                          
      FLUXCO(II)=0.                                                     
      HC1=BOLTZ*1000./(1.66E-24*GZ(KMX))                                
      XNC1=2.75E+4                                                      
      PI=3.1415926                                                      
      B=0.72                                                            
      HC=BOLTZ*TN(KMX)/(1.66E-24*GZ(KMX))                               
      ALAMC=(6371.E+5+ZPHT(KMX)*1.E+5)/HC                               
      U=SQRT(2.*BOLTZ*TN(KMX)/1.66E-24)
      FAC=B*U*(1.+ALAMC)*EXP(-ALAMC)/(2.*SQRT(PI))                      
      PHIJ=XNH(KMX)*FAC                                                 
      PHIP=0.36*PHIJ                                                    
      PHIE=2.8E+8*XNH(KMX)*HC*PHIJ/(5.E+7*XNC1*HC1)                     
      FHOX(II)=PHIJ+PHIP+PHIE                                           
 777  CONTINUE                                                          
      RETURN                                                            
      END                                                               
