gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
hstnmlinfoputline.f90 File Reference

gtool_history_nmlinfo_types::GTHST_NMLINFO 型の変数に設定される情報の印字 More...

Go to the source code of this file.

Functions/Subroutines

subroutine hstnmlinfoputline (gthstnml, unit, indent, err)

Detailed Description

gtool_history_nmlinfo_types::GTHST_NMLINFO 型の変数に設定される情報の印字

Author
Yasuhiro MORIKAWA

Definition in file hstnmlinfoputline.f90.

Function/Subroutine Documentation

◆ hstnmlinfoputline()

subroutine hstnmlinfoputline ( type(gthst_nmlinfo), intent(in) gthstnml,
integer, intent(in), optional unit,
character(*), intent(in), optional indent,
logical, intent(out), optional err )

gtool_history_nmlinfo_types::GTHST_NMLINFO の情報を印字する

引数 gthstnml に設定されている情報を印字します. デフォルトではメッセージは標準出力に出力されます. unit に装置番号を指定することで, 出力先を変更することが可能です.

Parameters
[in]gthstnmlgtool_history_nmlinfo_types::GTHST_NMLINFO 型変数
[in]unit出力先の装置番号 (optional). Unit number for output.
[in]indent字下げ (optional). Indent of displayed messages.
[out]err例外処理用フラグ. Exception handling flag.

Definition at line 35 of file hstnmlinfoputline.f90.

39 use dc_trace, only: beginsub, endsub
40 use dc_string, only: printf
41 use dc_types, only: string, stdout
42 use dc_error, only: storeerror, dc_noerr
43 implicit none
44 type(GTHST_NMLINFO), intent(in):: gthstnml
45 integer, intent(in), optional:: unit
46 ! 出力先の装置番号.
47 ! デフォルトの出力先は標準出力.
48 !
49 ! Unit number for output.
50 ! Default value is standard output.
51 character(*), intent(in), optional:: indent
52 ! 表示されるメッセージの字下げ.
53 !
54 ! Indent of displayed messages.
55 logical, intent(out), optional:: err
56 ! 例外処理用フラグ.
57 ! デフォルトでは, この手続き内でエラーが
58 ! 生じた場合, プログラムは強制終了します.
59 ! 引数 *err* が与えられる場合,
60 ! プログラムは強制終了せず, 代わりに
61 ! *err* に .true. が代入されます.
62 !
63 ! Exception handling flag.
64 ! By default, when error occur in
65 ! this procedure, the program aborts.
66 ! If this *err* argument is given,
67 ! .true. is substituted to *err* and
68 ! the program does not abort.
69
70 !-----------------------------------
71 ! 作業変数
72 ! Work variables
73 type(GTHST_NMLINFO_ENTRY), pointer:: hptr =>null()
74 integer:: stat
75 character(STRING):: cause_c
76 integer:: out_unit
77 integer:: indent_len
78 character(STRING):: indent_str
79 character(*), parameter:: subname = 'HstNmlInfoPutLine'
80 continue
81 call beginsub( subname )
82 stat = dc_noerr
83 cause_c = ''
84
85 !-----------------------------------------------------------------
86 ! 初期設定のチェック
87 ! Check initialization
88 !-----------------------------------------------------------------
89 if ( present(unit) ) then
90 out_unit = unit
91 else
92 out_unit = stdout
93 end if
94
95 indent_len = 0
96 indent_str = ''
97 if ( present(indent) ) then
98 if ( len(indent) /= 0 ) then
99 indent_len = len(indent)
100 indent_str(1:indent_len) = indent
101 end if
102 end if
103
104 !-----------------------------------------------------------------
105 ! "GTHST_NMLINFO" の設定の印字
106 ! Print the settings for "GTHST_NMLINFO"
107 !-----------------------------------------------------------------
108 if ( gthstnml % initialized ) then
109 call printf( out_unit, &
110 & indent_str(1:indent_len) // &
111 & '#<GTHST_NMLINFO:: @initialized=%y define_mode=%y', &
112 & l = (/gthstnml % initialized, gthstnml % define_mode/) )
113
114 hptr => gthstnml % gthstnml_list
115
116 do while ( associated( hptr ) )
117
118 call printf( out_unit, &
119 & indent_str(1:indent_len) // &
120 & ' #<GTHST_NMLINFO_ENTRY:: @name=%c @file=%c', &
121 & c1 = trim(hptr % name), &
122 & c2 = trim(hptr % file) )
123
124 call printf( out_unit, &
125 & indent_str(1:indent_len) // &
126 & ' @interval_value=%r @interval_unit=%c', &
127 & r = (/hptr % interval_value/), &
128 & c1 = trim(hptr % interval_unit) )
129
130 call printf( out_unit, &
131 & indent_str(1:indent_len) // &
132 & ' @output_step_disable=%y', &
133 & l = (/hptr % output_step_disable/) )
134
135 call printf( out_unit, &
136 & indent_str(1:indent_len) // &
137 & ' @precision=%c @time_average=%y', &
138 & c1 = trim(hptr % precision), &
139 & l = (/ hptr % time_average /) )
140
141 call printf( out_unit, &
142 & indent_str(1:indent_len) // &
143 & ' @fileprefix=%c', &
144 & c1 = trim(hptr % fileprefix) )
145
146 call printf( out_unit, &
147 & indent_str(1:indent_len) // &
148 & ' @origin_value=%r @origin_unit=%c', &
149 & r = (/hptr % origin_value/), &
150 & c1 = trim(hptr % origin_unit) )
151
152 call printf( out_unit, &
153 & indent_str(1:indent_len) // &
154 & ' @terminus_value=%r @terminus_unit=%c', &
155 & r = (/hptr % terminus_value/), &
156 & c1 = trim(hptr % terminus_unit) )
157
158 call printf( out_unit, &
159 & indent_str(1:indent_len) // &
160 & ' @slice_start=%*d ...', &
161 & i = (/hptr % slice_start(1:10)/), n = (/ 10 /) )
162
163 call printf( out_unit, &
164 & indent_str(1:indent_len) // &
165 & ' @slice_end=%*d ...', &
166 & i = (/hptr % slice_end(1:10)/), n = (/ 10 /) )
167
168 call printf( out_unit, &
169 & indent_str(1:indent_len) // &
170 & ' @slice_stride=%*d ...', &
171 & i = (/hptr % slice_stride(1:10)/), n = (/ 10 /) )
172
173 call printf( out_unit, &
174 & indent_str(1:indent_len) // &
175 & ' @space_average=%*b ...', &
176 & l = (/hptr % space_average(1:10)/), n =(/ 10 /) )
177
178 call printf( out_unit, &
179 & indent_str(1:indent_len) // &
180 & ' @newfile_intvalue=%d @newfile_intunit=%c', &
181 & i = (/hptr % newfile_intvalue/), &
182 & c1 = trim(hptr % newfile_intunit) )
183
184 if ( .not. gthstnml % define_mode ) then
185 call printf( out_unit, &
186 & indent_str(1:indent_len) // &
187 & ' @history=' )
188
189 call historyputline( hptr % history, &
190 & unit = out_unit, &
191 & indent = indent_str(1:indent_len) // &
192 & ' ' )
193 end if
194
195 call listnext( gthstnml_list = hptr ) ! (inout)
196 end do
197
198 call printf( out_unit, &
199 & indent_str(1:indent_len) // &
200 & ' >' )
201
202 call printf( out_unit, &
203 & indent_str(1:indent_len) // &
204 & '>' )
205 else
206 call printf( out_unit, &
207 & indent_str(1:indent_len) // &
208 & '#<GTHST_NMLINFO:: @initialized=%y>', &
209 & l = (/gthstnml % initialized/) )
210 end if
211
212 !-----------------------------------------------------------------
213 ! 終了処理, 例外処理
214 ! Termination and Exception handling
215 !-----------------------------------------------------------------
216 call storeerror( stat, subname, err, cause_c )
217 call endsub( subname )
エラー処理用モジュール
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
文字型変数の操作
Definition dc_string.f90:83
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137
integer, parameter, public stdout
標準出力の装置番号
Definition dc_types.f90:117

References dc_trace::beginsub(), dc_error::dc_noerr, dc_trace::endsub(), dc_types::stdout, dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function: