gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
historyautochkoutput.f90
Go to the documentation of this file.
1
14
39 function historyautochkoutput( varname ) result(result)
42
43 implicit none
44 logical:: result
45 character(*), intent(in):: varname
46 ! 変数の名前.
47 ! Variable name
48
49 integer:: i, vnum
50 integer, save:: svnum = 1
51 continue
52 ! 初期設定チェック
53 ! Check initialization
54 !
55 if ( .not. initialized ) then
56 result = .false.
57 goto 999
58 end if
59
60 ! 変数 ID のサーチ
61 ! Search variable ID
62 !
63 varsearch: do
64 do i = svnum, numvars
65 if ( trim( varname_vars(i) ) == trim(varname) ) then
66 vnum = i
67 exit varsearch
68 end if
69 end do
70 do i = 1, svnum - 1
71 if ( trim( varname_vars(i) ) == trim(varname) ) then
72 vnum = i
73 exit varsearch
74 end if
75 end do
76
77 result = .false.
78 goto 999
79 end do varsearch
80
81 svnum = vnum
82
83 ! 出力設定の確認
84 ! Check output setting
85 !
86 result = output_valid_vars( vnum )
87
88999 continue
89 end function historyautochkoutput
90
91
92
149 function historyautochkoutputtiming( time, varname ) result(result)
154 use dc_types, only: dp
155
156 implicit none
157 logical:: result
158 real(dp), intent(in):: time
159 ! データの時刻.
160 ! Time of data
161 character(*), intent(in):: varname
162 ! 変数の名前.
163 ! Variable name
164
165 real(dp), parameter:: zero_time = 0.0_dp
166 integer:: i, vnum
167 integer, save:: svnum = 1
168 continue
169
170 ! 初期設定チェック
171 ! Check initialization
172 !
173 if ( .not. initialized ) then
174 result = .false.
175 goto 999
176 end if
177
178 ! 変数 ID のサーチ
179 ! Search variable ID
180 !
181 varsearch: do
182 do i = svnum, numvars
183 if ( trim( varname_vars(i) ) == trim(varname) ) then
184 vnum = i
185 exit varsearch
186 end if
187 end do
188 do i = 1, svnum - 1
189 if ( trim( varname_vars(i) ) == trim(varname) ) then
190 vnum = i
191 exit varsearch
192 end if
193 end do
194
195 result = .false.
196 goto 999
197 end do varsearch
198
199 svnum = vnum
200
201 ! 出力設定の確認
202 ! Check output setting
203 !
204 result = output_valid_vars( vnum )
205
206 if ( .not. result ) goto 999
207
208 if ( origin_time_vars(vnum) > time ) then
209 result = .false.
210 goto 999
211 end if
212
213 if ( origin_time_vars(vnum) <= time &
214 & .and. ( terminus_time_vars(vnum) < zero_time &
215 & .or. terminus_time_vars(vnum) >= time ) &
216 & .and. .not. histaddvar_vars(vnum) ) then
217
218 result = .true.
219 goto 999
220 end if
221
222 if ( terminus_time_vars(vnum) > zero_time .and. terminus_time_vars(vnum) < time ) then
223 result = .false.
224 goto 999
225 end if
226
227 if ( newfile_inttime_vars(vnum) > zero_time ) then
228 if ( time - newfile_createtime_vars(vnum) >= newfile_inttime_vars(vnum) ) then
229 result = .true.
230 goto 999
231 end if
232 end if
233
234 if ( time - prev_outtime_vars(vnum) >= interval_time_vars(vnum) ) then
235 result = .true.
236 goto 999
237 end if
238
239 result = .false.
240
241999 continue
242 end function historyautochkoutputtiming
logical function historyautochkoutputtiming(time, varname)
logical function historyautochkoutput(varname)
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:92
character(token), dimension(1:max_vars), save, public varname_vars
real(dp), dimension(1:max_vars), save, public newfile_inttime_vars
real(dp), dimension(1:max_vars), save, public interval_time_vars
real(dp), dimension(1:max_vars), save, public newfile_createtime_vars
real(dp), dimension(1:max_vars), save, public terminus_time_vars
real(dp), dimension(1:max_vars), save, public prev_outtime_vars
real(dp), dimension(1:max_vars), save, public origin_time_vars
logical, dimension(1:max_vars), save, public output_valid_vars
logical, dimension(1:max_vars), save, public histaddvar_vars