!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer, 
!                     version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms 
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer 
!version 3 or (at your option) any later version that should be found at: 
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html 
!
!This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
!without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
!See the above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software; 
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec), 
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
#if defined (DOC)
*
***comdeck vth.cdk
*
*______________________________________________________________________
*                                                                      |
*  VMM variables at TIME th (t0-dt/2)                                  |
*______________________________________________________________________|
*                    |                                                 |
* NAME               | DESCRIPTION                                     |
*--------------------|-------------------------------------------------|
* uth                | x component of velocity                         |
* vth                | y component of velocity                         |
* psdth              | pi* dot (vert. vel. in pi* coord.)              |
*--------------------|-------------------------------------------------|
* xth                | upstream x position                             |
* yth                | upstream y position                             |
* zth                | upstream z position                             |
* xcth               | upstream x position in cartesian coordinate     |
* ycth               | upstream y position in cartesian coordinate     |
* zcth               | upstream z position in cartesian coordinate     |
*----------------------------------------------------------------------
*
#endif
*
*NOTE: the equivalence statement below MUST mark the
*FIRST element of the common block or the OUTPUTS will be wrong.
*If you introduce an element in the beginning of this block, make
*changes to assure the equivalence statement below MARKS it.
*
      MARK_COMMON_BEG(vth)
      DCL_VMMVAR(vth,uth	,real,(LDIST_SHAPE,l_nk))
      DCL_VMMVAR(vth,vth	,real,(LDIST_SHAPE,l_nk))
      DCL_VMMVAR(vth,psdth	,real,(LDIST_SHAPE,l_nk))
      DCL_VMMVAR(vth,xth	,real,(l_ni*l_nj*l_nk))
      DCL_VMMVAR(vth,yth	,real,(l_ni*l_nj*l_nk))
      DCL_VMMVAR(vth,zth	,real,(l_ni*l_nj*l_nk))
      DCL_VMMVAR(vth,xcth	,real,(l_ni*l_nj*l_nk))
      DCL_VMMVAR(vth,ycth	,real,(l_ni*l_nj*l_nk))
      DCL_VMMVAR(vth,zcth	,real,(l_ni*l_nj*l_nk))
      MARK_COMMON_END(vth)

      character*8 vth_n_first(1)
      equivalence (vth_n_first,VMM_NAM(uth))