gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Functions/Subroutines
hstnmlinfooutputvalid.f90 File Reference

出力の有効性のチェック More...

Go to the source code of this file.

Functions/Subroutines

logical function hstnmlinfooutputvalid (gthstnml, name)
 

Detailed Description

出力の有効性のチェック

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 
)

出力の有効性のチェック

変数 name の出力が有効であれば, .true. を, そうでなければ .false. を返します. 出力が有効であるかどうかは, 出力間隔 interval_value の 正負によって判定されます. 正の場合が有効, 負の場合が無効です. gthstnml が初期設定されていない場合にも .false. が返ります. name に関するデータが存在しない場合にも .false. が返ります.

なお, 与えられた gthstnml が HstNmlInfoCreate によって初期設定 されていない場合, プログラムはエラーを発生させます.

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 )