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

Settings of data of axes . More...

Go to the source code of this file.

Functions/Subroutines

subroutine historyautoputaxisreal (dim, array)
subroutine historyautoputaxisdouble (dim, array)
subroutine historyautoputaxisint (dim, array)

Detailed Description

Settings of data of axes

.

Author
Yasuhiro MORIKAWA

Definition in file historyautoputaxis.f90.

Function/Subroutine Documentation

◆ historyautoputaxisdouble()

subroutine historyautoputaxisdouble ( character(*), intent(in) dim,
real(dp), dimension(:), intent(in) array )

Set data of an axis.

Parameters
[in]dimName of axis. Note that this value must be set as dims of HistoryAutoCreate.
[in]arrayData of axis. Integer, single or double precision are acceptable as data type. Note that when this is output to a file, data type is converted into xtypes specified in HistoryAutoCreate.

Definition at line 167 of file historyautoputaxis.f90.

171 use gtool_history, only: historyaxisinquire, historyaxisaddattr, &
172 & historyvarinfocreate
173 use dc_trace, only: beginsub, endsub
174 use dc_error, only: storeerror, dc_noerr, &
176 use dc_types, only: string, dp
177
178 implicit none
179 character(*), intent(in):: dim
180 ! 座標の名称.
181 !
182 ! ただし, ここで指定するもの
183 ! は, HistoryAutoCreate の *dims*
184 ! 既に指定されていなければなりません.
185 !
186 ! Name of axis.
187 !
188 ! Note that this value must be set
189 ! as "dims" of "HistoryAutoCreate".
190 !
191 real(DP), intent(in):: array(:)
192 ! 座標データ
193 !
194 ! データ型は整数, 単精度実数型,
195 ! 倍精度実数型のどれでもかまいません.
196 ! ただし, ファイルへ出力される際には,
197 ! HistoryAutoCreate の *xtypes* で指定した
198 ! データ型へ変換されます.
199 !
200 ! Data of axis
201 !
202 ! Integer, single or double precision are
203 ! acceptable as data type.
204 ! Note that when this is output to a file,
205 ! data type is converted into "xtypes"
206 ! specified in "HistoryAutoCreate"
207 !
208
209 character(STRING):: name
210 integer:: stat, i
211 character(STRING):: cause_c
212 character(*), parameter:: subname = "HistoryAutoPutAxisDouble"
213 continue
214 call beginsub(subname, 'dim=<%c>', c1=trim(dim) )
215 stat = dc_noerr
216 cause_c = ""
217
218 ! 初期設定チェック
219 ! Check initialization
220 !
221 if ( .not. initialized ) then
222 stat = dc_enotinit
223 cause_c = 'gtool_historyauto'
224 goto 999
225 end if
226
227 do i = 1, numdims
228 call historyaxisinquire( &
229 & axis = gthst_axes(i), & ! (in)
230 & name = name ) ! (out)
231 if ( trim(dim) == trim(name) ) then
232 data_axes(i) % a_axis = array
233 goto 999
234 end if
235 end do
236
237 stat = hst_enoaxisname
238 cause_c = dim
239
240999 continue
241 call storeerror(stat, subname, cause_c = cause_c)
242 call endsub(subname)
Error handling module.
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
Definition dc_error.f90:534
integer, parameter, public hst_enoaxisname
Definition dc_error.f90:565
integer, parameter, public dc_noerr
Error storage variables
Definition dc_error.f90:468
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
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public string
Character length for string
Definition dc_types.f90:137
integer, parameter, public dp
Double Precision Real number
Definition dc_types.f90:92
type(gt_history_axis), dimension(1:nf90_max_dims), target, save, public gthst_axes
type(gt_history_axis_data), dimension(1:nf90_max_dims), target, save, public data_axes

References dc_trace::beginsub(), gtool_historyauto_internal::data_axes, dc_error::dc_enotinit, dc_error::dc_noerr, dc_types::dp, dc_trace::endsub(), gtool_historyauto_internal::gthst_axes, dc_error::hst_enoaxisname, gtool_historyauto_internal::initialized, gtool_historyauto_internal::numdims, dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function:

◆ historyautoputaxisint()

subroutine historyautoputaxisint ( character(*), intent(in) dim,
integer, dimension(:), intent(in) array )

Set data of an axis.

Parameters
[in]dimName of axis. Note that this value must be set as dims of HistoryAutoCreate.
[in]arrayData of axis. Integer, single or double precision are acceptable as data type. Note that when this is output to a file, data type is converted into xtypes specified in HistoryAutoCreate.

Definition at line 275 of file historyautoputaxis.f90.

279 use gtool_history, only: historyaxisinquire, historyaxisaddattr, &
280 & historyvarinfocreate
281 use dc_trace, only: beginsub, endsub
282 use dc_error, only: storeerror, dc_noerr, &
284 use dc_types, only: string
285
286 implicit none
287 character(*), intent(in):: dim
288 ! 座標の名称.
289 !
290 ! ただし, ここで指定するもの
291 ! は, HistoryAutoCreate の *dims*
292 ! 既に指定されていなければなりません.
293 !
294 ! Name of axis.
295 !
296 ! Note that this value must be set
297 ! as "dims" of "HistoryAutoCreate".
298 !
299 integer, intent(in):: array(:)
300 ! 座標データ
301 !
302 ! データ型は整数, 単精度実数型,
303 ! 倍精度実数型のどれでもかまいません.
304 ! ただし, ファイルへ出力される際には,
305 ! HistoryAutoCreate の *xtypes* で指定した
306 ! データ型へ変換されます.
307 !
308 ! Data of axis
309 !
310 ! Integer, single or double precision are
311 ! acceptable as data type.
312 ! Note that when this is output to a file,
313 ! data type is converted into "xtypes"
314 ! specified in "HistoryAutoCreate"
315 !
316
317 character(STRING):: name
318 integer:: stat, i
319 character(STRING):: cause_c
320 character(*), parameter:: subname = "HistoryAutoPutAxisInt"
321 continue
322 call beginsub(subname, 'dim=<%c>', c1=trim(dim) )
323 stat = dc_noerr
324 cause_c = ""
325
326 ! 初期設定チェック
327 ! Check initialization
328 !
329 if ( .not. initialized ) then
330 stat = dc_enotinit
331 cause_c = 'gtool_historyauto'
332 goto 999
333 end if
334
335 do i = 1, numdims
336 call historyaxisinquire( &
337 & axis = gthst_axes(i), & ! (in)
338 & name = name ) ! (out)
339 if ( trim(dim) == trim(name) ) then
340 data_axes(i) % a_axis = array
341 goto 999
342 end if
343 end do
344
345 stat = hst_enoaxisname
346 cause_c = dim
347
348999 continue
349 call storeerror(stat, subname, cause_c = cause_c)
350 call endsub(subname)

References dc_trace::beginsub(), gtool_historyauto_internal::data_axes, dc_error::dc_enotinit, dc_error::dc_noerr, dc_trace::endsub(), gtool_historyauto_internal::gthst_axes, dc_error::hst_enoaxisname, gtool_historyauto_internal::initialized, gtool_historyauto_internal::numdims, dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function:

◆ historyautoputaxisreal()

subroutine historyautoputaxisreal ( character(*), intent(in) dim,
real, dimension(:), intent(in) array )

Set data of an axis.

Parameters
[in]dimName of axis. Note that this value must be set as dims of HistoryAutoCreate.
[in]arrayData of axis. Integer, single or double precision are acceptable as data type. Note that when this is output to a file, data type is converted into xtypes specified in HistoryAutoCreate.

Definition at line 59 of file historyautoputaxis.f90.

63 use gtool_history, only: historyaxisinquire, historyaxisaddattr, &
64 & historyvarinfocreate
65 use dc_trace, only: beginsub, endsub
66 use dc_error, only: storeerror, dc_noerr, &
68 use dc_types, only: string
69
70 implicit none
71 character(*), intent(in):: dim
72 ! 座標の名称.
73 !
74 ! ただし, ここで指定するもの
75 ! は, HistoryAutoCreate の *dims*
76 ! 既に指定されていなければなりません.
77 !
78 ! Name of axis.
79 !
80 ! Note that this value must be set
81 ! as "dims" of "HistoryAutoCreate".
82 !
83 real, intent(in):: array(:)
84 ! 座標データ
85 !
86 ! データ型は整数, 単精度実数型,
87 ! 倍精度実数型のどれでもかまいません.
88 ! ただし, ファイルへ出力される際には,
89 ! HistoryAutoCreate の *xtypes* で指定した
90 ! データ型へ変換されます.
91 !
92 ! Data of axis
93 !
94 ! Integer, single or double precision are
95 ! acceptable as data type.
96 ! Note that when this is output to a file,
97 ! data type is converted into "xtypes"
98 ! specified in "HistoryAutoCreate"
99 !
100
101 character(STRING):: name
102 integer:: stat, i
103 character(STRING):: cause_c
104 character(*), parameter:: subname = "HistoryAutoPutAxisReal"
105 continue
106 call beginsub(subname, 'dim=<%c>', c1=trim(dim) )
107 stat = dc_noerr
108 cause_c = ""
109
110 ! 初期設定チェック
111 ! Check initialization
112 !
113 if ( .not. initialized ) then
114 stat = dc_enotinit
115 cause_c = 'gtool_historyauto'
116 goto 999
117 end if
118
119 do i = 1, numdims
120 call historyaxisinquire( &
121 & axis = gthst_axes(i), & ! (in)
122 & name = name ) ! (out)
123 if ( trim(dim) == trim(name) ) then
124 data_axes(i) % a_axis = array
125 goto 999
126 end if
127 end do
128
129 stat = hst_enoaxisname
130 cause_c = dim
131
132999 continue
133 call storeerror(stat, subname, cause_c = cause_c)
134 call endsub(subname)

References dc_trace::beginsub(), gtool_historyauto_internal::data_axes, dc_error::dc_enotinit, dc_error::dc_noerr, dc_trace::endsub(), gtool_historyauto_internal::gthst_axes, dc_error::hst_enoaxisname, gtool_historyauto_internal::initialized, gtool_historyauto_internal::numdims, dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function: