11
12
13
14
15
16
17
18
19
23 use dc_trace, only: beginsub, endsub
24 use dc_string, only: putline, printf, split, strinclude, stoa, joinchar
27 implicit none
28 type(GTHST_NMLINFO), intent(in):: gthstnml
29 integer, intent(in), optional:: unit
30
31
32
33
34
35 character(*), intent(in), optional:: indent
36
37
38
39 logical, intent(out), optional:: err
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 type(GTHST_NMLINFO_ENTRY), pointer:: hptr =>null()
58 integer:: stat
59 character(STRING):: cause_c
60 integer:: out_unit
61 integer:: indent_len
62 character(STRING):: indent_str
63 character(*), parameter:: subname = 'HstNmlInfoPutLine'
64 continue
65 call beginsub( subname )
67 cause_c = ''
68
69
70
71
72
73 if ( present(unit) ) then
74 out_unit = unit
75 else
77 end if
78
79 indent_len = 0
80 indent_str = ''
81 if ( present(indent) ) then
82 if ( len(indent) /= 0 ) then
83 indent_len = len(indent)
84 indent_str(1:indent_len) = indent
85 end if
86 end if
87
88
89
90
91
92 if ( gthstnml % initialized ) then
93 call printf( out_unit, &
94 & indent_str(1:indent_len) // &
95 & '#<GTHST_NMLINFO:: @initialized=%y define_mode=%y', &
96 & l = (/gthstnml % initialized, gthstnml % define_mode/) )
97
98 hptr => gthstnml % gthstnml_list
99
100 do while ( associated( hptr ) )
101
102 call printf( out_unit, &
103 & indent_str(1:indent_len) // &
104 & ' #<GTHST_NMLINFO_ENTRY:: @name=%c @file=%c', &
105 & c1 = trim(hptr % name), &
106 & c2 = trim(hptr % file) )
107
108 call printf( out_unit, &
109 & indent_str(1:indent_len) // &
110 & ' @interval_value=%r @interval_unit=%c', &
111 & r = (/hptr % interval_value/), &
112 & c1 = trim(hptr % interval_unit) )
113
114 call printf( out_unit, &
115 & indent_str(1:indent_len) // &
116 & ' @output_step_disable=%y', &
117 & l = (/hptr % output_step_disable/) )
118
119 call printf( out_unit, &
120 & indent_str(1:indent_len) // &
121 & ' @precision=%c @time_average=%y', &
122 & c1 = trim(hptr % precision), &
123 & l = (/ hptr % time_average /) )
124
125 call printf( out_unit, &
126 & indent_str(1:indent_len) // &
127 & ' @fileprefix=%c', &
128 & c1 = trim(hptr % fileprefix) )
129
130 call printf( out_unit, &
131 & indent_str(1:indent_len) // &
132 & ' @origin_value=%r @origin_unit=%c', &
133 & r = (/hptr % origin_value/), &
134 & c1 = trim(hptr % origin_unit) )
135
136 call printf( out_unit, &
137 & indent_str(1:indent_len) // &
138 & ' @terminus_value=%r @terminus_unit=%c', &
139 & r = (/hptr % terminus_value/), &
140 & c1 = trim(hptr % terminus_unit) )
141
142 call printf( out_unit, &
143 & indent_str(1:indent_len) // &
144 & ' @slice_start=%*d ...', &
145 & i = (/hptr % slice_start(1:10)/), n = (/ 10 /) )
146
147 call printf( out_unit, &
148 & indent_str(1:indent_len) // &
149 & ' @slice_end=%*d ...', &
150 & i = (/hptr % slice_end(1:10)/), n = (/ 10 /) )
151
152 call printf( out_unit, &
153 & indent_str(1:indent_len) // &
154 & ' @slice_stride=%*d ...', &
155 & i = (/hptr % slice_stride(1:10)/), n = (/ 10 /) )
156
157 call printf( out_unit, &
158 & indent_str(1:indent_len) // &
159 & ' @space_average=%*b ...', &
160 & l = (/hptr % space_average(1:10)/), n =(/ 10 /) )
161
162 call printf( out_unit, &
163 & indent_str(1:indent_len) // &
164 & ' @newfile_intvalue=%d @newfile_intunit=%c', &
165 & i = (/hptr % newfile_intvalue/), &
166 & c1 = trim(hptr % newfile_intunit) )
167
168 if ( .not. gthstnml % define_mode ) then
169 call printf( out_unit, &
170 & indent_str(1:indent_len) // &
171 & ' @history=' )
172
174 & unit = out_unit, &
175 & indent = indent_str(1:indent_len) // &
176 & ' ' )
177 end if
178
179 call listnext( gthstnml_list = hptr )
180 end do
181
182 call printf( out_unit, &
183 & indent_str(1:indent_len) // &
184 & ' >' )
185
186 call printf( out_unit, &
187 & indent_str(1:indent_len) // &
188 & '>' )
189 else
190 call printf( out_unit, &
191 & indent_str(1:indent_len) // &
192 & '#<GTHST_NMLINFO:: @initialized=%y>', &
193 & l = (/gthstnml % initialized/) )
194 end if
195
196
197
198
199
200999 continue
201 call storeerror( stat, subname, err, cause_c )
202 call endsub( subname )
subroutine historyputline(history, unit, indent, err)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_enotinit
integer, parameter, public dc_noerr
Provides kind type parameter values.
integer, parameter, public stdout
Unit number for Standard OUTPUT
integer, parameter, public token
Character length for word, token
integer, parameter, public dp
Double Precision Real number
integer, parameter, public string
Character length for string