!---------------------------------------------------------------------
!     Copyright (C) GFD Dennou Club, 2004. All rights reserved.
!---------------------------------------------------------------------
                                                                 !=begin
!= Module BasicPrm
!
!   * Developer: SUGIYAMA Ko-ichiro (sugiyama@gfd-dennou.org)
!   * Version: $Id: basicprm.f90,v 1.2 2005/01/28 12:41:21 sugiyama Exp $ 
!   * Tag Name: $Name:  $
!   * Change History: 
!
!== Overview 
!
!典型的な基本場を計算するためのプログラム basic の初期値を
!読み込むためのモジュール
!
!== Error Handling
!
!== Known Bugs
!
!== Note
!
!== Future Plans
!
                                                                 !=end

module basicprm
  !--- 暗黙の型宣言禁止
  implicit none

  !--- save 属性
  save
                                                                 !=begin
  !== Public Interface
  real(8)       :: CpDry      !乾燥大気の比熱
  real(8)       :: Grav
  real(8)       :: MolWtDry
  real(8)       :: TempSfc
  real(8)       :: PressSfc
  character(80) :: TempType
  character(80) :: PressType
  character(80) :: basicfile
                                                                 !=end
contains
                                                                 !=begin
  !== Procedure Interface 
  !
  !=== Initialize module and acquire NAMELIST
  !
  !NAMELIST から設定を読み取る
  !
  subroutine basicprm_init(cfgfile)
    
    !=== Input
    character(*), intent(in) :: cfgfile  !設定ファイル(NAMELIST)
    
    !=== NAMELIST 
    NAMELIST /basicprm/ &
         & basicfile, Grav, TempSfc, PressSfc, &
         & CpDry, MolWtDry, TempType, PressType

    open (10, FILE=cfgfile)
    read(10, NML=basicprm)
    close(10)
                                                                 !=end
  end subroutine basicprm_init
  
end module basicprm
