| Class | constants_mod |
| In: |
shared/constants.f90
|
| Subroutine : |
subroutine constants_end
!==== Dependency
use dc_trace, only : BeginSub, EndSub, DbgMessage
!=end
implicit none
!-----------------------------------------------------------------
! 変数定義
!-----------------------------------------------------------------
!----- 作業用内部変数 -----
character(len = *), parameter:: subname = "constants_end"
continue
!----------------------------------------------------------------
! Check Initialization
!----------------------------------------------------------------
call BeginSub(subname)
if ( .not. constants_initialized) then
call EndSub( subname, 'constants_init was not called', c1=trim(subname) )
return
else
constants_initialized = .false.
endif
!----------------------------------------------------------------
! Reset to default value
!----------------------------------------------------------------
PI = 3.141592653589793 ! 円周率
R0 = 6.371d6 ! 球の半径
Omega = 7.292d-5 ! 回転角速度
Grav = 9.8d0 ! 重力加速度
Cp = 1004.6d0 ! 大気定圧比熱
RAir = 287.04d0 ! 大気気体定数
EL = 2.5d6 ! 水の凝結の潜熱
CpVap = 1810.0d0 ! 水蒸気定圧比熱
RVap = 461.0d0 ! 水蒸気気体定数
DH2O = 1000.0d0 ! 水の密度
EpsV = 0.6226464208 ! 水と大気の分子量比ε
ES0 = 611.0d0 ! 0℃飽和蒸気圧:Pa
StB = 5.67d-8 ! Stefan-Boltzman
FKarm = 0.4d0 ! Karman 定数
EpsVT = 0.6060479376 ! 1/ε-1
SecPerDay = 86400.0d0 ! 1日あたりの秒数
EFoldTime = 8640.0d0 ! 最大波数に対する e-folding time
TempAve = 300.0 ! 平均温度
TimeFilter= 0.05 ! 時間フィルター係数
TimeFilterStepInt = 1 ! 時間フィルターするステップ間隔
call EndSub(subname)
end subroutine constants_end
| Subroutine : |
This procedure input/output NAMELIST#constants_nml .
subroutine constants_init
!==== Dependency
use type_mod , only : REKIND, DBKIND, INTKIND, TOKEN, STRING
use nmlfile_mod, only : nmlfile_init, nmlfile_open, nmlfile_close
use dc_trace , only : BeginSub, EndSub, DbgMessage
use dc_message , only : MessageNotify
!=end
implicit none
!
! This namelist is require physical constants
namelist /constants_nml/ PI , R0 , Omega , Grav , Cp , RAir , EL , CpVap , RVap , DH2O , EpsV , ES0 , StB , FKarm , EpsVT , SecPerDay , EFoldTime , TempAve , TimeFilter , TimeFilterStepInt , VisOrder ! 超粘性の次数
!=end
integer(INTKIND) :: nmlstat, nmlunit
logical :: nmlreadable
character(STRING), parameter:: subname = "constants_init"
continue
!----------------------------------------------------------------
! Check Initialization
!----------------------------------------------------------------
call BeginSub(subname)
if (constants_initialized) then
call EndSub( subname, '%c is already called', c1=trim(subname) )
return
else
constants_initialized = .true.
endif
!----------------------------------------------------------------
! Version identifier
!----------------------------------------------------------------
call DbgMessage('%c :: %c', c1=trim(version), c2=trim(tagname))
!----------------------------------------------------------------
! read constants_nml
!----------------------------------------------------------------
call nmlfile_init
call nmlfile_open(nmlunit, nmlreadable)
if (nmlreadable) then
read(nmlunit, nml=constants_nml, iostat=nmlstat)
call DbgMessage('Stat of NAMELIST constants_nml Input is <%d>', i=(/nmlstat/))
write(0, nml=constants_nml)
else
call DbgMessage('Not Read NAMELIST constants_nml')
call MessageNotify('W', subname, 'Can not Read NAMELIST constants_nml. Force Use Default Value.')
end if
call nmlfile_close
call EndSub( subname )
end subroutine constants_init