gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
hstnmlinfoinquire.f90
Go to the documentation of this file.
1
14
61 subroutine hstnmlinfoinquire( gthstnml, &
62 & name, &
63 & file, &
64 & interval_value, &
65 & interval_unit, &
66 & precision, &
67 & time_average, average, &
68 & fileprefix, &
69 & origin_value, origin_unit, &
70 & terminus_value, terminus_unit, &
71 & slice_start, slice_end, slice_stride, &
72 & space_average, &
73 & newfile_intvalue, newfile_intunit, &
74 & err )
77 use dc_trace, only: beginsub, endsub
78 use dc_types, only: dp, string
80 implicit none
81 type(gthst_nmlinfo), intent(in):: gthstnml
82 character(*), intent(in), optional:: name
83 ! 変数名.
84 ! 先頭の空白は無視されます.
85 !
86 ! Variable identifier.
87 ! Blanks at the head of the name are ignored.
88 character(*), intent(out), optional:: file
89 ! ヒストリデータのファイル名.
90 ! History data filenames
91 real(DP), intent(out), optional:: interval_value
92 ! ヒストリデータの出力間隔の数値.
93 ! 負の値を与えると, 出力を抑止します.
94 !
95 ! Numerical value for interval of history data output.
96 ! Negative values suppresses output.
97 character(*), intent(out), optional:: interval_unit
98 ! ヒストリデータの出力間隔の単位.
99 ! Unit for interval of history data output
100 character(*), intent(out), optional:: precision
101 ! ヒストリデータの精度.
102 ! Precision of history data
103 logical, intent(out), optional:: time_average
104 ! 出力データの時間平均化フラグ.
105 ! Flag for time average of output data.
106 logical, intent(out), optional:: average
107 ! time_average の旧版.
108 ! Old version of "time_average"
109 character(*), intent(out), optional:: fileprefix
110 ! ヒストリデータのファイル名の接頭詞.
111 ! Prefixes of history data filenames
112 real(DP), intent(out), optional:: origin_value
113 ! 出力開始時刻.
114 ! Start time of output.
115 character(*), intent(out), optional:: origin_unit
116 ! 出力開始時刻の単位.
117 ! Unit of start time of output.
118 real(DP), intent(out), optional:: terminus_value
119 ! 出力終了時刻.
120 ! End time of output.
121 character(*), intent(out), optional:: terminus_unit
122 ! 出力終了時刻の単位.
123 ! Unit of end time of output.
124 integer, intent(out), optional:: slice_start(:)
125 ! 空間方向の開始点.
126 ! Start points of spaces.
127 integer, intent(out), optional:: slice_end(:)
128 ! 空間方向の終了点.
129 ! End points of spaces.
130 integer, intent(out), optional:: slice_stride(:)
131 ! 空間方向の刻み幅.
132 ! Strides of spaces.
133 logical, intent(out), optional:: space_average(:)
134 ! 平均化のフラグ.
135 ! Flag of average.
136 integer, intent(out), optional:: newfile_intvalue
137 ! ファイル分割時間間隔.
138 ! Interval of time of separation of a file.
139 character(*), intent(out), optional:: newfile_intunit
140 ! ファイル分割時間間隔の単位.
141 ! Unit of interval of time of separation of a file.
142
143 logical, intent(out), optional:: err
144 ! 例外処理用フラグ.
145 ! デフォルトでは, この手続き内でエラーが
146 ! 生じた場合, プログラムは強制終了します.
147 ! 引数 *err* が与えられる場合,
148 ! プログラムは強制終了せず, 代わりに
149 ! *err* に .true. が代入されます.
150 !
151 ! Exception handling flag.
152 ! By default, when error occur in
153 ! this procedure, the program aborts.
154 ! If this *err* argument is given,
155 ! .true. is substituted to *err* and
156 ! the program does not abort.
157
158 !-----------------------------------
159 ! 作業変数
160 ! Work variables
161 type(gthst_nmlinfo_entry), pointer:: hptr =>null()
162 character(STRING):: name_work
163 integer:: stat, ary_size
164 character(STRING):: cause_c
165 character(*), parameter:: subname = 'HstNmlInfoInquire'
166 continue
167 call beginsub( subname )
168 stat = dc_noerr
169 cause_c = ''
170
171 !-----------------------------------------------------------------
172 ! 初期設定のチェック
173 ! Check initialization
174 !-----------------------------------------------------------------
175 if ( .not. gthstnml % initialized ) then
176 stat = dc_enotinit
177 cause_c = 'GTHST_NMLINFO'
178 goto 999
179 end if
180
181 !-----------------------------------------------------------------
182 ! *gthstnml* 内から, *name* に関する情報を探査.
183 ! Search information correspond to *name* in *gthstnml*
184 !-----------------------------------------------------------------
185 if ( present(name) ) then
186 name_work = name
187 else
188 name_work = ''
189 end if
190 hptr => gthstnml % gthstnml_list
191 call listsearch( gthstnml_list = hptr, & ! (inout)
192 & name = name_work ) ! (in)
193
194 if ( .not. associated( hptr ) ) then
195 stat = dc_enoentry
196 cause_c = adjustl( name_work )
197 goto 999
198 end if
199
200 if ( hptr % name == '' ) then
201 if ( present(file) ) file = ''
202 else
203 if ( present(file) ) file = trim( hptr % fileprefix ) // hptr % file
204 end if
205 if ( present(interval_value) ) interval_value = hptr % interval_value
206 if ( present(interval_unit) ) interval_unit = hptr % interval_unit
207 if ( present(precision) ) precision = hptr % precision
208 if ( present(average) ) average = hptr % time_average
209 if ( present(time_average) ) time_average = hptr % time_average
210 if ( present(fileprefix) ) fileprefix = hptr % fileprefix
211
212 if ( present(origin_value ) ) origin_value = hptr % origin_value
213 if ( present(origin_unit ) ) origin_unit = hptr % origin_unit
214 if ( present(terminus_value ) ) terminus_value = hptr % terminus_value
215 if ( present(terminus_unit ) ) terminus_unit = hptr % terminus_unit
216 if ( present(slice_start ) ) then
217 ary_size = size(slice_start)
218 slice_start = hptr % slice_start(1:ary_size)
219 end if
220 if ( present(slice_end ) ) then
221 ary_size = size(slice_end)
222 slice_end = hptr % slice_end(1:ary_size)
223 end if
224 if ( present(slice_stride ) ) then
225 ary_size = size(slice_stride)
226 slice_stride = hptr % slice_stride(1:ary_size)
227 end if
228 if ( present(space_average ) ) then
229 ary_size = size(space_average)
230 space_average = hptr % space_average(1:ary_size)
231 end if
232 if ( present(newfile_intvalue) ) newfile_intvalue = hptr % newfile_intvalue
233 if ( present(newfile_intunit ) ) newfile_intunit = hptr % newfile_intunit
234
235 nullify( hptr )
236
237 !-----------------------------------------------------------------
238 ! 終了処理, 例外処理
239 ! Termination and Exception handling
240 !-----------------------------------------------------------------
241999 continue
242 call storeerror( stat, subname, err, cause_c )
243 call endsub( subname )
244 end subroutine hstnmlinfoinquire
subroutine hstnmlinfoinquire(gthstnml, name, file, interval_value, interval_unit, precision, time_average, average, fileprefix, origin_value, origin_unit, terminus_value, terminus_unit, slice_start, slice_end, slice_stride, space_average, newfile_intvalue, newfile_intunit, err)
エラー処理用モジュール
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
エラー等を保持
Definition dc_error.f90:468
integer, parameter, public dc_enotinit
-400 以下: dc ユーティリティのエラー
Definition dc_error.f90:534
integer, parameter, public dc_enoentry
Definition dc_error.f90:548
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:457
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:580
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:92
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137