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

Checker of output validation . More...

Go to the source code of this file.

Functions/Subroutines

logical function hstnmlinfooutputvalid (gthstnml, name)
 

Detailed Description

Checker of output validation

.

Author
Yasuhiro MORIKAWA

Definition in file hstnmlinfooutputvalid.f90.

Function/Subroutine Documentation

◆ hstnmlinfooutputvalid()

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

Check validity of output for a variable

If output of a variable name is valid, .true. is returned, otherwise .false. is returned. Whether output is valid or not is judged with positive or negative of interval_value. Positive is valid, and negative is invalid. When gthstnml is not initialized, .false. is returned too. When data corresponding to name is not found, .false. is returned too.

If gthstnml is not initialized by HstNmlInfoCreate yet, error is occurred.

Parameters
[in]gthstnmlgtool_history_nmlinfo_types::GTHST_NMLINFO 型変数
[in]name変数名. 先頭の空白は無視されます. Variable identifier. Blanks at the head of the name are ignored.
Returns
出力が有効であれば .true.

Definition at line 47 of file hstnmlinfooutputvalid.f90.

51 implicit none
52 type(GTHST_NMLINFO), intent(in):: gthstnml
53 character(*), intent(in):: name
54 ! 変数名.
55 ! 先頭の空白は無視されます.
56 !
57 ! Variable identifier.
58 ! Blanks at the head of the name are ignored.
59
60 !-----------------------------------
61 ! 作業変数
62 ! Work variables
63 type(GTHST_NMLINFO_ENTRY), pointer:: hptr =>null()
64!!$ character(*), parameter:: subname = 'HstNmlInfoOutputValid'
65 continue
66
67 result = .false.
68
69 !-----------------------------------------------------------------
70 ! 初期設定のチェック
71 ! Check initialization
72 !-----------------------------------------------------------------
73 if ( .not. gthstnml % initialized ) goto 999
74
75 !-----------------------------------------------------------------
76 ! 情報格納変数への結合
77 ! Associate a variable storing information
78 !-----------------------------------------------------------------
79 hptr => gthstnml % gthstnml_list
80 call listsearch( gthstnml_list = hptr, & ! (inout)
81 & name = name ) ! (in)
82
83 if ( .not. associated( hptr ) ) goto 999
84
85 !-----------------------------------------------------------------
86 ! 出力の有効性のチェック
87 ! Check validity of output
88 !-----------------------------------------------------------------
89 if ( hptr % interval_value > 0.0 ) then
90 result = .true.
91 goto 999
92 end if
93
94 !-----------------------------------------------------------------
95 ! 終了処理, 例外処理
96 ! Termination and Exception handling
97 !-----------------------------------------------------------------
98999 continue
99 nullify( hptr )