!= Module HeatFlux
!
! Authors::   ODAKA Masatsugu
! Version::   $Id: gridset_surfaceflux.f90,v 1.1 2012/10/01 06:25:03 odakker Exp $
! Tag Name::  $Name: arare5-20150225 $
! Copyright:: Copyright (C) GFD Dennou Club, 2012. All rights reserved.
! License::   See COPYRIGHT[link:../../COPYRIGHT]
!
module gridset_surfaceflux
  !
  != 地表面フラックス用格子点情報モジュール
  !

  ! GTOOL 変数
  ! GTOOL variables
  !
  use dc_types, only: DP, &      ! Double precision.
    &                 STRING, &  ! Strings.
    &                 TOKEN      ! Keywords.

  ! メッセージ出力
  ! Message output
  !
  use dc_message, only: MessageNotify

  ! 格子点設定
  ! Grid points settings
  !
  use gridset, only: nx, & ! x 方向格子点数 
                           ! Number of grid point in x
    &                ny, & ! y 方向格子点数 
                           ! Number of grid point in y
    &                nz    ! z 方向格子点数 
                           ! Number of grid point in z

  ! 並列処理用変数
  ! Parallel processing variable 
  !       
  Use mpi_wrapper,only: myrank

  ! 暗黙の型宣言禁止
  ! Implicit none
  !
  implicit none

  ! 属性の指定
  !
  private 

  character(*), parameter:: module_name = 'gridset_surfaceflux'
                                   ! モジュールの名称.
                                   ! Module name

  ! 公開手続き
  ! Public procedure
  !
  public :: GridsetSurfacefluxInit

  ! 公開変数
  ! Public variables
  !
  integer, save, public :: &
    &       imax, & ! 経度格子点数. 
                    ! Number of grid points in longitude
    &       jmax, & ! 緯度格子点数. 
                    ! Number of grid points in latitude
    &       kmax    ! 鉛直層数. 
                    ! Number of vertical level

  
  contains

    subroutine GridsetSurfacefluxInit

      imax = nx
      jmax = ny
      kmax = nz

      ! メッセージ出力
      ! Message Output 
      !
      if (myrank == 0) then 
        call MessageNotify( "M", module_name, "imax = %d", i=(/imax/) )
        call MessageNotify( "M", module_name, "jmax = %d", i=(/jmax/) )
        call MessageNotify( "M", module_name, "kmax = %d", i=(/kmax/) )
     end if

    end subroutine GridsetSurfacefluxInit


end module gridset_surfaceflux
