\hypertarget{hstnmlinfooutputstep_8f90}{}\section{gtool/gtool\+\_\+history\+\_\+nmlinfo/hstnmlinfooutputstep.f90 File Reference}
\label{hstnmlinfooutputstep_8f90}\index{gtool/gtool\+\_\+history\+\_\+nmlinfo/hstnmlinfooutputstep.\+f90@{gtool/gtool\+\_\+history\+\_\+nmlinfo/hstnmlinfooutputstep.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
logical function \hyperlink{hstnmlinfooutputstep_8f90_a1769c4c16317e0c30f54085112b9f728}{hstnmlinfooutputstep} (gthstnml, name, time)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{hstnmlinfooutputstep_8f90_a1769c4c16317e0c30f54085112b9f728}\label{hstnmlinfooutputstep_8f90_a1769c4c16317e0c30f54085112b9f728}} 
\index{hstnmlinfooutputstep.\+f90@{hstnmlinfooutputstep.\+f90}!hstnmlinfooutputstep@{hstnmlinfooutputstep}}
\index{hstnmlinfooutputstep@{hstnmlinfooutputstep}!hstnmlinfooutputstep.\+f90@{hstnmlinfooutputstep.\+f90}}
\subsubsection{\texorpdfstring{hstnmlinfooutputstep()}{hstnmlinfooutputstep()}}
{\footnotesize\ttfamily logical function hstnmlinfooutputstep (\begin{DoxyParamCaption}\item[{type(gthst\+\_\+nmlinfo), intent(in)}]{gthstnml,  }\item[{character($\ast$), intent(in)}]{name,  }\item[{type(dc\+\_\+difftime), intent(in)}]{time }\end{DoxyParamCaption})}



Definition at line 12 of file hstnmlinfooutputstep.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::stdout, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
12     \textcolor{comment}{!}
13     \textcolor{comment}{! *time* が変数 *name* の出力されるタイミングであれば}
14     \textcolor{comment}{! .true. を, そうでなければ .false. を返します. }
15     \textcolor{comment}{! *gthstnml* が初期設定されていない場合にも .false. が返ります. }
16     \textcolor{comment}{! *name* に関するデータが存在しない場合にも .false. が返ります. }
17     \textcolor{comment}{!}
18     \textcolor{comment}{! なお, 与えられた *gthstnml* が HstNmlInfoCreate によって初期設定}
19     \textcolor{comment}{! されていない場合, プログラムはエラーを発生させます. }
20     \textcolor{comment}{!}
21     \textcolor{comment}{! If *time* is the time that a variable *name* is output,}
22     \textcolor{comment}{! .true. is returned, otherwise .false. is returned}
23     \textcolor{comment}{! When *gthstnml* is not initialized, .false. is returned too.}
24     \textcolor{comment}{! When data correspond to *name* is not found, .false. is returned too.}
25     \textcolor{comment}{! }
26     \textcolor{comment}{! If *gthstnml* is not initialized by "HstNmlInfoCreate" yet, }
27     \textcolor{comment}{! error is occurred.}
28     \textcolor{comment}{!}
29     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__types}{gtool\_history\_nmlinfo\_types}\textcolor{keywordtype}{, only}: 
      \hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo}{gthst\_nmlinfo}, \hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo__entry}{gthst\_nmlinfo\_entry}
30     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__internal}{gtool\_history\_nmlinfo\_internal}\textcolor{keywordtype}{, only}: listsearch
31     \textcolor{keywordtype}{use }dc\_string\textcolor{keywordtype}{, only}: putline, printf, split, strinclude, stoa, joinchar
32     \textcolor{keywordtype}{use }dc\_present\textcolor{keywordtype}{, only}: present\_and\_not\_empty, present\_and\_true
33     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: dc\_difftime
34     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}, mod, \textcolor{keyword}{operator}(==), 
      \hyperlink{interfacedc__date__generic_1_1tochar}{tochar}
35     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}, \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}
36     \textcolor{keywordtype}{implicit none}
37     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo}{gthst\_nmlinfo}), \textcolor{keywordtype}{intent(in)}:: gthstnml
38     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: name
39                               \textcolor{comment}{! 変数名. }
40                               \textcolor{comment}{! 先頭の空白は無視されます. }
41                               \textcolor{comment}{! }
42                               \textcolor{comment}{! Variable identifier. }
43                               \textcolor{comment}{! Blanks at the head of the name are ignored. }
44     \textcolor{keywordtype}{type}(dc\_difftime), \textcolor{keywordtype}{intent(in)}:: time
45                               \textcolor{comment}{! 現在時刻. Current time}
46 
47     \textcolor{comment}{!-----------------------------------}
48     \textcolor{comment}{!  作業変数}
49     \textcolor{comment}{!  Work variables}
50     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo__entry}{gthst\_nmlinfo\_entry}), \textcolor{keywordtype}{pointer}:: hptr =>null()
51     \textcolor{keywordtype}{type}(dc\_difftime):: interval\_time
52 \textcolor{comment}{!!$    character(*), parameter:: subname = 'HstNmlInfoOutputStep'}
53   \textcolor{keywordflow}{continue}
54 
55     result = .false.
56 
57     \textcolor{comment}{!-----------------------------------------------------------------}
58     \textcolor{comment}{!  初期設定のチェック}
59     \textcolor{comment}{!  Check initialization}
60     \textcolor{comment}{!-----------------------------------------------------------------}
61     \textcolor{keywordflow}{if} ( .not. gthstnml % initialized ) \textcolor{keywordflow}{goto} 999
62 
63     \textcolor{comment}{!-----------------------------------------------------------------}
64     \textcolor{comment}{!  情報格納変数への結合}
65     \textcolor{comment}{!  Associate a variable storing information}
66     \textcolor{comment}{!-----------------------------------------------------------------}
67     hptr => gthstnml % gthstnml\_list
68     \textcolor{keyword}{call }listsearch( gthstnml\_list = hptr, & \textcolor{comment}{! (inout)}
69       &              name = name )           \textcolor{comment}{! (in)}
70 
71     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( hptr ) ) \textcolor{keywordflow}{goto} 999
72     \textcolor{keywordflow}{if} ( hptr % output\_step\_disable ) \textcolor{keywordflow}{goto} 999
73 
74     \textcolor{comment}{!-----------------------------------------------------------------}
75     \textcolor{comment}{!  時刻のチェック}
76     \textcolor{comment}{!  Check time}
77     \textcolor{comment}{!-----------------------------------------------------------------}
78     \textcolor{keywordflow}{if} ( .not. hptr % interval\_value > 0.0 ) \textcolor{keywordflow}{goto} 999
79 
80     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}( &
81       & diff = interval\_time, &                      \textcolor{comment}{! (out)}
82       & \textcolor{keywordtype}{value} = \textcolor{keywordtype}{real( hptr % interval\_value, DP )}, & \textcolor{comment}{! (in)}
83       & unit = hptr % interval\_unit )                \textcolor{comment}{! (in)}
84 
85     \textcolor{keywordflow}{if} ( mod( time, interval\_time ) == 0 ) \textcolor{keywordflow}{then}
86       result = .true.
87 \textcolor{keywordflow}{    end if}
88 
89     \textcolor{comment}{!-----------------------------------------------------------------}
90     \textcolor{comment}{!  終了処理, 例外処理}
91     \textcolor{comment}{!  Termination and Exception handling}
92     \textcolor{comment}{!-----------------------------------------------------------------}
93 999 \textcolor{keywordflow}{continue}
94     \textcolor{keyword}{nullify}( hptr )
\end{DoxyCode}
