43 implicit none
44 type(GTHST_NMLINFO), intent(in):: gthstnml
45 integer, intent(in), optional:: unit
46
47
48
49
50
51 character(*), intent(in), optional:: indent
52
53
54
55 logical, intent(out), optional:: err
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
83 cause_c = ''
84
85
86
87
88
89 if ( present(unit) ) then
90 out_unit = unit
91 else
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
106
107
108 if ( gthstnml % initialized ) then
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
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
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
131 & indent_str(1:indent_len) // &
132 & ' @output_step_disable=%y', &
133 & l = (/hptr % output_step_disable/) )
134
136 & indent_str(1:indent_len) // &
137 & ' @precision=%c @time_average=%y', &
138 & c1 = trim(hptr % precision), &
139 & l = (/ hptr % time_average /) )
140
142 & indent_str(1:indent_len) // &
143 & ' @fileprefix=%c', &
144 & c1 = trim(hptr % fileprefix) )
145
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
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
159 & indent_str(1:indent_len) // &
160 & ' @slice_start=%*d ...', &
161 & i = (/hptr % slice_start(1:10)/), n = (/ 10 /) )
162
164 & indent_str(1:indent_len) // &
165 & ' @slice_end=%*d ...', &
166 & i = (/hptr % slice_end(1:10)/), n = (/ 10 /) )
167
169 & indent_str(1:indent_len) // &
170 & ' @slice_stride=%*d ...', &
171 & i = (/hptr % slice_stride(1:10)/), n = (/ 10 /) )
172
174 & indent_str(1:indent_len) // &
175 & ' @space_average=%*b ...', &
176 & l = (/hptr % space_average(1:10)/), n =(/ 10 /) )
177
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
186 & indent_str(1:indent_len) // &
187 & ' @history=' )
188
190 & unit = out_unit, &
191 & indent = indent_str(1:indent_len) // &
192 & ' ' )
193 end if
194
195 call listnext( gthstnml_list = hptr )
196 end do
197
199 & indent_str(1:indent_len) // &
200 & ' >' )
201
203 & indent_str(1:indent_len) // &
204 & '>' )
205 else
207 & indent_str(1:indent_len) // &
208 & '#<GTHST_NMLINFO:: @initialized=%y>', &
209 & l = (/gthstnml % initialized/) )
210 end if
211
212
213
214
215
216 call storeerror( stat, subname, err, cause_c )
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
Error storage variables
Handling character types.
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Provides kind type parameter values.
integer, parameter, public string
Character length for string
integer, parameter, public stdout
Unit number for Standard OUTPUT