!c Description: !c 時間関連設定モジュール !c !c Current Code Owner: !c sugiyama@gfd-dennou.org !c !c Copyright (C) SUGIYAMA Ko-ichiro, 2004, All rights reserved module timeset implicit none save real(8) :: DelTLong !長いタイムステップ real(8) :: DelTShort !短いタイムステップ real(8) :: TimeInt !積分時間 real(8) :: Beta !クランク・ニコルソン法の係数 integer :: NstepTLong !長いタイムステップのステップ数 integer :: NstepTShort!短いタイムステップのステップ数 character(1) :: LLib !線形計算で使うライブラリ contains subroutine timeset_init use fileset, only: cfgfile !--- NAMELIST の定義 NAMELIST /timeset/ & & DelTLong, DelTShort, TimeInt, Beta, LLib !--- 変数の取り出し open (10, FILE=cfgfile) read(10, NML=timeset) close(10) !--- ループ回数 NstepTLong = TimeInt / DelTLong NstepTShort = 2 * DelTLong / DelTShort !--- 警告 if(mod(TimeInt, DelTShort) /= 0) then write(*,*) "mod(TimeInt, DelTLong) is not zero" end if if(mod(2 * DelTLong, DelTShort) /= 0) then write(*,*) "mod(2 * DelTl, DelTShort) is not zero" end if !--- クランク・ニコルソン法の係数のチェック if (Beta > 1.0d0) then write(*,*) "beta must be smaller than 1.0" stop end if end subroutine timeset_init end module timeset