anchor.diff:    public :: prgvar_get_withdiag
     public :: prgvar_set
     public :: prgvar_get_in
  +  public :: prgvar_get_in_withdiag
     public :: prgvar_set_in
   
     public :: prgvar_get_plane_nopl     ! [add] T.Ohno 110722
  
positive.code:     ! <- [add]&[Mod] H.Yashiro 20110819
  
      write(ADM_LOG_FID,*)
      write(ADM_LOG_FID,*) '====== data range check : prognostic variables ======'
      do nq = 1, DIAG_vmax0
         val_max = GTL_max( DIAG_var   (:,:,:,nq),       &
                            DIAG_var_pl(:,:,:,nq),       &
  
negative.code: 
      return
    end subroutine prgvar_get_in
  
    !-----------------------------------------------------------------------------
    !>
    !> Description of the subroutine prgvar_get_in
    !>
    subroutine prgvar_get_in_withdiag( &
         rhog,   &
         rhogvx, &
         rhogvy, &
         rhogvz, &
         rhogw,  &
         rhoge,  &
         rhogq,  &
         rho,    &
         pre,    &
         tem,    &
         vx,     &
         vy,     &
         vz,     &
         w,      &
         q       )
      use mod_adm, only: &
         ADM_gall,        &
         ADM_kall,        &
         ADM_lall,        &
         ADM_IopJop_nmax, &
         ADM_IopJop,      &
         ADM_GIoJo
      use mod_vmtr, only: &
         VMTR_GSGAM2
      use mod_runconf, only: &
         TRC_vmax
      implicit none
  
      real(8), intent(out) :: rhog  (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: rhogvx(ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: rhogvy(ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: rhogvz(ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: rhogw (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: rhoge (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: rhogq (ADM_IopJop_nmax,ADM_kall,ADM_lall,TRC_vmax)
      real(8), intent(out) :: rho   (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: pre   (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: tem   (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: vx    (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: vy    (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: vz    (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: w     (ADM_IopJop_nmax,ADM_kall,ADM_lall)
      real(8), intent(out) :: q     (ADM_IopJop_nmax,ADM_kall,ADM_lall,TRC_vmax)
  
      integer :: n, k, l, nq, ij
      !---------------------------------------------------------------------------
  
      call cnvvar_prg2diag( PRG_var (:,:,:,:), PRG_var_pl (:,:,:,:), & !--- [IN]
                            DIAG_var(:,:,:,:), DIAG_var_pl(:,:,:,:)  ) !--- [OUT]
  
      do l = 1, ADM_lall
      do k = 1, ADM_kall
      do n = 1, ADM_IopJop_nmax
         ij = ADM_IopJop(n,ADM_GIoJo)
  
         rhog  (n,k,l) = PRG_var(ij,k,l,I_RHOG  )
         rhogvx(n,k,l) = PRG_var(ij,k,l,I_RHOGVX)
         rhogvy(n,k,l) = PRG_var(ij,k,l,I_RHOGVY)
         rhogvz(n,k,l) = PRG_var(ij,k,l,I_RHOGVZ)
         rhogw (n,k,l) = PRG_var(ij,k,l,I_RHOGW )
         rhoge (n,k,l) = PRG_var(ij,k,l,I_RHOGE )
  
         rho   (n,k,l) = PRG_var(ij,k,l,I_RHOG) / VMTR_GSGAM2(ij,k,l)
  
         pre   (n,k,l) = DIAG_var(ij,k,l,I_pre)
         tem   (n,k,l) = DIAG_var(ij,k,l,I_tem)
         vx    (n,k,l) = DIAG_var(ij,k,l,I_vx )
         vy    (n,k,l) = DIAG_var(ij,k,l,I_vy )
         vz    (n,k,l) = DIAG_var(ij,k,l,I_vz )
         w     (n,k,l) = DIAG_var(ij,k,l,I_w  )
      enddo
      enddo
      enddo
  
      do nq = 1, TRC_vmax
      do l  = 1, ADM_lall
      do k  = 1, ADM_kall
      do n  = 1, ADM_IopJop_nmax
         ij = ADM_IopJop(n,ADM_GIoJo)
  
         rhogq(n,k,l,nq) = PRG_var(ij,k,l,PRG_vmax0+nq)
  
         q    (n,k,l,nq) = DIAG_var(ij,k,l,DIAG_vmax0+nq)
      enddo
      enddo
      enddo
      enddo
  
      return
    end subroutine prgvar_get_in_withdiag
  
    !-----------------------------------------------------------------------------
    !>
  