Path: | gtool/gtool_history/historyaxisaddattr.f90 |
Last Update: | Mon May 25 18:45:20 +0900 2009 |
Authors: | Yasuhiro MORIKAWA |
Version: | $Id: historyaxisaddattr.f90,v 1.2 2009-05-25 09:45:20 morikawa Exp $ |
Tag Name: | $Name: gtool5-20090704 $ |
Copyright: | Copyright (C) GFD Dennou Club, 2000-2009. All rights reserved. |
License: | See COPYRIGHT |
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | character(*), intent(in) |
使用方法は HistoryAxisAddAttr と同様です.
Usage is same as "HistoryAxisAddAttr".
subroutine HistoryAxisAddAttr2Char0( axis, attrname, value) ! ! ! 使用方法は HistoryAxisAddAttr と同様です. ! ! Usage is same as "HistoryAxisAddAttr". ! ! ! use gtool_history_generic, only: HistoryAxisAddAttr use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 character(*), intent(in):: value character(*), parameter:: subname = "HistoryAxisAddAttr2Char0" continue call BeginSub(subname) call HistoryAxisAddAttr( axis, attrname, value ) call EndSub(subname) end subroutine HistoryAxisAddAttr2Char0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | real(DP), intent(in) |
subroutine HistoryAxisAddAttr2Double0( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisAddAttr use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 real(DP), intent(in):: value character(*), parameter:: subname = "HistoryAxisAddAttr2Double0" continue call BeginSub(subname) call HistoryAxisAddAttr( axis, attrname, value ) call EndSub(subname) end subroutine HistoryAxisAddAttr2Double0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value(:) : | real(DP), intent(in) |
subroutine HistoryAxisAddAttr2Double1( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisAddAttr use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 real(DP), intent(in):: value(:) character(*), parameter:: subname = "HistoryAxisAddAttr2Double1" continue call BeginSub(subname) call HistoryAxisAddAttr( axis, attrname, value ) call EndSub(subname) end subroutine HistoryAxisAddAttr2Double1
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | integer, intent(in) |
subroutine HistoryAxisAddAttr2Int0( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisAddAttr use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 integer, intent(in):: value character(*), parameter:: subname = "HistoryAxisAddAttr2Int0" continue call BeginSub(subname) call HistoryAxisAddAttr( axis, attrname, value ) call EndSub(subname) end subroutine HistoryAxisAddAttr2Int0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value(:) : | integer, intent(in) |
subroutine HistoryAxisAddAttr2Int1( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisAddAttr use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 integer, intent(in):: value(:) character(*), parameter:: subname = "HistoryAxisAddAttr2Int1" continue call BeginSub(subname) call HistoryAxisAddAttr( axis, attrname, value ) call EndSub(subname) end subroutine HistoryAxisAddAttr2Int1
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | logical, intent(in) |
subroutine HistoryAxisAddAttr2Logical0( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisAddAttr use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 logical, intent(in):: value character(*), parameter:: subname = "HistoryAxisAddAttr2Logical0" continue call BeginSub(subname) call HistoryAxisAddAttr( axis, attrname, value ) call EndSub(subname) end subroutine HistoryAxisAddAttr2Logical0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | real, intent(in) |
subroutine HistoryAxisAddAttr2Real0( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisAddAttr use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 real, intent(in):: value character(*), parameter:: subname = "HistoryAxisAddAttr2Real0" continue call BeginSub(subname) call HistoryAxisAddAttr( axis, attrname, value ) call EndSub(subname) end subroutine HistoryAxisAddAttr2Real0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value(:) : | real, intent(in) |
subroutine HistoryAxisAddAttr2Real1( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisAddAttr use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 real, intent(in):: value(:) character(*), parameter:: subname = "HistoryAxisAddAttr2Real1" continue call BeginSub(subname) call HistoryAxisAddAttr( axis, attrname, value ) call EndSub(subname) end subroutine HistoryAxisAddAttr2Real1
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | character(*), intent(in)
|
GT_HISTORY_AXIS 型の変数 axis へ属性を付加します。
HistoryAxisAddAttr は複数のサブルーチンの総称名です。 value には様々な型の引数を与えることが可能です。 下記のサブルーチンを参照ください。
subroutine HistoryAxisAddAttrChar0( axis, attrname, value) ! ! !== GT_HISTORY_AXIS 型変数への属性付加 ! ! GT_HISTORY_AXIS 型の変数 *axis* へ属性を付加します。 ! ! *HistoryAxisAddAttr* は複数のサブルーチンの総称名です。 ! value には様々な型の引数を与えることが可能です。 ! 下記のサブルーチンを参照ください。 ! ! use gtool_history_generic, only: HistoryAxisInquire use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use gtool_history_internal, only: default, copy_attrs use gtdata_generic, only: Put_Attr use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP use dc_string, only: toChar, JoinChar use dc_url, only: GT_PLUS implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 character(*), intent(in):: value ! 属性に与えられる値 ! ! 配列の場合でも、数値型以外 ! では配列の 1 つ目の要素のみ ! 値として付加されます。 ! type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:) integer:: attrs_num character(STRING) :: name character(*), parameter:: subname = "HistoryAxisAddAttrChar0" continue call BeginSub(subname, 'attrname=<%c>, value=<%c>', c1=trim(attrname), c2=trim(value)) call HistoryAxisInquire( axis, name ) call DbgMessage('axis name=<%c>', c1=trim(name)) ! これまでの属性を保持しつつ配列を1つ増やす if ( .not. associated(axis % attrs) ) then allocate( axis % attrs(1) ) attrs_num = 1 else attrs_num = size( axis % attrs ) + 1 ! 配列データの領域確保 allocate( attrs_tmp(attrs_num - 1) ) call copy_attrs( from = axis % attrs(1:attrs_num - 1), to = attrs_tmp(1:attrs_num - 1)) deallocate( axis % attrs ) allocate( axis % attrs(attrs_num) ) call copy_attrs( from = attrs_tmp(1:attrs_num - 1), to = axis % attrs(1:attrs_num - 1)) deallocate( attrs_tmp ) endif axis % attrs(attrs_num) % attrname = attrname axis % attrs(attrs_num) % attrtype = 'Char' axis % attrs(attrs_num) % array = .false. axis % attrs(attrs_num) % Charvalue = value call EndSub(subname) end subroutine HistoryAxisAddAttrChar0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | real(DP), intent(in) |
subroutine HistoryAxisAddAttrDouble0( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisInquire use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use gtool_history_internal, only: default, copy_attrs use gtdata_generic, only: Put_Attr use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP use dc_string, only: toChar, JoinChar use dc_url, only: GT_PLUS implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 real(DP), intent(in):: value type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:) integer:: attrs_num character(STRING) :: name character(*), parameter:: subname = "HistoryAxisAddAttrDouble0" continue call BeginSub(subname, 'attrname=<%c>, value=<%c>', c1=trim(attrname), c2=trim(toChar(value))) call HistoryAxisInquire( axis, name ) call DbgMessage('axis name=<%c>', c1=trim(name)) ! これまでの属性を保持しつつ配列を1つ増やす if ( .not. associated(axis % attrs) ) then allocate( axis % attrs(1) ) attrs_num = 1 else attrs_num = size( axis % attrs ) + 1 ! 配列データの領域確保 allocate( attrs_tmp(attrs_num - 1) ) call copy_attrs( from = axis % attrs(1:attrs_num - 1), to = attrs_tmp(1:attrs_num - 1)) deallocate( axis % attrs ) allocate( axis % attrs(attrs_num) ) call copy_attrs( from = attrs_tmp(1:attrs_num - 1), to = axis % attrs(1:attrs_num - 1)) deallocate( attrs_tmp ) endif axis % attrs(attrs_num) % attrname = attrname axis % attrs(attrs_num) % attrtype = 'Double' axis % attrs(attrs_num) % array = .false. axis % attrs(attrs_num) % Doublevalue = value call EndSub(subname) end subroutine HistoryAxisAddAttrDouble0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value(:) : | real(DP), intent(in) |
subroutine HistoryAxisAddAttrDouble1( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisInquire use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use gtool_history_internal, only: default, copy_attrs use gtdata_generic, only: Put_Attr use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP use dc_string, only: toChar, JoinChar use dc_url, only: GT_PLUS implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 real(DP), intent(in):: value(:) type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:) integer:: attrs_num character(STRING) :: name character(*), parameter:: subname = "HistoryAxisAddAttrDouble1" continue call BeginSub(subname, 'attrname=<%c>, value=<%c>', c1=trim(attrname), c2=trim(toChar(value))) call HistoryAxisInquire( axis, name ) call DbgMessage('axis name=<%c>', c1=trim(name)) ! これまでの属性を保持しつつ配列を1つ増やす if ( .not. associated(axis % attrs) ) then allocate( axis % attrs(1) ) attrs_num = 1 else attrs_num = size( axis % attrs ) + 1 ! 配列データの領域確保 allocate( attrs_tmp(attrs_num - 1) ) call copy_attrs( from = axis % attrs(1:attrs_num - 1), to = attrs_tmp(1:attrs_num - 1)) deallocate( axis % attrs ) allocate( axis % attrs(attrs_num) ) call copy_attrs( from = attrs_tmp(1:attrs_num - 1), to = axis % attrs(1:attrs_num - 1)) deallocate( attrs_tmp ) endif axis % attrs(attrs_num) % attrname = attrname axis % attrs(attrs_num) % attrtype = 'Double' axis % attrs(attrs_num) % array = .true. allocate( axis % attrs(attrs_num) % Doublearray( size(value) ) ) axis % attrs(attrs_num) % Doublearray = value call EndSub(subname) end subroutine HistoryAxisAddAttrDouble1
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | integer, intent(in) |
subroutine HistoryAxisAddAttrInt0( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisInquire use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use gtool_history_internal, only: default, copy_attrs use gtdata_generic, only: Put_Attr use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP use dc_string, only: toChar, JoinChar use dc_url, only: GT_PLUS implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 integer, intent(in):: value type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:) integer:: attrs_num character(STRING) :: name character(*), parameter:: subname = "HistoryAxisAddAttrInt0" continue call BeginSub(subname, 'attrname=<%c>, value=<%c>', c1=trim(attrname), c2=trim(toChar(value))) call HistoryAxisInquire( axis, name ) call DbgMessage('axis name=<%c>', c1=trim(name)) ! これまでの属性を保持しつつ配列を1つ増やす if ( .not. associated(axis % attrs) ) then allocate( axis % attrs(1) ) attrs_num = 1 else attrs_num = size( axis % attrs ) + 1 ! 配列データの領域確保 allocate( attrs_tmp(attrs_num - 1) ) call copy_attrs( from = axis % attrs(1:attrs_num - 1), to = attrs_tmp(1:attrs_num - 1)) deallocate( axis % attrs ) allocate( axis % attrs(attrs_num) ) call copy_attrs( from = attrs_tmp(1:attrs_num - 1), to = axis % attrs(1:attrs_num - 1)) deallocate( attrs_tmp ) endif axis % attrs(attrs_num) % attrname = attrname axis % attrs(attrs_num) % attrtype = 'Int' axis % attrs(attrs_num) % array = .false. axis % attrs(attrs_num) % Intvalue = value call EndSub(subname) end subroutine HistoryAxisAddAttrInt0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value(:) : | integer, intent(in) |
subroutine HistoryAxisAddAttrInt1( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisInquire use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use gtool_history_internal, only: default, copy_attrs use gtdata_generic, only: Put_Attr use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP use dc_string, only: toChar, JoinChar use dc_url, only: GT_PLUS implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 integer, intent(in):: value(:) type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:) integer:: attrs_num character(STRING) :: name character(*), parameter:: subname = "HistoryAxisAddAttrInt1" continue call BeginSub(subname, 'attrname=<%c>, value=<%c>', c1=trim(attrname), c2=trim(toChar(value))) call HistoryAxisInquire( axis, name ) call DbgMessage('axis name=<%c>', c1=trim(name)) ! これまでの属性を保持しつつ配列を1つ増やす if ( .not. associated(axis % attrs) ) then allocate( axis % attrs(1) ) attrs_num = 1 else attrs_num = size( axis % attrs ) + 1 ! 配列データの領域確保 allocate( attrs_tmp(attrs_num - 1) ) call copy_attrs( from = axis % attrs(1:attrs_num - 1), to = attrs_tmp(1:attrs_num - 1)) deallocate( axis % attrs ) allocate( axis % attrs(attrs_num) ) call copy_attrs( from = attrs_tmp(1:attrs_num - 1), to = axis % attrs(1:attrs_num - 1)) deallocate( attrs_tmp ) endif axis % attrs(attrs_num) % attrname = attrname axis % attrs(attrs_num) % attrtype = 'Int' axis % attrs(attrs_num) % array = .true. allocate( axis % attrs(attrs_num) % Intarray( size(value) ) ) axis % attrs(attrs_num) % Intarray = value call EndSub(subname) end subroutine HistoryAxisAddAttrInt1
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | logical, intent(in) |
subroutine HistoryAxisAddAttrLogical0( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisInquire use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use gtool_history_internal, only: default, copy_attrs use gtdata_generic, only: Put_Attr use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP use dc_string, only: toChar, JoinChar use dc_url, only: GT_PLUS implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 logical, intent(in):: value type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:) integer:: attrs_num character(STRING) :: name character(*), parameter:: subname = "HistoryAxisAddAttrLogical0" continue call BeginSub(subname, 'attrname=<%c>, value=<%c>', c1=trim(attrname), c2=trim(toChar(value))) call HistoryAxisInquire( axis, name ) call DbgMessage('axis name=<%c>', c1=trim(name)) ! これまでの属性を保持しつつ配列を1つ増やす if ( .not. associated(axis % attrs) ) then allocate( axis % attrs(1) ) attrs_num = 1 else attrs_num = size( axis % attrs ) + 1 ! 配列データの領域確保 allocate( attrs_tmp(attrs_num - 1) ) call copy_attrs( from = axis % attrs(1:attrs_num - 1), to = attrs_tmp(1:attrs_num - 1)) deallocate( axis % attrs ) allocate( axis % attrs(attrs_num) ) call copy_attrs( from = attrs_tmp(1:attrs_num - 1), to = axis % attrs(1:attrs_num - 1)) deallocate( attrs_tmp ) endif axis % attrs(attrs_num) % attrname = attrname axis % attrs(attrs_num) % attrtype = 'Logical' axis % attrs(attrs_num) % array = .false. axis % attrs(attrs_num) % Logicalvalue = value call EndSub(subname) end subroutine HistoryAxisAddAttrLogical0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value : | real, intent(in) |
subroutine HistoryAxisAddAttrReal0( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisInquire use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use gtool_history_internal, only: default, copy_attrs use gtdata_generic, only: Put_Attr use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP use dc_string, only: toChar, JoinChar use dc_url, only: GT_PLUS implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 real, intent(in):: value type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:) integer:: attrs_num character(STRING) :: name character(*), parameter:: subname = "HistoryAxisAddAttrReal0" continue call BeginSub(subname, 'attrname=<%c>, value=<%c>', c1=trim(attrname), c2=trim(toChar(value))) call HistoryAxisInquire( axis, name ) call DbgMessage('axis name=<%c>', c1=trim(name)) ! これまでの属性を保持しつつ配列を1つ増やす if ( .not. associated(axis % attrs) ) then allocate( axis % attrs(1) ) attrs_num = 1 else attrs_num = size( axis % attrs ) + 1 ! 配列データの領域確保 allocate( attrs_tmp(attrs_num - 1) ) call copy_attrs( from = axis % attrs(1:attrs_num - 1), to = attrs_tmp(1:attrs_num - 1)) deallocate( axis % attrs ) allocate( axis % attrs(attrs_num) ) call copy_attrs( from = attrs_tmp(1:attrs_num - 1), to = axis % attrs(1:attrs_num - 1)) deallocate( attrs_tmp ) endif axis % attrs(attrs_num) % attrname = attrname axis % attrs(attrs_num) % attrtype = 'Real' axis % attrs(attrs_num) % array = .false. axis % attrs(attrs_num) % Realvalue = value call EndSub(subname) end subroutine HistoryAxisAddAttrReal0
Subroutine : | |||
axis : | type(GT_HISTORY_AXIS),intent(inout) | ||
attrname : | character(*), intent(in)
| ||
value(:) : | real, intent(in) |
subroutine HistoryAxisAddAttrReal1( axis, attrname, value) ! ! use gtool_history_generic, only: HistoryAxisInquire use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR use gtool_history_internal, only: default, copy_attrs use gtdata_generic, only: Put_Attr use dc_trace, only: BeginSub, EndSub, DbgMessage use dc_types, only: STRING, TOKEN, DP use dc_string, only: toChar, JoinChar use dc_url, only: GT_PLUS implicit none type(GT_HISTORY_AXIS),intent(inout) :: axis character(*), intent(in):: attrname ! 属性の名前 real, intent(in):: value(:) type(GT_HISTORY_ATTR), pointer:: attrs_tmp(:) integer:: attrs_num character(STRING) :: name character(*), parameter:: subname = "HistoryAxisAddAttrReal1" continue call BeginSub(subname, 'attrname=<%c>, value=<%c>', c1=trim(attrname), c2=trim(toChar(value))) call HistoryAxisInquire( axis, name ) call DbgMessage('axis name=<%c>', c1=trim(name)) ! これまでの属性を保持しつつ配列を1つ増やす if ( .not. associated(axis % attrs) ) then allocate( axis % attrs(1) ) attrs_num = 1 else attrs_num = size( axis % attrs ) + 1 ! 配列データの領域確保 allocate( attrs_tmp(attrs_num - 1) ) call copy_attrs( from = axis % attrs(1:attrs_num - 1), to = attrs_tmp(1:attrs_num - 1)) deallocate( axis % attrs ) allocate( axis % attrs(attrs_num) ) call copy_attrs( from = attrs_tmp(1:attrs_num - 1), to = axis % attrs(1:attrs_num - 1)) deallocate( attrs_tmp ) endif axis % attrs(attrs_num) % attrname = attrname axis % attrs(attrs_num) % attrtype = 'Real' axis % attrs(attrs_num) % array = .true. allocate( axis % attrs(attrs_num) % Realarray( size(value) ) ) axis % attrs(attrs_num) % Realarray = value call EndSub(subname) end subroutine HistoryAxisAddAttrReal1