Class fileset_mmc
In: setup/fileset_mmc.f90

引数に与えられた NAMELIST ファイルから, I/O ファイル名を取得し, 保管するための変数型モジュール

Methods

Included Modules

gtool_history gridset basicset dc_message

Public Instance methods

ExpInst
Variable :
ExpInst :character(80)
: 最終変更者・組織
ExpSrc
Variable :
ExpSrc :character(80)
: データを作成する手順
ExpTitle
Variable :
ExpTitle :character(80)
: データの表題
FileNum
Variable :
FileNum :integer
: 出力ファイル数
HistoryFile
Variable :
HistoryFile(:) :character(len=100), allocatable
: 出力ファイル名
HistoryFilePrefix
Variable :
HistoryFilePrefix :character(80)
: ヒストリーファイル接頭詞
InitFile
Variable :
InitFile :character(80)
: 初期値ファイル
RandomFile
Variable :
RandomFile :character(80)
: 乱数ファイル
ReStartFile
Variable :
ReStartFile :character(80)
: リスタートファイル
Subroutine :
cfgfile :character(*), intent(in)

NAMELIST からファイル名に付けるタグを得て, 出力ファイル名を作成する.

This procedure input/output NAMELIST#fileset .

[Source]

  subroutine fileset_init(cfgfile)
    !
    !NAMELIST からファイル名に付けるタグを得て, 出力ファイル名を作成する. 
    !

    !モジュール読み込み
    use dc_message,    only: MessageNotify

    !暗黙の型宣言禁止
    implicit none

    !入力変数
    character(*), intent(in) :: cfgfile
    integer                  :: s        !ループ添字

    !NAMELIST から情報を取得
    NAMELIST /fileset/ InitFile, HistoryFilePrefix, ReStartFile, RandomFile, ExpTitle, ExpSrc           , ExpInst

    open (10, FILE=cfgfile)
    read(10, NML=fileset)
    close(10)

    !確認
    call MessageNotify( "M", "fileset_init", "InitFile=%c",    c1=trim(InitFile))
    call MessageNotify( "M", "fileset_init", "HistoryFilePrefix=%c", c1=trim(HistoryFilePrefix) )
    call MessageNotify( "M", "fileset_init", "ReStartFile=%c", c1=trim(ReStartFile) )
    call MessageNotify( "M", "fileset_init", "RandomFile=%c",  c1=trim(RandomFile) )
    call MessageNotify( "M", "fileset_init", "ExpTitle=%c",    c1=trim(ExpTitle) )
    call MessageNotify( "M", "fileset_init", "ExpSrc=%c",      c1=trim(ExpSrc) )
    call MessageNotify( "M", "fileset_init", "ExpInst=%c",     c1=trim(ExpInst) )


    !ファイル名を格納する配列の割り付け
    !  次元数は
    !    PotTemp, Exner, VelX, VelZ, MixRt(SpcNum), Km, Kh,
    !    DensCloud, SatRatio,
    !    *BasicZ, *Zprof
    !  の合計 10 + SpcNum
    
    FileNum = 10 + SpcNum
    allocate(HistoryFile(FileNum))
    allocate(gt_hist(FileNum))

    HistoryFile(1) = trim(HistoryFilePrefix)//"_Exner.nc" 
    HistoryFile(2) = trim(HistoryFilePrefix)//"_PotTemp.nc" 
    HistoryFile(3) = trim(HistoryFilePrefix)//"_VelX.nc" 
    HistoryFile(4) = trim(HistoryFilePrefix)//"_VelZ.nc" 
    HistoryFile(5) = trim(HistoryFilePrefix)//"_Km.nc" 
    HistoryFile(6) = trim(HistoryFilePrefix)//"_Kh.nc" 
    HistoryFile(7) = trim(HistoryFilePrefix)//"_BasicZ.nc" 
    HistoryFile(8) = trim(HistoryFilePrefix)//"_Zprof.nc" 
    HistoryFile(9) = trim(HistoryFilePrefix)//"_DensCloud.nc" 
    HistoryFile(10) = trim(HistoryFilePrefix)//"_SatRatio.nc" 

    do s = 1, SpcNum
      HistoryFile(10+s) = trim(HistoryFilePrefix)//"_"//trim(SpcWetSymbol(s))//".nc"
    end do


    !確認
    do s = 1, Filenum
      call MessageNotify( "M", "fileset_init", "HistoryFile=%c", c1=trim(HistoryFile(s)) )
    end do
    
  end subroutine fileset_init
gt_hist
Variable :
gt_hist(:) :type(gt_history),allocatable
: gt_history 型構造体