hstnmlinfooutputvalid.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

logical function hstnmlinfooutputvalid (gthstnml, name)
 

Function/Subroutine Documentation

◆ hstnmlinfooutputvalid()

logical function hstnmlinfooutputvalid ( type(gthst_nmlinfo), intent(in)  gthstnml,
character(*), intent(in)  name 
)

Definition at line 12 of file hstnmlinfooutputvalid.f90.

References dc_types::dp, dc_string::joinchar(), dc_present::present_and_not_empty(), dc_present::present_and_true(), dc_types::stdout, dc_types::string, and dc_types::token.

12  !
13  ! 変数 *name* の出力が有効であれば,
14  ! .true. を, そうでなければ .false. を返します.
15  ! 出力が有効であるかどうかは, 出力間隔 *interval_value* の
16  ! 正負によって判定されます. 正の場合が有効, 負の場合が無効です.
17  ! *gthstnml* が初期設定されていない場合にも .false. が返ります.
18  ! *name* に関するデータが存在しない場合にも .false. が返ります.
19  !
20  ! なお, 与えられた *gthstnml* が HstNmlInfoCreate によって初期設定
21  ! されていない場合, プログラムはエラーを発生させます.
22  !
23  ! If output of a variable *name* is valid,
24  ! .true. is returned, otherwise .false. is returned.
25  ! Whether output is valid or not is judged with positive or negative
26  ! of *interval_value*. Positive is valid, and negative is invalid.
27  ! When *gthstnml* is not initialized, .false. is returned too.
28  ! When data correspond to *name* is not found, .false. is returned too.
29  !
30  ! If *gthstnml* is not initialized by "HstNmlInfoCreate" yet,
31  ! error is occurred.
32  !
37  use dc_date_types, only: dc_difftime
38  use dc_types, only: dp, string, token, stdout
39  implicit none
40  type(gthst_nmlinfo), intent(in):: gthstnml
41  character(*), intent(in):: name
42  ! 変数名.
43  ! 先頭の空白は無視されます.
44  !
45  ! Variable identifier.
46  ! Blanks at the head of the name are ignored.
47 
48  !-----------------------------------
49  ! 作業変数
50  ! Work variables
51  type(gthst_nmlinfo_entry), pointer:: hptr =>null()
52 !!$ character(*), parameter:: subname = 'HstNmlInfoOutputValid'
53  continue
54 
55  result = .false.
56 
57  !-----------------------------------------------------------------
58  ! 初期設定のチェック
59  ! Check initialization
60  !-----------------------------------------------------------------
61  if ( .not. gthstnml % initialized ) goto 999
62 
63  !-----------------------------------------------------------------
64  ! 情報格納変数への結合
65  ! Associate a variable storing information
66  !-----------------------------------------------------------------
67  hptr => gthstnml % gthstnml_list
68  call listsearch( gthstnml_list = hptr, & ! (inout)
69  & name = name ) ! (in)
70 
71  if ( .not. associated( hptr ) ) goto 999
72 
73  !-----------------------------------------------------------------
74  ! 出力の有効性のチェック
75  ! Check validity of output
76  !-----------------------------------------------------------------
77  if ( hptr % interval_value > 0.0 ) then
78  result = .true.
79  goto 999
80  end if
81 
82  !-----------------------------------------------------------------
83  ! 終了処理, 例外処理
84  ! Termination and Exception handling
85  !-----------------------------------------------------------------
86 999 continue
87  nullify( hptr )
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
logical function, public present_and_true(arg)
Definition: dc_present.f90:80
character(string) function, public joinchar(carray, expr)
Definition: dc_string.f90:861
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
logical function, public present_and_not_empty(arg)
Definition: dc_present.f90:276
integer, parameter, public stdout
標準出力の装置番号
Definition: dc_types.f90:98
文字型変数の操作.
Definition: dc_string.f90:24
種別型パラメタを提供します。
Definition: dc_types.f90:49
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function: