!=========================================================================
! Bulk Richardson number Calculation Subroutine
!
! History 1998/07/13  Masatsugu Odaka
!         1999/01/20  Masatsugu Odaka
!=========================================================================

      SUBROUTINE CLRICH
     I   ( TPOT0, VSFC, URMIN,
     C     GRAV , TSFC, HIGHT,
     O     RICHD,
     D     NX   , NXB , NZB    )

!*************************************************************************
      IMPLICIT REAL*8 ( A-H, O-Z )
!*************************************************************************

      DIMENSION
     \     TPOT0( -2:NZB )

      DIMENSION
     \     TSFC ( -2:NXB ),
     \     RICHD( -2:NXB )

!*************************************************************************
! Initiallization
!*************************************************************************

      DO IX = 0, NX
         RICHD ( IX ) = 0.0D0
      END DO

!*************************************************************************
! Calculation of Bulk Richardson Number
!*************************************************************************

      DO IX = 0, NX
         UABS = VSFC

         RICHD( IX ) = GRAV * HIGHT * 
     \        ( TPOT0( 0 ) - TSFC( IX ) )
     \        / TPOT0( 0 ) / MAX( UABS, URMIN )
      END DO

      RETURN
      END 
