!= 格子点設定プログラム
!
!= grid point setting program
!
! Authors::   Masanori Onishi
! Version::   $Id: main_dcrtm.f90,v 1.00 onishi$
! Tag Name::  $Name: dcrtm-20170105 $
! Copyright:: Copyright (C) GFD Dennou Club, 2008-2015. All rights reserved.
! License::   See COPYRIGHT[link:../../../COPYRIGHT]

module gridset
  !
  ! <b>Note that Japanese and English are described in parallel.</b>
  !

  ! 宣言文 ; Declaration statements
  !
  implicit none

  private

  public :: GridsetSet
  public :: GridsetPrint
  public :: GridsetSet2
  public :: GridsetPrint2


  integer, save, public:: imax = 1
                              ! 経度格子点数.
                              ! Number of grid points in longitude
  integer, save, public:: jmax = 1
                              ! 緯度格子点数.
                              ! Number of grid points in latitude
  integer, save, public:: kmax = 1
                              ! 鉛直層数.
                              ! Number of vertical level
  integer, save, public:: imax2 = 1
                              ! 経度格子点数.
                              ! Number of grid points in longitude
  integer, save, public:: jmax2 = 1
                              ! 緯度格子点数.
                              ! Number of grid points in latitude
  integer, save, public:: kmax2 = 1
                              ! 鉛直層数.
                              ! Number of vertical level

contains

  subroutine GridsetSet(InImax, InJmax, InKmax)
    !
    ! 格子点設定
    ! grid point setting
    !
    integer, intent(in) :: InImax
    integer, intent(in) :: InJmax
    integer, intent(in) :: InKmax

    imax = InImax
    jmax = InJmax
    kmax = InKmax

  end subroutine GridsetSet

  subroutine GridsetPrint
    !
    ! 格子点出力
    ! grid point output
    !
    print *, 'imax:', imax
    print *, 'jmax:', jmax
    print *, 'kmax:', kmax

  end subroutine GridsetPrint

  subroutine GridsetSet2(InImax, InJmax, InKmax)
    !
    ! 格子点設定
    ! grid point setting
    !
    integer, intent(in) :: InImax
    integer, intent(in) :: InJmax
    integer, intent(in) :: InKmax

    imax2 = InImax
    jmax2 = InJmax
    kmax2 = InKmax

  end subroutine GridsetSet2

  subroutine GridsetPrint2
    !
    ! 格子点出力
    ! grid point output
    !
    print *, 'imax2:', imax2
    print *, 'jmax2:', jmax2
    print *, 'kmax2:', kmax2

  end subroutine GridsetPrint2

end module gridset
