gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
hstnmlinforedefine.f90
Go to the documentation of this file.
1!> @file hstnmlinforedefine.f90
2!>
3!> @author Yasuhiro MORIKAWA
4!> @copyright Copyright (C) GFD Dennou Club, 2007-2026. All rights reserved. <br/>
5!> License is BSD-2-Clause. See [COPYRIGHT](@ref COPYRIGHT) in detail
6!>
7!> @en
8!> @brief Transit from output mode to define mode
9!> @enden
10!>
11!> @ja
12!> @brief 出力モードから定義モードに移行
13!> @endja
14
15 !> @en
16 !> @brief Return from output mode to define mode
17 !>
18 !> Return from output mode to define mode,
19 !> information can be configured again.
20 !> Use HstNmlInfoEndDefine again and
21 !> transit from define mode to output mode,
22 !> before HstNmlInfoAssocGTHist is used.
23 !> HstNmlInfoAdd, HstNmlInfoDelete, HstNmlInfoResetDefault
24 !> can be used again after
25 !> this subroutine is used.
26 !>
27 !> If @p gthstnml is not initialized by HstNmlInfoCreate yet,
28 !> error is occurred.
29 !> @enden
30 !>
31 !> @ja
32 !> @brief 出力モードから定義モードに戻す
33 !>
34 !> 出力モードから定義モードに戻り,
35 !> 再び情報を設定可能にします.
36 !> HstNmlInfoAssocGTHist サブルーチンを呼び出す前には,
37 !> 再度 HstNmlInfoEndDefine を呼び出して定義モードへと移行してください.
38 !> このサブルーチンを呼んだ後でなら, 再度
39 !> HstNmlInfoAdd, HstNmlInfoDelete, HstNmlInfoResetDefault
40 !> を呼ぶことが可能です.
41 !>
42 !> なお, 与えられた @p gthstnml が HstNmlInfoCreate によって初期設定
43 !> されていない場合にも, プログラムはエラーを発生させます.
44 !> @endja
45 !>
46 !> @param[inout] gthstnml gtool_history_nmlinfo_types::GTHST_NMLINFO 型変数
47 !> @param[out] err 例外処理用フラグ. Exception handling flag.
48 subroutine hstnmlinforedefine( gthstnml, err )
50 use dc_trace, only: beginsub, endsub
51 use dc_types, only: string
53 implicit none
54 type(gthst_nmlinfo), intent(inout):: gthstnml
55 logical, intent(out), optional:: err
56 ! 例外処理用フラグ.
57 ! デフォルトでは, この手続き内でエラーが
58 ! 生じた場合, プログラムは強制終了します.
59 ! 引数 *err* が与えられる場合,
60 ! プログラムは強制終了せず, 代わりに
61 ! *err* に .true. が代入されます.
62 !
63 ! Exception handling flag.
64 ! By default, when error occur in
65 ! this procedure, the program aborts.
66 ! If this *err* argument is given,
67 ! .true. is substituted to *err* and
68 ! the program does not abort.
69
70 !-----------------------------------
71 ! 作業変数
72 ! Work variables
73 integer:: stat
74 character(STRING):: cause_c
75 character(*), parameter:: subname = 'HstNmlInfoReDefine'
76 continue
77 call beginsub( subname )
78 stat = dc_noerr
79 cause_c = ''
80
81 !-----------------------------------------------------------------
82 ! 初期設定のチェック
83 ! Check initialization
84 !-----------------------------------------------------------------
85 if ( .not. gthstnml % initialized ) then
86 stat = dc_enotinit
87 cause_c = 'GTHST_NMLINFO'
88 goto 999
89 end if
90
91 if ( gthstnml % define_mode ) then
92 stat = hst_eindefine
93 cause_c = 'ReDefine'
94 goto 999
95 end if
96
97 !-----------------------------------------------------------------
98 ! 定義モードへと戻る
99 ! Return to define mode
100 !-----------------------------------------------------------------
101 gthstnml % define_mode = .true.
102
103 !-----------------------------------------------------------------
104 ! 終了処理, 例外処理
105 ! Termination and Exception handling
106 !-----------------------------------------------------------------
107999 continue
108 call storeerror( stat, subname, err, cause_c )
109 call endsub( subname )
110 end subroutine hstnmlinforedefine
subroutine hstnmlinforedefine(gthstnml, err)
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 dc_noerr
Error storage variables
Definition dc_error.f90:468
integer, parameter, public hst_eindefine
Definition dc_error.f90:558
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:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public string
Character length for string
Definition dc_types.f90:137