historyaxiscopy.f90 File Reference

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)
 

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 
)

Definition at line 12 of file historyaxiscopy.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), gtool_history_internal::default, and dc_trace::endsub().

12  !
13  !== GT_HISTORY_AXIS 型変数コピー
14  !
15  ! GT_HISTORY_AXIS 型の変数 *axis_src* を
16  ! *axis_dest* にコピーします。
17  ! *axis_src* は HistoryAxisCreate によって初期設定されている必要が
18  ! あります。
19  ! さらに属性を付加する場合には HistoryAxisAddAttr
20  ! を用いてください。
21  !
22  ! *err* を与えておくと、コピーの際何らかの不具合が生じても
23  ! 終了せずに err が真になって返ります。
24  !
25  ! *err* 以降の引数は、コピーの際に上書きする値です。
26  !
29  use dc_trace, only: beginsub, endsub, dbgmessage
30  use dc_present,only: present_select
31  implicit none
32  type(gt_history_axis),intent(out) :: axis_dest ! コピー先 GT_HISTORY_AXIS
33  type(gt_history_axis),intent(in) :: axis_src ! コピー元 GT_HISTORY_AXIS
34  logical, intent(out), optional :: err
35  character(*) , intent(in), optional:: name ! 次元変数名
36  integer, intent(in), optional:: length ! 次元長 (配列サイズ)
37  character(*) , intent(in), optional:: longname ! 次元変数の記述的名称
38  character(*) , intent(in), optional:: units ! 次元変数の単位
39  character(*) , intent(in), optional:: xtype ! 次元変数の型
40  character(*), parameter:: subname = "HistoryAxisCopy1"
41  continue
42  call beginsub(subname)
43  axis_dest % name = present_select('', axis_src % name, name)
44  axis_dest % length = present_select(.false., axis_src % length, length)
45  axis_dest % longname = present_select('', axis_src % longname, longname)
46  axis_dest % units = present_select('', axis_src % units, units)
47  axis_dest % xtype = present_select('', axis_src % xtype, xtype)
48 
49  if (associated( axis_src % attrs ) ) then
50  allocate( axis_dest % attrs( size( axis_src % attrs) ) )
51  call copy_attrs( from = axis_src % attrs, &
52  & to = axis_dest % attrs, err = err)
53  end if
54  call endsub(subname)
type(gt_history), target, save, public default
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
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 
)

Definition at line 61 of file historyaxiscopy.f90.

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

61  !
62  ! 使用方法は HistoryAxisCopy と同様です.
63  !
64  ! Usage is same as "HistoryAxisCopy".
65  !
66  !--
67  ! 総称名 Copy として提供するための関数です.
68  ! 機能は HistoryAxisCopy1 と同じです.
69  !++
72  use dc_trace, only: beginsub, endsub, dbgmessage
73  implicit none
74  type(gt_history_axis),intent(out) :: axis_dest ! コピー先 GT_HISTORY_AXIS
75  type(gt_history_axis),intent(in) :: axis_src ! コピー元 GT_HISTORY_AXIS
76  logical, intent(out), optional :: err
77  character(*) , intent(in), optional:: name ! 次元変数名
78  integer, intent(in), optional:: length ! 次元長 (配列サイズ)
79  character(*) , intent(in), optional:: longname ! 次元変数の記述的名称
80  character(*) , intent(in), optional:: units ! 次元変数の単位
81  character(*) , intent(in), optional:: xtype ! 次元変数の型
82  character(*), parameter:: subname = "HistoryAxisCopy2"
83  continue
84  call beginsub(subname)
85  call historyaxiscopy(axis_dest, axis_src, err, &
86  & name, length, longname, units, xtype)
87  call endsub(subname)
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
Here is the call graph for this function: