Class | constants_mod |
In: |
src/shared/constants/constants.f90
|
((< nmlfile_init >)) で指定されることが想定されているが、 もしもこの初期化ルーチンより以前に指定されていなければ、 ((< nmlfile_init >)) のデフォルトで指定される NAMELIST ファイルを 読む。
subroutine constants_init !==== Dependency !=end implicit none !=begin ! !==== NAMELIST ! 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