!c Description: 
!c   初期値読み込み (netCDF ファイル)
!c
!c Current Code Owner: 
!c   sugiyama@gfd-dennou.org
!c
!c Copyright (C) SUGIYAMA Ko-ichiro, 2004, All rights reserved

module basicset
  implicit none
  save

  real(8), allocatable   :: ss_CpBasicZ(:,:)
  real(8), allocatable   :: ss_DensBasicZ(:,:)
  real(8), allocatable   :: ss_ExnerBasicZ(:,:)
  real(8), allocatable   :: ss_ThetaBasicZ(:,:)
  real(8), allocatable   :: ss_VelSoundBasicZ(:,:)

contains
  subroutine basicset_init
    use fileset, only: cfgfile, basicfile
    use gridset
    use gt4_history
    
    character(20)  :: name            !変数名
    
    !--- 配列の割り当て
    allocate(  &
         & ss_CpBasicZ(DimXMin:DimXMax, DimZMin:DimZMax), &
         & ss_ExnerBasicZ(DimXMin:DimXMax, DimZMin:DimZMax), &
         & ss_ThetaBasicZ(DimXMin:DimXMax, DimZMin:DimZMax), &
         & ss_DensBasicZ(DimXMin:DimXMax, DimZMin:DimZMax), &
         & ss_VelSoundBasicZ(DimXMin:DimXMax, DimZMin:DimZMax) )


    !--- 変数の取り出し
    name = "CpBasicZ"
    call HistoryGet( basicfile, name, ss_CpBasicZ )

    name = "ExnerBasicZ"
    call HistoryGet( basicfile, name, ss_ExnerBasicZ )

    name = "ThetaBasicZ"
    call HistoryGet( basicfile, name, ss_ThetaBasicZ )

    name = "DensBasicZ"
    call HistoryGet( basicfile, name, ss_DensBasicZ )

    name = "VelSoundBasicZ"
    call HistoryGet( basicfile, name, ss_VelSoundBasicZ )
    
  end subroutine basicset_init
  
end module basicset

