!---------------------------------------------------------------------
!     Copyright (C) GFD Dennou Club, 2004. All rights reserved.
!---------------------------------------------------------------------
                                                                 !=begin
!= Module ExpName
!
!   * Developer: SUGIYAMA Ko-ichiro (sugiyama@gfd-dennou.org)
!   * Version: $Id: expname.f90,v 1.2 2005/01/28 12:41:21 sugiyama Exp $ 
!   * Tag Name: $Name:  $
!   * Change History: 
!
!== Overview 
!
!出力 netCDF ファイルに記載する実験設定を NAMELIST から取得する. 
!
!== Error Handling
!
!== Known Bugs
!
!== Note
!
!== Future Plans
!
                                                                 !=end

module expname
  implicit none
  save
                                                                 !=begin
  !== Public Interface
  character(80) :: ExpTitle  !データの表題
  character(80) :: ExpSrc    !データを作成する手順
  character(80) :: ExpInst   !最終変更者・組織
                                                                 !=end
contains
                                                                 !=begin
  !== Procedure Interface 
  !
  !=== Initialize module and acquire NAMELIST
  !
  !netCDF に書き込む実験名を NAMELIST から読み込む
  !
  subroutine expname_init(cfgfile)

    !=== Input
    character(*), intent(in) :: cfgfile
    
    !=== NAMELIST
    NAMELIST /expname/ ExpTitle, ExpSrc, ExpInst
    
    open (10, FILE=cfgfile)
    read(10, NML=expname)
    close(10)
                                                                 !=end    
  end subroutine expname_init

end module expname

