gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
historyaxiscopy.f90
Go to the documentation of this file.
1
14
62 subroutine historyaxiscopy1(axis_dest, axis_src, err, &
63 & name, length, longname, units, xtype)
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)
94 end subroutine historyaxiscopy1
95
96 !-------------------------------------------------------------------
97
108 subroutine historyaxiscopy2(axis_dest, axis_src, err, &
109 & name, length, longname, units, xtype)
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)
128 end subroutine historyaxiscopy2
subroutine historyaxiscopy2(axis_dest, axis_src, err, name, length, longname, units, xtype)
subroutine historyaxiscopy1(axis_dest, axis_src, err, name, length, longname, units, xtype)
Judge optional control parameters.
Handling character types.
Definition dc_string.f90:83
Debug tracing module.
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:457
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:580