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

Go to the source code of this file.

Functions/Subroutines

subroutine historyaxisaddattrchar0 (axis, attrname, value)
 GT_HISTORY_AXIS 型変数への属性付加
 
subroutine historyaxisaddattr2char0 (axis, attrname, value)
 
subroutine historyaxisaddattrlogical0 (axis, attrname, value)
 
subroutine historyaxisaddattr2logical0 (axis, attrname, value)
 
subroutine historyaxisaddattrint0 (axis, attrname, value)
 
subroutine historyaxisaddattr2int0 (axis, attrname, value)
 
subroutine historyaxisaddattrint1 (axis, attrname, value)
 
subroutine historyaxisaddattr2int1 (axis, attrname, value)
 
subroutine historyaxisaddattrreal0 (axis, attrname, value)
 
subroutine historyaxisaddattr2real0 (axis, attrname, value)
 
subroutine historyaxisaddattrreal1 (axis, attrname, value)
 
subroutine historyaxisaddattr2real1 (axis, attrname, value)
 
subroutine historyaxisaddattrdouble0 (axis, attrname, value)
 
subroutine historyaxisaddattr2double0 (axis, attrname, value)
 
subroutine historyaxisaddattrdouble1 (axis, attrname, value)
 
subroutine historyaxisaddattr2double1 (axis, attrname, value)
 

Function/Subroutine Documentation

◆ historyaxisaddattr2char0()

subroutine historyaxisaddattr2char0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
character(*), intent(in)  value 
)

Definition at line 101 of file historyaxisaddattr.f90.

103 !
104 !
105 ! 使用方法は HistoryAxisAddAttr と同様です.
106 !
107 ! Usage is same as "HistoryAxisAddAttr".
108 !
109 !--
110 ! 総称名 Put_Attr として提供するための関数です.
111 ! 機能は HistoryAxisAttr と同じです.
112 !++
113
114 !
117
118 use dc_trace, only: beginsub, endsub
119 implicit none
120 type(GT_HISTORY_AXIS),intent(inout) :: axis
121 character(*), intent(in):: attrname ! 属性の名前
122 character(*), intent(in):: value
123 character(*), parameter:: subname = "HistoryAxisAddAttr2Char0"
124 continue
125 call beginsub(subname)
126 call historyaxisaddattr( axis, attrname, value )
127 call endsub(subname)
デバッグ時の追跡用モジュール
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

References dc_trace::beginsub(), and dc_trace::endsub().

Here is the call graph for this function:

◆ historyaxisaddattr2double0()

subroutine historyaxisaddattr2double0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
real(dp), intent(in)  value 
)

Definition at line 568 of file historyaxisaddattr.f90.

570 !
571
572 !
575 use dc_types, only: dp
576 use dc_trace, only: beginsub, endsub
577 implicit none
578 type(GT_HISTORY_AXIS),intent(inout) :: axis
579 character(*), intent(in):: attrname ! 属性の名前
580 real(DP), intent(in):: value
581 character(*), parameter:: subname = "HistoryAxisAddAttr2Double0"
582 continue
583 call beginsub(subname)
584 call historyaxisaddattr( axis, attrname, value )
585 call endsub(subname)
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:92

References dc_trace::beginsub(), dc_types::dp, and dc_trace::endsub().

Here is the call graph for this function:

◆ historyaxisaddattr2double1()

subroutine historyaxisaddattr2double1 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
real(dp), dimension(:), intent(in)  value 
)

Definition at line 645 of file historyaxisaddattr.f90.

647 !
648
649 !
652 use dc_types, only: dp
653 use dc_trace, only: beginsub, endsub
654 implicit none
655 type(GT_HISTORY_AXIS),intent(inout) :: axis
656 character(*), intent(in):: attrname ! 属性の名前
657 real(DP), intent(in):: value(:)
658 character(*), parameter:: subname = "HistoryAxisAddAttr2Double1"
659 continue
660 call beginsub(subname)
661 call historyaxisaddattr( axis, attrname, value )
662 call endsub(subname)

References dc_trace::beginsub(), dc_types::dp, and dc_trace::endsub().

Here is the call graph for this function:

◆ historyaxisaddattr2int0()

subroutine historyaxisaddattr2int0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
integer, intent(in)  value 
)

Definition at line 262 of file historyaxisaddattr.f90.

264 !
265
266 !
269
270 use dc_trace, only: beginsub, endsub
271 implicit none
272 type(GT_HISTORY_AXIS),intent(inout) :: axis
273 character(*), intent(in):: attrname ! 属性の名前
274 integer, intent(in):: value
275 character(*), parameter:: subname = "HistoryAxisAddAttr2Int0"
276 continue
277 call beginsub(subname)
278 call historyaxisaddattr( axis, attrname, value )
279 call endsub(subname)

References dc_trace::beginsub(), and dc_trace::endsub().

Here is the call graph for this function:

◆ historyaxisaddattr2int1()

subroutine historyaxisaddattr2int1 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
integer, dimension(:), intent(in)  value 
)

Definition at line 339 of file historyaxisaddattr.f90.

341 !
342
343 !
346
347 use dc_trace, only: beginsub, endsub
348 implicit none
349 type(GT_HISTORY_AXIS),intent(inout) :: axis
350 character(*), intent(in):: attrname ! 属性の名前
351 integer, intent(in):: value(:)
352 character(*), parameter:: subname = "HistoryAxisAddAttr2Int1"
353 continue
354 call beginsub(subname)
355 call historyaxisaddattr( axis, attrname, value )
356 call endsub(subname)

References dc_trace::beginsub(), and dc_trace::endsub().

Here is the call graph for this function:

◆ historyaxisaddattr2logical0()

subroutine historyaxisaddattr2logical0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
logical, intent(in)  value 
)

Definition at line 186 of file historyaxisaddattr.f90.

188 !
189
190 !
193
194 use dc_trace, only: beginsub, endsub
195 implicit none
196 type(GT_HISTORY_AXIS),intent(inout) :: axis
197 character(*), intent(in):: attrname ! 属性の名前
198 logical, intent(in):: value
199 character(*), parameter:: subname = "HistoryAxisAddAttr2Logical0"
200 continue
201 call beginsub(subname)
202 call historyaxisaddattr( axis, attrname, value )
203 call endsub(subname)

References dc_trace::beginsub(), and dc_trace::endsub().

Here is the call graph for this function:

◆ historyaxisaddattr2real0()

subroutine historyaxisaddattr2real0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
real, intent(in)  value 
)

Definition at line 415 of file historyaxisaddattr.f90.

417 !
418
419 !
422
423 use dc_trace, only: beginsub, endsub
424 implicit none
425 type(GT_HISTORY_AXIS),intent(inout) :: axis
426 character(*), intent(in):: attrname ! 属性の名前
427 real, intent(in):: value
428 character(*), parameter:: subname = "HistoryAxisAddAttr2Real0"
429 continue
430 call beginsub(subname)
431 call historyaxisaddattr( axis, attrname, value )
432 call endsub(subname)

References dc_trace::beginsub(), and dc_trace::endsub().

Here is the call graph for this function:

◆ historyaxisaddattr2real1()

subroutine historyaxisaddattr2real1 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
real, dimension(:), intent(in)  value 
)

Definition at line 492 of file historyaxisaddattr.f90.

494 !
495
496 !
499
500 use dc_trace, only: beginsub, endsub
501 implicit none
502 type(GT_HISTORY_AXIS),intent(inout) :: axis
503 character(*), intent(in):: attrname ! 属性の名前
504 real, intent(in):: value(:)
505 character(*), parameter:: subname = "HistoryAxisAddAttr2Real1"
506 continue
507 call beginsub(subname)
508 call historyaxisaddattr( axis, attrname, value )
509 call endsub(subname)

References dc_trace::beginsub(), and dc_trace::endsub().

Here is the call graph for this function:

◆ historyaxisaddattrchar0()

subroutine historyaxisaddattrchar0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
character(*), intent(in)  value 
)

GT_HISTORY_AXIS 型変数への属性付加

Parameters
[in,out]axis

iline 1

GT_HISTORY_AXIS 型の変数 axis へ属性を付加します。

HistoryAxisAddAttr は複数のサブルーチンの総称名です。 value には様々な型の引数を与えることが可能です。 下記のサブルーチンを参照ください。

Definition at line 31 of file historyaxisaddattr.f90.

33 !
34 !
42 !
43
44 !
49 use dc_types, only: string
50 use dc_string, only: tochar
51 implicit none
52 type(GT_HISTORY_AXIS),intent(inout) :: axis
53 character(*), intent(in):: attrname ! 属性の名前
54 character(*), intent(in):: value
55 ! 属性に与えられる値
56 !
57 ! 配列の場合でも、数値型以外
58 ! では配列の 1 つ目の要素のみ
59 ! 値として付加されます。
60 !
61
62 type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:)
63 integer:: attrs_num
64 character(STRING) :: name
65 character(*), parameter:: subname = "HistoryAxisAddAttrChar0"
66 continue
67 call beginsub(subname, &
68 & 'attrname=<%c>, value=<%c>', &
69 & c1=trim(attrname), c2=trim(value))
70 call historyaxisinquire( axis, name )
71 call dbgmessage('axis name=<%c>', c1=trim(name))
72
73 ! これまでの属性を保持しつつ配列を1つ増やす
74 if ( .not. associated(axis % attrs) ) then
75 allocate( axis % attrs(1) )
76 attrs_num = 1
77 else
78 attrs_num = size( axis % attrs ) + 1
79 ! 配列データの領域確保
80 allocate( attrs_tmp(attrs_num - 1) )
81 call copy_attrs( from = axis % attrs(1:attrs_num - 1), &
82 & to = attrs_tmp(1:attrs_num - 1))
83 deallocate( axis % attrs )
84 allocate( axis % attrs(attrs_num) )
85 call copy_attrs( from = attrs_tmp(1:attrs_num - 1), &
86 & to = axis % attrs(1:attrs_num - 1))
87 deallocate( attrs_tmp )
88 endif
89
90 axis % attrs(attrs_num) % attrname = attrname
91 axis % attrs(attrs_num) % attrtype = 'Char'
92 axis % attrs(attrs_num) % array = .false.
93 axis % attrs(attrs_num) % Charvalue = value
94
95
96 call endsub(subname)
文字型変数の操作
Definition dc_string.f90:83
subroutine, public dbgmessage(fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:680
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_trace::endsub(), and dc_types::string.

Here is the call graph for this function:

◆ historyaxisaddattrdouble0()

subroutine historyaxisaddattrdouble0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
real(dp), intent(in)  value 
)

Definition at line 513 of file historyaxisaddattr.f90.

515 !
516
517 !
522 use dc_types, only: string, dp
523 use dc_string, only: tochar
524 implicit none
525 type(GT_HISTORY_AXIS),intent(inout) :: axis
526 character(*), intent(in):: attrname ! 属性の名前
527 real(DP), intent(in):: value
528
529 type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:)
530 integer:: attrs_num
531 character(STRING) :: name
532 character(*), parameter:: subname = "HistoryAxisAddAttrDouble0"
533 continue
534 call beginsub(subname, &
535 & 'attrname=<%c>, value=<%c>', &
536 & c1=trim(attrname), c2=trim(tochar(value)))
537 call historyaxisinquire( axis, name )
538 call dbgmessage('axis name=<%c>', c1=trim(name))
539
540 ! これまでの属性を保持しつつ配列を1つ増やす
541 if ( .not. associated(axis % attrs) ) then
542 allocate( axis % attrs(1) )
543 attrs_num = 1
544 else
545 attrs_num = size( axis % attrs ) + 1
546 ! 配列データの領域確保
547 allocate( attrs_tmp(attrs_num - 1) )
548 call copy_attrs( from = axis % attrs(1:attrs_num - 1), &
549 & to = attrs_tmp(1:attrs_num - 1))
550 deallocate( axis % attrs )
551 allocate( axis % attrs(attrs_num) )
552 call copy_attrs( from = attrs_tmp(1:attrs_num - 1), &
553 & to = axis % attrs(1:attrs_num - 1))
554 deallocate( attrs_tmp )
555 endif
556
557 axis % attrs(attrs_num) % attrname = attrname
558 axis % attrs(attrs_num) % attrtype = 'Double'
559 axis % attrs(attrs_num) % array = .false.
560 axis % attrs(attrs_num) % Doublevalue = value
561
562
563 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), and dc_types::string.

Here is the call graph for this function:

◆ historyaxisaddattrdouble1()

subroutine historyaxisaddattrdouble1 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
real(dp), dimension(:), intent(in)  value 
)

Definition at line 589 of file historyaxisaddattr.f90.

591 !
592
593 !
598 use dc_types, only: string, dp
599 use dc_string, only: tochar
600 implicit none
601 type(GT_HISTORY_AXIS),intent(inout) :: axis
602 character(*), intent(in):: attrname ! 属性の名前
603 real(DP), intent(in):: value(:)
604
605 type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:)
606 integer:: attrs_num
607 character(STRING) :: name
608 character(*), parameter:: subname = "HistoryAxisAddAttrDouble1"
609 continue
610 call beginsub(subname, &
611 & 'attrname=<%c>, value=<%c>', &
612 & c1=trim(attrname), c2=trim(tochar(value)))
613 call historyaxisinquire( axis, name )
614 call dbgmessage('axis name=<%c>', c1=trim(name))
615
616 ! これまでの属性を保持しつつ配列を1つ増やす
617 if ( .not. associated(axis % attrs) ) then
618 allocate( axis % attrs(1) )
619 attrs_num = 1
620 else
621 attrs_num = size( axis % attrs ) + 1
622 ! 配列データの領域確保
623 allocate( attrs_tmp(attrs_num - 1) )
624 call copy_attrs( from = axis % attrs(1:attrs_num - 1), &
625 & to = attrs_tmp(1:attrs_num - 1))
626 deallocate( axis % attrs )
627 allocate( axis % attrs(attrs_num) )
628 call copy_attrs( from = attrs_tmp(1:attrs_num - 1), &
629 & to = axis % attrs(1:attrs_num - 1))
630 deallocate( attrs_tmp )
631 endif
632
633 axis % attrs(attrs_num) % attrname = attrname
634 axis % attrs(attrs_num) % attrtype = 'Double'
635 axis % attrs(attrs_num) % array = .true.
636 allocate( axis % attrs(attrs_num) % Doublearray( size(value) ) )
637 axis % attrs(attrs_num) % Doublearray = value
638
639
640 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), and dc_types::string.

Here is the call graph for this function:

◆ historyaxisaddattrint0()

subroutine historyaxisaddattrint0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
integer, intent(in)  value 
)

Definition at line 207 of file historyaxisaddattr.f90.

209 !
210
211 !
216 use dc_types, only: string
217 use dc_string, only: tochar
218 implicit none
219 type(GT_HISTORY_AXIS),intent(inout) :: axis
220 character(*), intent(in):: attrname ! 属性の名前
221 integer, intent(in):: value
222
223 type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:)
224 integer:: attrs_num
225 character(STRING) :: name
226 character(*), parameter:: subname = "HistoryAxisAddAttrInt0"
227 continue
228 call beginsub(subname, &
229 & 'attrname=<%c>, value=<%c>', &
230 & c1=trim(attrname), c2=trim(tochar(value)))
231 call historyaxisinquire( axis, name )
232 call dbgmessage('axis name=<%c>', c1=trim(name))
233
234 ! これまでの属性を保持しつつ配列を1つ増やす
235 if ( .not. associated(axis % attrs) ) then
236 allocate( axis % attrs(1) )
237 attrs_num = 1
238 else
239 attrs_num = size( axis % attrs ) + 1
240 ! 配列データの領域確保
241 allocate( attrs_tmp(attrs_num - 1) )
242 call copy_attrs( from = axis % attrs(1:attrs_num - 1), &
243 & to = attrs_tmp(1:attrs_num - 1))
244 deallocate( axis % attrs )
245 allocate( axis % attrs(attrs_num) )
246 call copy_attrs( from = attrs_tmp(1:attrs_num - 1), &
247 & to = axis % attrs(1:attrs_num - 1))
248 deallocate( attrs_tmp )
249 endif
250
251 axis % attrs(attrs_num) % attrname = attrname
252 axis % attrs(attrs_num) % attrtype = 'Int'
253 axis % attrs(attrs_num) % array = .false.
254 axis % attrs(attrs_num) % Intvalue = value
255
256
257 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_trace::endsub(), and dc_types::string.

Here is the call graph for this function:

◆ historyaxisaddattrint1()

subroutine historyaxisaddattrint1 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
integer, dimension(:), intent(in)  value 
)

Definition at line 283 of file historyaxisaddattr.f90.

285 !
286
287 !
292 use dc_types, only: string
293 use dc_string, only: tochar
294 implicit none
295 type(GT_HISTORY_AXIS),intent(inout) :: axis
296 character(*), intent(in):: attrname ! 属性の名前
297 integer, intent(in):: value(:)
298
299 type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:)
300 integer:: attrs_num
301 character(STRING) :: name
302 character(*), parameter:: subname = "HistoryAxisAddAttrInt1"
303 continue
304 call beginsub(subname, &
305 & 'attrname=<%c>, value=<%c>', &
306 & c1=trim(attrname), c2=trim(tochar(value)))
307 call historyaxisinquire( axis, name )
308 call dbgmessage('axis name=<%c>', c1=trim(name))
309
310 ! これまでの属性を保持しつつ配列を1つ増やす
311 if ( .not. associated(axis % attrs) ) then
312 allocate( axis % attrs(1) )
313 attrs_num = 1
314 else
315 attrs_num = size( axis % attrs ) + 1
316 ! 配列データの領域確保
317 allocate( attrs_tmp(attrs_num - 1) )
318 call copy_attrs( from = axis % attrs(1:attrs_num - 1), &
319 & to = attrs_tmp(1:attrs_num - 1))
320 deallocate( axis % attrs )
321 allocate( axis % attrs(attrs_num) )
322 call copy_attrs( from = attrs_tmp(1:attrs_num - 1), &
323 & to = axis % attrs(1:attrs_num - 1))
324 deallocate( attrs_tmp )
325 endif
326
327 axis % attrs(attrs_num) % attrname = attrname
328 axis % attrs(attrs_num) % attrtype = 'Int'
329 axis % attrs(attrs_num) % array = .true.
330 allocate( axis % attrs(attrs_num) % Intarray( size(value) ) )
331 axis % attrs(attrs_num) % Intarray = value
332
333
334 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_trace::endsub(), and dc_types::string.

Here is the call graph for this function:

◆ historyaxisaddattrlogical0()

subroutine historyaxisaddattrlogical0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
logical, intent(in)  value 
)

Definition at line 131 of file historyaxisaddattr.f90.

133 !
134
135 !
140 use dc_types, only: string
141 use dc_string, only: tochar
142 implicit none
143 type(GT_HISTORY_AXIS),intent(inout) :: axis
144 character(*), intent(in):: attrname ! 属性の名前
145 logical, intent(in):: value
146
147 type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:)
148 integer:: attrs_num
149 character(STRING) :: name
150 character(*), parameter:: subname = "HistoryAxisAddAttrLogical0"
151 continue
152 call beginsub(subname, &
153 & 'attrname=<%c>, value=<%c>', &
154 & c1=trim(attrname), c2=trim(tochar(value)))
155 call historyaxisinquire( axis, name )
156 call dbgmessage('axis name=<%c>', c1=trim(name))
157
158 ! これまでの属性を保持しつつ配列を1つ増やす
159 if ( .not. associated(axis % attrs) ) then
160 allocate( axis % attrs(1) )
161 attrs_num = 1
162 else
163 attrs_num = size( axis % attrs ) + 1
164 ! 配列データの領域確保
165 allocate( attrs_tmp(attrs_num - 1) )
166 call copy_attrs( from = axis % attrs(1:attrs_num - 1), &
167 & to = attrs_tmp(1:attrs_num - 1))
168 deallocate( axis % attrs )
169 allocate( axis % attrs(attrs_num) )
170 call copy_attrs( from = attrs_tmp(1:attrs_num - 1), &
171 & to = axis % attrs(1:attrs_num - 1))
172 deallocate( attrs_tmp )
173 endif
174
175 axis % attrs(attrs_num) % attrname = attrname
176 axis % attrs(attrs_num) % attrtype = 'Logical'
177 axis % attrs(attrs_num) % array = .false.
178 axis % attrs(attrs_num) % Logicalvalue = value
179
180
181 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_trace::endsub(), and dc_types::string.

Here is the call graph for this function:

◆ historyaxisaddattrreal0()

subroutine historyaxisaddattrreal0 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
real, intent(in)  value 
)

Definition at line 360 of file historyaxisaddattr.f90.

362 !
363
364 !
369 use dc_types, only: string
370 use dc_string, only: tochar
371 implicit none
372 type(GT_HISTORY_AXIS),intent(inout) :: axis
373 character(*), intent(in):: attrname ! 属性の名前
374 real, intent(in):: value
375
376 type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:)
377 integer:: attrs_num
378 character(STRING) :: name
379 character(*), parameter:: subname = "HistoryAxisAddAttrReal0"
380 continue
381 call beginsub(subname, &
382 & 'attrname=<%c>, value=<%c>', &
383 & c1=trim(attrname), c2=trim(tochar(value)))
384 call historyaxisinquire( axis, name )
385 call dbgmessage('axis name=<%c>', c1=trim(name))
386
387 ! これまでの属性を保持しつつ配列を1つ増やす
388 if ( .not. associated(axis % attrs) ) then
389 allocate( axis % attrs(1) )
390 attrs_num = 1
391 else
392 attrs_num = size( axis % attrs ) + 1
393 ! 配列データの領域確保
394 allocate( attrs_tmp(attrs_num - 1) )
395 call copy_attrs( from = axis % attrs(1:attrs_num - 1), &
396 & to = attrs_tmp(1:attrs_num - 1))
397 deallocate( axis % attrs )
398 allocate( axis % attrs(attrs_num) )
399 call copy_attrs( from = attrs_tmp(1:attrs_num - 1), &
400 & to = axis % attrs(1:attrs_num - 1))
401 deallocate( attrs_tmp )
402 endif
403
404 axis % attrs(attrs_num) % attrname = attrname
405 axis % attrs(attrs_num) % attrtype = 'Real'
406 axis % attrs(attrs_num) % array = .false.
407 axis % attrs(attrs_num) % Realvalue = value
408
409
410 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_trace::endsub(), and dc_types::string.

Here is the call graph for this function:

◆ historyaxisaddattrreal1()

subroutine historyaxisaddattrreal1 ( type(gt_history_axis), intent(inout)  axis,
character(*), intent(in)  attrname,
real, dimension(:), intent(in)  value 
)

Definition at line 436 of file historyaxisaddattr.f90.

438 !
439
440 !
445 use dc_types, only: string
446 use dc_string, only: tochar
447 implicit none
448 type(GT_HISTORY_AXIS),intent(inout) :: axis
449 character(*), intent(in):: attrname ! 属性の名前
450 real, intent(in):: value(:)
451
452 type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:)
453 integer:: attrs_num
454 character(STRING) :: name
455 character(*), parameter:: subname = "HistoryAxisAddAttrReal1"
456 continue
457 call beginsub(subname, &
458 & 'attrname=<%c>, value=<%c>', &
459 & c1=trim(attrname), c2=trim(tochar(value)))
460 call historyaxisinquire( axis, name )
461 call dbgmessage('axis name=<%c>', c1=trim(name))
462
463 ! これまでの属性を保持しつつ配列を1つ増やす
464 if ( .not. associated(axis % attrs) ) then
465 allocate( axis % attrs(1) )
466 attrs_num = 1
467 else
468 attrs_num = size( axis % attrs ) + 1
469 ! 配列データの領域確保
470 allocate( attrs_tmp(attrs_num - 1) )
471 call copy_attrs( from = axis % attrs(1:attrs_num - 1), &
472 & to = attrs_tmp(1:attrs_num - 1))
473 deallocate( axis % attrs )
474 allocate( axis % attrs(attrs_num) )
475 call copy_attrs( from = attrs_tmp(1:attrs_num - 1), &
476 & to = axis % attrs(1:attrs_num - 1))
477 deallocate( attrs_tmp )
478 endif
479
480 axis % attrs(attrs_num) % attrname = attrname
481 axis % attrs(attrs_num) % attrtype = 'Real'
482 axis % attrs(attrs_num) % array = .true.
483 allocate( axis % attrs(attrs_num) % Realarray( size(value) ) )
484 axis % attrs(attrs_num) % Realarray = value
485
486
487 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_trace::endsub(), and dc_types::string.

Here is the call graph for this function: