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

GT_HISTORY_AXIS のコピー . More...

Go to the source code of this file.

Functions/Subroutines

subroutine historyaxiscopy1 (axis_dest, axis_src, err, name, length, longname, units, xtype)
subroutine historyaxiscopy2 (axis_dest, axis_src, err, name, length, longname, units, xtype)

Detailed Description

GT_HISTORY_AXIS のコピー .

Author
Yasuhiro MORIKAWA

Definition in file historyaxiscopy.f90.

Function/Subroutine Documentation

◆ historyaxiscopy1()

subroutine historyaxiscopy1 ( type(gt_history_axis), intent(out) axis_dest,
type(gt_history_axis), intent(in) axis_src,
logical, intent(out), optional err,
character(*), intent(in), optional name,
integer, intent(in), optional length,
character(*), intent(in), optional longname,
character(*), intent(in), optional units,
character(*), intent(in), optional xtype )

GT_HISTORY_AXIS 型変数コピー

GT_HISTORY_AXIS 型の変数 axis_src を axis_dest にコピーします。 axis_src は HistoryAxisCreate によって初期設定されている必要が あります。 さらに属性を付加する場合には HistoryAxisAddAttr を用いてください。

err を与えておくと、コピーの際何らかの不具合が生じても 終了せずに err が真になって返ります。

err 以降の引数は、コピーの際に上書きする値です。

Parameters
[out]axis_destコピー先 GT_HISTORY_AXIS
[in]axis_srcコピー元 GT_HISTORY_AXIS
[out]errエラーフラグ (省略可能)
[in]name次元変数名 (省略可能, 上書き)
[in]length次元長 (省略可能, 上書き)
[in]longname次元変数の記述的名称 (省略可能, 上書き)
[in]units次元変数の単位 (省略可能, 上書き)
[in]xtype次元変数の型 (省略可能, 上書き)

Definition at line 62 of file historyaxiscopy.f90.

64 !
67 use dc_trace, only: beginsub, endsub
68 use dc_present, only: present_select
69 use dc_string, only: cprintft
70 implicit none
71 type(GT_HISTORY_AXIS),intent(out) :: axis_dest ! コピー先 GT_HISTORY_AXIS
72 type(GT_HISTORY_AXIS),intent(in) :: axis_src ! コピー元 GT_HISTORY_AXIS
73 logical, intent(out), optional :: err
74 character(*) , intent(in), optional:: name ! 次元変数名
75 integer, intent(in), optional:: length ! 次元長 (配列サイズ)
76 character(*) , intent(in), optional:: longname ! 次元変数の記述的名称
77 character(*) , intent(in), optional:: units ! 次元変数の単位
78 character(*) , intent(in), optional:: xtype ! 次元変数の型
79 character(*), parameter:: subname = "HistoryAxisCopy1"
80 continue
81 call beginsub(subname)
82 axis_dest % name = cprintft('%c', c1=present_select('', axis_src % name, name))
83 axis_dest % length = present_select(.false., axis_src % length, length)
84 axis_dest % longname = present_select('', axis_src % longname, longname)
85 axis_dest % units = present_select('', axis_src % units, units)
86 axis_dest % xtype = cprintft('%c', c1=present_select('', axis_src % xtype, xtype))
87
88 if (associated( axis_src % attrs ) ) then
89 allocate( axis_dest % attrs( size( axis_src % attrs) ) )
90 call copy_attrs( from = axis_src % attrs, &
91 & to = axis_dest % attrs, err = err)
92 end if
93 call endsub(subname)
省略可能な制御パラメータの判定
文字型変数の操作
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

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

Here is the call graph for this function:

◆ historyaxiscopy2()

subroutine historyaxiscopy2 ( type(gt_history_axis), intent(out) axis_dest,
type(gt_history_axis), intent(in) axis_src,
logical, intent(out), optional err,
character(*), intent(in), optional name,
integer, intent(in), optional length,
character(*), intent(in), optional longname,
character(*), intent(in), optional units,
character(*), intent(in), optional xtype )

GT_HISTORY_AXIS 型変数コピー (総称インターフェース)

使用方法は HistoryAxisCopy と同様です。

Definition at line 108 of file historyaxiscopy.f90.

112 use dc_trace, only: beginsub, endsub
113 implicit none
114 type(GT_HISTORY_AXIS),intent(out) :: axis_dest ! コピー先 GT_HISTORY_AXIS
115 type(GT_HISTORY_AXIS),intent(in) :: axis_src ! コピー元 GT_HISTORY_AXIS
116 logical, intent(out), optional :: err
117 character(*) , intent(in), optional:: name ! 次元変数名
118 integer, intent(in), optional:: length ! 次元長 (配列サイズ)
119 character(*) , intent(in), optional:: longname ! 次元変数の記述的名称
120 character(*) , intent(in), optional:: units ! 次元変数の単位
121 character(*) , intent(in), optional:: xtype ! 次元変数の型
122 character(*), parameter:: subname = "HistoryAxisCopy2"
123 continue
124 call beginsub(subname)
125 call historyaxiscopy(axis_dest, axis_src, err, &
126 & name, length, longname, units, xtype)
127 call endsub(subname)

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

Here is the call graph for this function: