gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Functions/Subroutines
historyaxiscopy.f90 File Reference

Copy 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

Copy 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 
)

Copy a GT_HISTORY_AXIS variable

Copies the GT_HISTORY_AXIS variable axis_src to axis_dest. axis_src must be initialized by HistoryAxisCreate. To add attributes, use HistoryAxisAddAttr.

If err is given, the program does not abort on error; instead, err returns .true.

Arguments after err are values to override during copy.

Parameters
[out]axis_destDestination GT_HISTORY_AXIS
[in]axis_srcSource GT_HISTORY_AXIS
[out]errError flag (optional)
[in]nameDimension variable name (optional, override)
[in]lengthDimension length (optional, override)
[in]longnameDescriptive name (optional, override)
[in]unitsUnits (optional, override)
[in]xtypeType (optional, override)

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)
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

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 
)

Copy a GT_HISTORY_AXIS variable (generic interface)

Usage is same as 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: