gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
hstnmlinfooutputstepdisable.f90
Go to the documentation of this file.
1!> @file hstnmlinfooutputstepdisable.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 Invalidate HstNmlInfoOutputStep
9!> @enden
10!>
11!> @ja
12!> @brief HstNmlInfoOutputStep の無効化
13!> @endja
14
15 !> @en
16 !> @brief Configure that HstNmlInfoOutputStep returns .false. already
17 !>
18 !> After this subroutine is used,
19 !> HstNmlInfoOutputStep returns .false. already
20 !> corresponding to the @p name.
21 !>
22 !> This subroutine is expected to use when
23 !> interval of data output is changed from initialization of output,
24 !> and time is specified explicitly whenever data is output.
25 !>
26 !> Use after state is changed from define mode to
27 !> output mode by HstNmlInfoEndDefine.
28 !> If this subroutine is used before
29 !> HstNmlInfoEndDefine is used, error is occurred.
30 !>
31 !> When data corresponding to @p name is not found, error is occurred.
32 !> When @p name is blank, error is occurred too.
33 !>
34 !> If @p gthstnml is not initialized by HstNmlInfoCreate yet,
35 !> error is occurred.
36 !> @enden
37 !>
38 !> @ja
39 !> @brief HstNmlInfoOutputStep が常に .false. を返すよう設定する
40 !>
41 !> このサブルーチンを使用すると, @p name に関して,
42 !> 以降は HstNmlInfoOutputStep が常に .false. を返すようになります.
43 !>
44 !> データ出力間隔を出力の初期設定から変更し,
45 !> データを出力するたびに時刻を明示的に指定する場合に利用することを
46 !> 想定しています.
47 !>
48 !> HstNmlInfoEndDefine で定義モードから出力モードに
49 !> 移行した後に呼び出してください.
50 !> HstNmlInfoEndDefine を呼ぶ前にこのサブルーチンを使用すると,
51 !> プログラムはエラーを発生させます.
52 !>
53 !> @p name に関する情報が見当たらない場合,
54 !> プログラムはエラーを発生させます.
55 !> @p name が空文字の場合にも,
56 !> プログラムはエラーを発生させます.
57 !>
58 !> なお, 与えられた @p gthstnml が HstNmlInfoCreate によって初期設定
59 !> されていない場合にも, プログラムはエラーを発生させます.
60 !> @endja
61 !>
62 !> @param[in] gthstnml gtool_history_nmlinfo_types::GTHST_NMLINFO 型変数
63 !> @param[in] name 変数名. 先頭の空白は無視されます.
64 !> Variable identifier. Blanks at the head of the name are ignored.
65 !> @param[out] err 例外処理用フラグ. Exception handling flag.
66 subroutine hstnmlinfooutputstepdisable( gthstnml, &
67 & name, err )
70 use dc_trace, only: beginsub, endsub
71 use dc_types, only: string
73 implicit none
74 type(gthst_nmlinfo), intent(in):: gthstnml
75 character(*), intent(in):: name
76 ! 変数名.
77 ! 先頭の空白は無視されます.
78 !
79 ! Variable identifier.
80 ! Blanks at the head of the name are ignored.
81 logical, intent(out), optional:: err
82 ! 例外処理用フラグ.
83 ! デフォルトでは, この手続き内でエラーが
84 ! 生じた場合, プログラムは強制終了します.
85 ! 引数 *err* が与えられる場合,
86 ! プログラムは強制終了せず, 代わりに
87 ! *err* に .true. が代入されます.
88 !
89 ! Exception handling flag.
90 ! By default, when error occur in
91 ! this procedure, the program aborts.
92 ! If this *err* argument is given,
93 ! .true. is substituted to *err* and
94 ! the program does not abort.
95
96 !-----------------------------------
97 ! 作業変数
98 ! Work variables
99 type(gthst_nmlinfo_entry), pointer:: hptr =>null()
100 integer:: stat
101 character(STRING):: cause_c
102 character(*), parameter:: subname = 'HstNmlInfoOutputStepDisable'
103 continue
104 call beginsub( subname )
105 stat = dc_noerr
106 cause_c = ''
107
108 !-----------------------------------------------------------------
109 ! 初期設定のチェック
110 ! Check initialization
111 !-----------------------------------------------------------------
112 if ( .not. gthstnml % initialized ) then
113 stat = dc_enotinit
114 cause_c = 'GTHST_NMLINFO'
115 goto 999
116 end if
117
118 if ( trim( name ) == '' ) then
119 stat = hst_ebadname
120 cause_c = ''
121 goto 999
122 end if
123
124 if ( gthstnml % define_mode ) then
125 stat = hst_eindefine
126 cause_c = 'OutputStepDisable'
127 goto 999
128 end if
129
130 !-----------------------------------------------------------------
131 ! *gthstnml* 内から, *name* に関する history を探査.
132 ! Search "history" correspond to *name* in *gthstnml*
133 !-----------------------------------------------------------------
134 hptr => gthstnml % gthstnml_list
135 call listsearch( gthstnml_list = hptr, & ! (inout)
136 & name = name ) ! (in)
137
138 if ( .not. associated( hptr ) ) then
139 stat = dc_enoentry
140 cause_c = adjustl( name )
141 goto 999
142 end if
143
144 hptr % output_step_disable = .true.
145
146 nullify( hptr )
147
148 !-----------------------------------------------------------------
149 ! 終了処理, 例外処理
150 ! Termination and Exception handling
151 !-----------------------------------------------------------------
152999 continue
153 call storeerror( stat, subname, err, cause_c )
154 call endsub( subname )
155 end subroutine hstnmlinfooutputstepdisable
subroutine hstnmlinfooutputstepdisable(gthstnml, name, err)
エラー処理用モジュール
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 以下: dc ユーティリティのエラー
Definition dc_error.f90:534
integer, parameter, public dc_noerr
エラー等を保持
Definition dc_error.f90:468
integer, parameter, public hst_eindefine
Definition dc_error.f90:558
integer, parameter, public hst_ebadname
Definition dc_error.f90:560
integer, parameter, public dc_enoentry
Definition dc_error.f90:548
デバッグ時の追跡用モジュール
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
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137