historyautoaddattr.f90
Go to the documentation of this file.
1 !--
2 ! *** Caution!! ***
3 !
4 ! This file is generated from "historyautoaddattr.rb2f90" by Ruby 2.3.3.
5 ! Please do not edit this file directly.
6 !
7 ! [JAPANESE]
8 !
9 ! ※※※ 注意!!! ※※※
10 !
11 ! このファイルは "historyautoaddattr.rb2f90" から Ruby 2.3.3
12 ! によって自動生成されたファイルです.
13 ! このファイルを直接編集しませんようお願い致します.
14 !
15 !
16 !++
17 !
18 != 属性付加
19 != Add Attributes
20 !
21 ! Authors:: Yasuhiro MORIKAWA
22 ! Version:: $Id: historyautoaddattr.rb2f90,v 1.1 2009-05-10 12:19:18 morikawa Exp $
23 ! Tag Name:: $Name: $
24 ! Copyright:: Copyright (C) GFD Dennou Club, 2008-2009. All rights reserved.
25 ! License:: See COPYRIGHT[link:../../../COPYRIGHT]
26 !
27 
28  subroutine historyautoaddattrchar0( &
29  & varname, attrname, value & ! (in)
30  & )
31  !
32  !
33  ! 座標変数および座標重み変数に属性を付加します.
34  ! このサブルーチンを用いる前に, HistoryAutoCreate による初期設定が
35  ! 必要です.
36  !
37  ! * 座標変数については, HistoryAutoCreate の "dims" に与えられた
38  ! もののみ指定可能です.
39  !
40  ! * 座標重み変数については, HistoryAutoAddWeight で与えられた
41  ! もののみ指定可能です.
42  !
43  ! * *HistoryAutoAddAttr* は複数のサブルーチンの総称名です. *value*
44  ! にはいくつかの型を与えることが可能です.
45  ! 下記のサブルーチンを参照ください.
46  !
47  ! Add attributes axes or weights of axes.
48  ! Initialization by "HistoryAutoCreate" is needed
49  ! before use of this subroutine.
50  !
51  ! * About axes, "dims" specified by "HistoryAutoCreate" can be
52  ! specified.
53  !
54  ! * About weights of axes, "dims" specified by "HistoryAutoAddWeight"
55  ! can be specified.
56  !
57  ! * "HistoryAutoAddAttr" is a generic name of multiple subroutines.
58  ! Then some data type can be specified to "value".
59  !
60 
61  !
64  use gtool_history, only: historyaxisaddattr, historyaxisinquire, &
65  & historyvarinfoaddattr, historyvarinfoinquire
66  use dc_trace, only: beginsub, endsub
68  use dc_string, only: tochar
69  use dc_types, only: dp, string, token
70  implicit none
71  character(*), intent(in):: varname
72  ! 変数の名前.
73  !
74  ! ここで指定するものは,
75  ! HistoryAutoCreate の *dims* ,
76  ! または HistoryAutoAddWeight の
77  ! *varname* で既に指定されてい
78  ! なければなりません.
79  !
80  ! Name of a variable.
81  !
82  ! This must be specified with *dims*
83  ! in HistoryAutoCreate, or
84  ! *varname* in "HistoryAutoAddWeight".
85  !
86 
87  character(*), intent(in):: attrname
88  ! 属性の名前.
89  ! Name of an attribute.
90 
91  character(*), intent(in):: value
92  ! 属性の値.
93  ! Value of an attribute.
94 
95 
96  character(STRING):: name
97  integer:: stat, i
98  character(STRING):: cause_c
99  character(*), parameter:: subname = "HistoryAutoAddAttrChar0"
100  continue
101  call beginsub(subname, &
102  & 'varname=<%c> attrname=<%c>, value=<%c>', &
103  & c1=trim(varname), c2=trim(attrname), c3=trim(value))
104  stat = dc_noerr
105  cause_c = ""
106 
107  ! 初期設定チェック
108  ! Check initialization
109  !
110  if ( .not. initialized ) then
111  stat = dc_enotinit
112  cause_c = 'gtool_historyauto'
113  goto 999
114  end if
115 
116  do i = 1, numdims
117  call historyaxisinquire( &
118  & axis = gthst_axes(i), & ! (in)
119  & name = name ) ! (out)
120  if ( trim(varname) == trim(name) ) then
121  call historyaxisaddattr( &
122  & axis = gthst_axes(i), & ! (inout)
123  & attrname = attrname, value = value ) ! (in)
124  goto 999
125  end if
126  end do
127 
128  do i = 1, numwgts
129  call historyvarinfoinquire( &
130  & varinfo = gthst_weights(i), & ! (in)
131  & name = name ) ! (out)
132  if ( trim(varname) == trim(name) ) then
133  call historyvarinfoaddattr( &
134  & varinfo = gthst_weights(i), & ! (inout)
135  & attrname = attrname, value = value ) ! (in)
136  goto 999
137  end if
138  end do
139 
140  stat = hst_enoaxisname
141  cause_c = varname
142 
143 999 continue
144  call storeerror(stat, subname, cause_c = cause_c)
145  call endsub(subname)
146  end subroutine historyautoaddattrchar0
147 
148 
149  subroutine historyautoaddattrlogical0( &
150  & varname, attrname, value & ! (in)
151  & )
152  !
153 
154  !
157  use gtool_history, only: historyaxisaddattr, historyaxisinquire, &
158  & historyvarinfoaddattr, historyvarinfoinquire
159  use dc_trace, only: beginsub, endsub
161  use dc_string, only: tochar
162  use dc_types, only: dp, string, token
163  implicit none
164  character(*), intent(in):: varname
165 
166  character(*), intent(in):: attrname
167 
168  logical, intent(in):: value
169 
170 
171  character(STRING):: name
172  integer:: stat, i
173  character(STRING):: cause_c
174  character(*), parameter:: subname = "HistoryAutoAddAttrLogical0"
175  continue
176  call beginsub(subname, &
177  & 'varname=<%c> attrname=<%c>, value=<%c>', &
178  & c1=trim(varname), c2=trim(attrname), c3=trim(tochar(value)))
179  stat = dc_noerr
180  cause_c = ""
181 
182  ! 初期設定チェック
183  ! Check initialization
184  !
185  if ( .not. initialized ) then
186  stat = dc_enotinit
187  cause_c = 'gtool_historyauto'
188  goto 999
189  end if
190 
191  do i = 1, numdims
192  call historyaxisinquire( &
193  & axis = gthst_axes(i), & ! (in)
194  & name = name ) ! (out)
195  if ( trim(varname) == trim(name) ) then
196  call historyaxisaddattr( &
197  & axis = gthst_axes(i), & ! (inout)
198  & attrname = attrname, value = value ) ! (in)
199  goto 999
200  end if
201  end do
202 
203  do i = 1, numwgts
204  call historyvarinfoinquire( &
205  & varinfo = gthst_weights(i), & ! (in)
206  & name = name ) ! (out)
207  if ( trim(varname) == trim(name) ) then
208  call historyvarinfoaddattr( &
209  & varinfo = gthst_weights(i), & ! (inout)
210  & attrname = attrname, value = value ) ! (in)
211  goto 999
212  end if
213  end do
214 
215  stat = hst_enoaxisname
216  cause_c = varname
217 
218 999 continue
219  call storeerror(stat, subname, cause_c = cause_c)
220  call endsub(subname)
221  end subroutine historyautoaddattrlogical0
222 
223 
224  subroutine historyautoaddattrint0( &
225  & varname, attrname, value & ! (in)
226  & )
227  !
228 
229  !
232  use gtool_history, only: historyaxisaddattr, historyaxisinquire, &
233  & historyvarinfoaddattr, historyvarinfoinquire
234  use dc_trace, only: beginsub, endsub
236  use dc_string, only: tochar
237  use dc_types, only: dp, string, token
238  implicit none
239  character(*), intent(in):: varname
240 
241  character(*), intent(in):: attrname
242 
243  integer, intent(in):: value
244 
245 
246  character(STRING):: name
247  integer:: stat, i
248  character(STRING):: cause_c
249  character(*), parameter:: subname = "HistoryAutoAddAttrInt0"
250  continue
251  call beginsub(subname, &
252  & 'varname=<%c> attrname=<%c>, value=<%c>', &
253  & c1=trim(varname), c2=trim(attrname), c3=trim(tochar(value)))
254  stat = dc_noerr
255  cause_c = ""
256 
257  ! 初期設定チェック
258  ! Check initialization
259  !
260  if ( .not. initialized ) then
261  stat = dc_enotinit
262  cause_c = 'gtool_historyauto'
263  goto 999
264  end if
265 
266  do i = 1, numdims
267  call historyaxisinquire( &
268  & axis = gthst_axes(i), & ! (in)
269  & name = name ) ! (out)
270  if ( trim(varname) == trim(name) ) then
271  call historyaxisaddattr( &
272  & axis = gthst_axes(i), & ! (inout)
273  & attrname = attrname, value = value ) ! (in)
274  goto 999
275  end if
276  end do
277 
278  do i = 1, numwgts
279  call historyvarinfoinquire( &
280  & varinfo = gthst_weights(i), & ! (in)
281  & name = name ) ! (out)
282  if ( trim(varname) == trim(name) ) then
283  call historyvarinfoaddattr( &
284  & varinfo = gthst_weights(i), & ! (inout)
285  & attrname = attrname, value = value ) ! (in)
286  goto 999
287  end if
288  end do
289 
290  stat = hst_enoaxisname
291  cause_c = varname
292 
293 999 continue
294  call storeerror(stat, subname, cause_c = cause_c)
295  call endsub(subname)
296  end subroutine historyautoaddattrint0
297 
298 
299  subroutine historyautoaddattrint1( &
300  & varname, attrname, value & ! (in)
301  & )
302  !
303 
304  !
307  use gtool_history, only: historyaxisaddattr, historyaxisinquire, &
308  & historyvarinfoaddattr, historyvarinfoinquire
309  use dc_trace, only: beginsub, endsub
311  use dc_string, only: tochar
312  use dc_types, only: dp, string, token
313  implicit none
314  character(*), intent(in):: varname
315 
316  character(*), intent(in):: attrname
317 
318  integer, intent(in):: value(:)
319 
320 
321  character(STRING):: name
322  integer:: stat, i
323  character(STRING):: cause_c
324  character(*), parameter:: subname = "HistoryAutoAddAttrInt1"
325  continue
326  call beginsub(subname, &
327  & 'varname=<%c> attrname=<%c>, value=<%c>', &
328  & c1=trim(varname), c2=trim(attrname), c3=trim(tochar(value)))
329  stat = dc_noerr
330  cause_c = ""
331 
332  ! 初期設定チェック
333  ! Check initialization
334  !
335  if ( .not. initialized ) then
336  stat = dc_enotinit
337  cause_c = 'gtool_historyauto'
338  goto 999
339  end if
340 
341  do i = 1, numdims
342  call historyaxisinquire( &
343  & axis = gthst_axes(i), & ! (in)
344  & name = name ) ! (out)
345  if ( trim(varname) == trim(name) ) then
346  call historyaxisaddattr( &
347  & axis = gthst_axes(i), & ! (inout)
348  & attrname = attrname, value = value ) ! (in)
349  goto 999
350  end if
351  end do
352 
353  do i = 1, numwgts
354  call historyvarinfoinquire( &
355  & varinfo = gthst_weights(i), & ! (in)
356  & name = name ) ! (out)
357  if ( trim(varname) == trim(name) ) then
358  call historyvarinfoaddattr( &
359  & varinfo = gthst_weights(i), & ! (inout)
360  & attrname = attrname, value = value ) ! (in)
361  goto 999
362  end if
363  end do
364 
365  stat = hst_enoaxisname
366  cause_c = varname
367 
368 999 continue
369  call storeerror(stat, subname, cause_c = cause_c)
370  call endsub(subname)
371  end subroutine historyautoaddattrint1
372 
373 
374  subroutine historyautoaddattrreal0( &
375  & varname, attrname, value & ! (in)
376  & )
377  !
378 
379  !
382  use gtool_history, only: historyaxisaddattr, historyaxisinquire, &
383  & historyvarinfoaddattr, historyvarinfoinquire
384  use dc_trace, only: beginsub, endsub
386  use dc_string, only: tochar
387  use dc_types, only: dp, string, token
388  implicit none
389  character(*), intent(in):: varname
390 
391  character(*), intent(in):: attrname
392 
393  real, intent(in):: value
394 
395 
396  character(STRING):: name
397  integer:: stat, i
398  character(STRING):: cause_c
399  character(*), parameter:: subname = "HistoryAutoAddAttrReal0"
400  continue
401  call beginsub(subname, &
402  & 'varname=<%c> attrname=<%c>, value=<%c>', &
403  & c1=trim(varname), c2=trim(attrname), c3=trim(tochar(value)))
404  stat = dc_noerr
405  cause_c = ""
406 
407  ! 初期設定チェック
408  ! Check initialization
409  !
410  if ( .not. initialized ) then
411  stat = dc_enotinit
412  cause_c = 'gtool_historyauto'
413  goto 999
414  end if
415 
416  do i = 1, numdims
417  call historyaxisinquire( &
418  & axis = gthst_axes(i), & ! (in)
419  & name = name ) ! (out)
420  if ( trim(varname) == trim(name) ) then
421  call historyaxisaddattr( &
422  & axis = gthst_axes(i), & ! (inout)
423  & attrname = attrname, value = value ) ! (in)
424  goto 999
425  end if
426  end do
427 
428  do i = 1, numwgts
429  call historyvarinfoinquire( &
430  & varinfo = gthst_weights(i), & ! (in)
431  & name = name ) ! (out)
432  if ( trim(varname) == trim(name) ) then
433  call historyvarinfoaddattr( &
434  & varinfo = gthst_weights(i), & ! (inout)
435  & attrname = attrname, value = value ) ! (in)
436  goto 999
437  end if
438  end do
439 
440  stat = hst_enoaxisname
441  cause_c = varname
442 
443 999 continue
444  call storeerror(stat, subname, cause_c = cause_c)
445  call endsub(subname)
446  end subroutine historyautoaddattrreal0
447 
448 
449  subroutine historyautoaddattrreal1( &
450  & varname, attrname, value & ! (in)
451  & )
452  !
453 
454  !
457  use gtool_history, only: historyaxisaddattr, historyaxisinquire, &
458  & historyvarinfoaddattr, historyvarinfoinquire
459  use dc_trace, only: beginsub, endsub
461  use dc_string, only: tochar
462  use dc_types, only: dp, string, token
463  implicit none
464  character(*), intent(in):: varname
465 
466  character(*), intent(in):: attrname
467 
468  real, intent(in):: value(:)
469 
470 
471  character(STRING):: name
472  integer:: stat, i
473  character(STRING):: cause_c
474  character(*), parameter:: subname = "HistoryAutoAddAttrReal1"
475  continue
476  call beginsub(subname, &
477  & 'varname=<%c> attrname=<%c>, value=<%c>', &
478  & c1=trim(varname), c2=trim(attrname), c3=trim(tochar(value)))
479  stat = dc_noerr
480  cause_c = ""
481 
482  ! 初期設定チェック
483  ! Check initialization
484  !
485  if ( .not. initialized ) then
486  stat = dc_enotinit
487  cause_c = 'gtool_historyauto'
488  goto 999
489  end if
490 
491  do i = 1, numdims
492  call historyaxisinquire( &
493  & axis = gthst_axes(i), & ! (in)
494  & name = name ) ! (out)
495  if ( trim(varname) == trim(name) ) then
496  call historyaxisaddattr( &
497  & axis = gthst_axes(i), & ! (inout)
498  & attrname = attrname, value = value ) ! (in)
499  goto 999
500  end if
501  end do
502 
503  do i = 1, numwgts
504  call historyvarinfoinquire( &
505  & varinfo = gthst_weights(i), & ! (in)
506  & name = name ) ! (out)
507  if ( trim(varname) == trim(name) ) then
508  call historyvarinfoaddattr( &
509  & varinfo = gthst_weights(i), & ! (inout)
510  & attrname = attrname, value = value ) ! (in)
511  goto 999
512  end if
513  end do
514 
515  stat = hst_enoaxisname
516  cause_c = varname
517 
518 999 continue
519  call storeerror(stat, subname, cause_c = cause_c)
520  call endsub(subname)
521  end subroutine historyautoaddattrreal1
522 
523 
524  subroutine historyautoaddattrdouble0( &
525  & varname, attrname, value & ! (in)
526  & )
527  !
528 
529  !
532  use gtool_history, only: historyaxisaddattr, historyaxisinquire, &
533  & historyvarinfoaddattr, historyvarinfoinquire
534  use dc_trace, only: beginsub, endsub
536  use dc_string, only: tochar
537  use dc_types, only: dp, string, token
538  implicit none
539  character(*), intent(in):: varname
540 
541  character(*), intent(in):: attrname
542 
543  real(DP), intent(in):: value
544 
545 
546  character(STRING):: name
547  integer:: stat, i
548  character(STRING):: cause_c
549  character(*), parameter:: subname = "HistoryAutoAddAttrDouble0"
550  continue
551  call beginsub(subname, &
552  & 'varname=<%c> attrname=<%c>, value=<%c>', &
553  & c1=trim(varname), c2=trim(attrname), c3=trim(tochar(value)))
554  stat = dc_noerr
555  cause_c = ""
556 
557  ! 初期設定チェック
558  ! Check initialization
559  !
560  if ( .not. initialized ) then
561  stat = dc_enotinit
562  cause_c = 'gtool_historyauto'
563  goto 999
564  end if
565 
566  do i = 1, numdims
567  call historyaxisinquire( &
568  & axis = gthst_axes(i), & ! (in)
569  & name = name ) ! (out)
570  if ( trim(varname) == trim(name) ) then
571  call historyaxisaddattr( &
572  & axis = gthst_axes(i), & ! (inout)
573  & attrname = attrname, value = value ) ! (in)
574  goto 999
575  end if
576  end do
577 
578  do i = 1, numwgts
579  call historyvarinfoinquire( &
580  & varinfo = gthst_weights(i), & ! (in)
581  & name = name ) ! (out)
582  if ( trim(varname) == trim(name) ) then
583  call historyvarinfoaddattr( &
584  & varinfo = gthst_weights(i), & ! (inout)
585  & attrname = attrname, value = value ) ! (in)
586  goto 999
587  end if
588  end do
589 
590  stat = hst_enoaxisname
591  cause_c = varname
592 
593 999 continue
594  call storeerror(stat, subname, cause_c = cause_c)
595  call endsub(subname)
596  end subroutine historyautoaddattrdouble0
597 
598 
599  subroutine historyautoaddattrdouble1( &
600  & varname, attrname, value & ! (in)
601  & )
602  !
603 
604  !
607  use gtool_history, only: historyaxisaddattr, historyaxisinquire, &
608  & historyvarinfoaddattr, historyvarinfoinquire
609  use dc_trace, only: beginsub, endsub
611  use dc_string, only: tochar
612  use dc_types, only: dp, string, token
613  implicit none
614  character(*), intent(in):: varname
615 
616  character(*), intent(in):: attrname
617 
618  real(DP), intent(in):: value(:)
619 
620 
621  character(STRING):: name
622  integer:: stat, i
623  character(STRING):: cause_c
624  character(*), parameter:: subname = "HistoryAutoAddAttrDouble1"
625  continue
626  call beginsub(subname, &
627  & 'varname=<%c> attrname=<%c>, value=<%c>', &
628  & c1=trim(varname), c2=trim(attrname), c3=trim(tochar(value)))
629  stat = dc_noerr
630  cause_c = ""
631 
632  ! 初期設定チェック
633  ! Check initialization
634  !
635  if ( .not. initialized ) then
636  stat = dc_enotinit
637  cause_c = 'gtool_historyauto'
638  goto 999
639  end if
640 
641  do i = 1, numdims
642  call historyaxisinquire( &
643  & axis = gthst_axes(i), & ! (in)
644  & name = name ) ! (out)
645  if ( trim(varname) == trim(name) ) then
646  call historyaxisaddattr( &
647  & axis = gthst_axes(i), & ! (inout)
648  & attrname = attrname, value = value ) ! (in)
649  goto 999
650  end if
651  end do
652 
653  do i = 1, numwgts
654  call historyvarinfoinquire( &
655  & varinfo = gthst_weights(i), & ! (in)
656  & name = name ) ! (out)
657  if ( trim(varname) == trim(name) ) then
658  call historyvarinfoaddattr( &
659  & varinfo = gthst_weights(i), & ! (inout)
660  & attrname = attrname, value = value ) ! (in)
661  goto 999
662  end if
663  end do
664 
665  stat = hst_enoaxisname
666  cause_c = varname
667 
668 999 continue
669  call storeerror(stat, subname, cause_c = cause_c)
670  call endsub(subname)
671  end subroutine historyautoaddattrdouble1
672 
673 !--
674 ! vi:set readonly sw=4 ts=8:
675 !
676 !Local Variables:
677 !mode: f90
678 !buffer-read-only: t
679 !End:
680 !
681 !++
subroutine historyautoaddattrchar0(varname, attrname, value)
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
subroutine historyautoaddattrreal0(varname, attrname, value)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
subroutine historyautoaddattrdouble1(varname, attrname, value)
type(gt_history_varinfo), dimension(1:nf90_max_dims), save, public gthst_weights
type(gt_history_axis), dimension(1:nf90_max_dims), target, save, public gthst_axes
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
subroutine historyautoaddattrdouble0(varname, attrname, value)
subroutine historyautoaddattrreal1(varname, attrname, value)
文字型変数の操作.
Definition: dc_string.f90:24
種別型パラメタを提供します。
Definition: dc_types.f90:49
integer, parameter, public hst_enoaxisname
Definition: dc_error.f90:589
subroutine historyautoaddattrint0(varname, attrname, value)
subroutine historyautoaddattrlogical0(varname, attrname, value)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
subroutine historyautoaddattrint1(varname, attrname, value)
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118