gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
hstnmlinfooutputstep.f90
Go to the documentation of this file.
1
14
44 logical function hstnmlinfooutputstep( gthstnml, &
45 & name, time ) result(result)
48 use dc_date_types, only: dc_difftime
49 use dc_date_generic, only: dcdifftimecreate, mod, operator(==)
50 use dc_types, only: dp
51 implicit none
52 type(gthst_nmlinfo), intent(in):: gthstnml
53 character(*), intent(in):: name
54 ! 変数名.
55 ! 先頭の空白は無視されます.
56 !
57 ! Variable identifier.
58 ! Blanks at the head of the name are ignored.
59 type(dc_difftime), intent(in):: time
60 ! 現在時刻. Current time
61
62 !-----------------------------------
63 ! 作業変数
64 ! Work variables
65 type(gthst_nmlinfo_entry), pointer:: hptr =>null()
66 type(dc_difftime):: interval_time
67!!$ character(*), parameter:: subname = 'HstNmlInfoOutputStep'
68 continue
69
70 result = .false.
71
72 !-----------------------------------------------------------------
73 ! 初期設定のチェック
74 ! Check initialization
75 !-----------------------------------------------------------------
76 if ( .not. gthstnml % initialized ) goto 999
77
78 !-----------------------------------------------------------------
79 ! 情報格納変数への結合
80 ! Associate a variable storing information
81 !-----------------------------------------------------------------
82 hptr => gthstnml % gthstnml_list
83 call listsearch( gthstnml_list = hptr, & ! (inout)
84 & name = name ) ! (in)
85
86 if ( .not. associated( hptr ) ) goto 999
87 if ( hptr % output_step_disable ) goto 999
88
89 !-----------------------------------------------------------------
90 ! 時刻のチェック
91 ! Check time
92 !-----------------------------------------------------------------
93 if ( .not. hptr % interval_value > 0.0 ) goto 999
94
95 call dcdifftimecreate( &
96 & diff = interval_time, & ! (out)
97 & value = real( hptr % interval_value, dp ), & ! (in)
98 & unit = hptr % interval_unit ) ! (in)
99
100 if ( mod( time, interval_time ) == 0 ) then
101 result = .true.
102 end if
103
104 !-----------------------------------------------------------------
105 ! 終了処理, 例外処理
106 ! Termination and Exception handling
107 !-----------------------------------------------------------------
108999 continue
109 nullify( hptr )
110 end function hstnmlinfooutputstep
logical function hstnmlinfooutputstep(gthstnml, name, time)
dc_date より提供される手続の引用仕様宣言
日付・時刻に関する構造データ型と定数
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:92