SUBROUTINE NTCHS90
!use consts
use global
implicit none  
  
integer :: i,j,iz,izloc,iloc
real(DP) :: qij
save

QVOHS=.0
      IF(CWQWGM.EQ.0.) GO TO 400
      CALL TEMPGM90

      DO 300 I=IVOHSN,IVOHSX
      DO 300 J=JVOHSN,JVOHSX
      ILOC=INVOL(I,J)
      IF(ILOC.EQ.0) GO TO 300
      QIJ=TGM(ILOC)-T(I,J)
!-----DP OCT 1996
      IZLOC=MOD(ILOC-1,NZLOC)+1
      IZ=ILAYST(IZLOC)
      TSF(I,J)=TSF1(IZ)*QIJ
!-----END DP OCT 1996
      T(I,J)=T(I,J)+QIJ*SFBETA(ILOC)*GVOHS(I,J)*CIN(I,J)*DT
      QVOHS=QVOHS+GVOHS(I,J)*QIJ
  300 CONTINUE
      RETURN

  400 CONTINUE
      DO 350 I=IVOHSN,IVOHSX
      DO 350 J=JVOHSN,JVOHSX
  350 TSF(I,J)=0.
  500 CONTINUE
!write(521,*) qvohs,qij

RETURN
END subroutine ntchs90