\hypertarget{historyvarinfocreate_8f90}{}\section{gtool/gtool\+\_\+history/historyvarinfocreate.f90 File Reference}
\label{historyvarinfocreate_8f90}\index{gtool/gtool\+\_\+history/historyvarinfocreate.\+f90@{gtool/gtool\+\_\+history/historyvarinfocreate.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{historyvarinfocreate_8f90_aa590a512c2182f1e1fab4789b6db0e1c}{historyvarinfocreate1} (varinfo, name, dims, longname, units, xtype, time\+\_\+average, average, err)
\item 
subroutine \hyperlink{historyvarinfocreate_8f90_a6cee5929ebdcc3b38c4b3418398f2bdf}{historyvarinfocreate2} (varinfo, name, dims, longname, units, xtype, time\+\_\+average, average, err)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{historyvarinfocreate_8f90_aa590a512c2182f1e1fab4789b6db0e1c}\label{historyvarinfocreate_8f90_aa590a512c2182f1e1fab4789b6db0e1c}} 
\index{historyvarinfocreate.\+f90@{historyvarinfocreate.\+f90}!historyvarinfocreate1@{historyvarinfocreate1}}
\index{historyvarinfocreate1@{historyvarinfocreate1}!historyvarinfocreate.\+f90@{historyvarinfocreate.\+f90}}
\subsubsection{\texorpdfstring{historyvarinfocreate1()}{historyvarinfocreate1()}}
{\footnotesize\ttfamily subroutine historyvarinfocreate1 (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history\+\_\+varinfo), intent(inout)}]{varinfo,  }\item[{character($\ast$), intent(in)}]{name,  }\item[{character($\ast$), dimension(\+:), intent(in)}]{dims,  }\item[{character($\ast$), intent(in)}]{longname,  }\item[{character($\ast$), intent(in)}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype,  }\item[{logical, intent(in), optional}]{time\+\_\+average,  }\item[{logical, intent(in), optional}]{average,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 14 of file historyvarinfocreate.\+f90.



References dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
14     \textcolor{comment}{!}
15     \textcolor{comment}{!== GT\_HISTORY\_VARINFO 型変数作成}
16     \textcolor{comment}{!}
17     \textcolor{comment}{! GT\_HISTORY\_VARINFO 型変数を作成します。}
18     \textcolor{comment}{! このサブルーチンによる設定の後、}
19     \textcolor{comment}{! HistoryAddVariable の *varinfo* に与えます。}
20     \textcolor{comment}{! さらに属性を付加する場合には HistoryVarinfoAddAttr}
21     \textcolor{comment}{! を用いてください。}
22     \textcolor{comment}{!}
23     \textcolor{comment}{! Constructor of GT\_HISTORY\_VARINFO}
24     \textcolor{comment}{!}
25     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: gt\_history\_varinfo
26     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
27     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
28     \textcolor{keywordtype}{use }dc\_message\textcolor{keywordtype}{, only}: messagenotify
29     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}
30     \textcolor{keywordtype}{implicit none}
31     \textcolor{keywordtype}{type}(gt\_history\_varinfo),\textcolor{keywordtype}{intent(inout)} :: varinfo
32     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: name     \textcolor{comment}{! 変数名}
33     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: dims(:)  \textcolor{comment}{! 依存する次元}
34     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: longname \textcolor{comment}{! 変数の記述的名称}
35     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: units    \textcolor{comment}{! 変数の単位}
36     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: xtype
37                                          \textcolor{comment}{! 変数の型}
38     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: time\_average
39                                          \textcolor{comment}{! 時間平均}
40     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: average
41                                          \textcolor{comment}{! 時間平均 (後方互換用)}
42     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
43                               \textcolor{comment}{! 例外処理用フラグ. }
44                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
45                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
46                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
47                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
48                               \textcolor{comment}{! *err* に .true. が代入されます. }
49                               \textcolor{comment}{!}
50                               \textcolor{comment}{! Exception handling flag. }
51                               \textcolor{comment}{! By default, when error occur in }
52                               \textcolor{comment}{! this procedure, the program aborts. }
53                               \textcolor{comment}{! If this *err* argument is given, }
54                               \textcolor{comment}{! .true. is substituted to *err* and }
55                               \textcolor{comment}{! the program does not abort. }
56 
57     \textcolor{comment}{! Internal Work}
58     \textcolor{keywordtype}{integer}:: i, numdims, stat
59     \textcolor{keywordtype}{character(STRING)}:: cause\_c
60     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryVarinfoCreate1"}
61   \textcolor{keywordflow}{continue}
62     \textcolor{keyword}{call }beginsub(subname)
63     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
64     cause\_c = \textcolor{stringliteral}{''}
65 
66     \textcolor{keywordflow}{if} ( varinfo % initialized ) \textcolor{keywordflow}{then}
67       stat = \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}
68       cause\_c = \textcolor{stringliteral}{'GT\_HISTORY\_VARINFO'}
69       \textcolor{keywordflow}{goto} 999
70 \textcolor{keywordflow}{    end if}
71 
72     varinfo % name = name
73     varinfo % longname = longname
74     varinfo % units = units
75     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(xtype) )        varinfo % xtype = xtype
76     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(time\_average) ) varinfo % time\_average = time\_average
77     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(average) )      varinfo % time\_average = average
78     numdims = \textcolor{keyword}{size}(dims)
79     \textcolor{keyword}{allocate}(varinfo % dims(numdims))
80     \textcolor{keywordflow}{do} i = 1, numdims
81       varinfo % dims(i) = dims(i)
82       \textcolor{keywordflow}{if} (len(trim(dims(i))) > \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}) \textcolor{keywordflow}{then}
83         \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'W'}, subname, &
84           & \textcolor{stringliteral}{'dimension name <%c> is trancated to <%c>'}, &
85           & c1=trim(dims(i)), c2=trim(varinfo % dims(i)))
86 \textcolor{keywordflow}{      end if}
87 \textcolor{keywordflow}{    end do}
88     varinfo % initialized = .true.
89 
90 999 \textcolor{keywordflow}{continue}
91     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
92     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{historyvarinfocreate_8f90_aa590a512c2182f1e1fab4789b6db0e1c_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyvarinfocreate_8f90_a6cee5929ebdcc3b38c4b3418398f2bdf}\label{historyvarinfocreate_8f90_a6cee5929ebdcc3b38c4b3418398f2bdf}} 
\index{historyvarinfocreate.\+f90@{historyvarinfocreate.\+f90}!historyvarinfocreate2@{historyvarinfocreate2}}
\index{historyvarinfocreate2@{historyvarinfocreate2}!historyvarinfocreate.\+f90@{historyvarinfocreate.\+f90}}
\subsubsection{\texorpdfstring{historyvarinfocreate2()}{historyvarinfocreate2()}}
{\footnotesize\ttfamily subroutine historyvarinfocreate2 (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history\+\_\+varinfo), intent(inout)}]{varinfo,  }\item[{character($\ast$), intent(in)}]{name,  }\item[{character($\ast$), dimension(\+:), intent(in)}]{dims,  }\item[{character($\ast$), intent(in)}]{longname,  }\item[{character($\ast$), intent(in)}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype,  }\item[{logical, intent(in), optional}]{time\+\_\+average,  }\item[{logical, intent(in), optional}]{average,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 101 of file historyvarinfocreate.\+f90.


\begin{DoxyCode}
101     \textcolor{comment}{!}
102     \textcolor{comment}{! 使用方法は HistoryVarinfoCreate と同様です. }
103     \textcolor{comment}{!}
104     \textcolor{comment}{! Usage is same as "HistoryVarinfoCreate".}
105     \textcolor{comment}{!}
106     \textcolor{comment}{!--}
107     \textcolor{comment}{! 総称名 Create として提供するためのサブルーチンです. }
108     \textcolor{comment}{! 機能は HistoryVarinfoCreate1 と同じです. }
109     \textcolor{comment}{!++}
110     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: gt\_history\_varinfo
111     \textcolor{keywordtype}{use }gtool\_history\_generic\textcolor{keywordtype}{, only}: historyvarinfocreate
112     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
113     \textcolor{keywordtype}{implicit none}
114     \textcolor{keywordtype}{type}(gt\_history\_varinfo),\textcolor{keywordtype}{intent(inout)} :: varinfo
115     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: name     \textcolor{comment}{! 変数名}
116     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: dims(:)  \textcolor{comment}{! 依存する次元}
117     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: longname \textcolor{comment}{! 変数の記述的名称}
118     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: units    \textcolor{comment}{! 変数の単位}
119     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: xtype
120                                          \textcolor{comment}{! 変数の型}
121     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: time\_average
122                                          \textcolor{comment}{! 時間平均}
123     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: average
124                                          \textcolor{comment}{! 時間平均 (後方互換用)}
125     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
126                               \textcolor{comment}{! 例外処理用フラグ. }
127                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
128                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
129                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
130                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
131                               \textcolor{comment}{! *err* に .true. が代入されます. }
132                               \textcolor{comment}{!}
133                               \textcolor{comment}{! Exception handling flag. }
134                               \textcolor{comment}{! By default, when error occur in }
135                               \textcolor{comment}{! this procedure, the program aborts. }
136                               \textcolor{comment}{! If this *err* argument is given, }
137                               \textcolor{comment}{! .true. is substituted to *err* and }
138                               \textcolor{comment}{! the program does not abort. }
139 
140     \textcolor{comment}{! Internal Work}
141     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryVarinfoCreate2"}
142   \textcolor{keywordflow}{continue}
143     \textcolor{keyword}{call }beginsub(subname)
144     \textcolor{keyword}{call }historyvarinfocreate( varinfo, & \textcolor{comment}{! (out)}
145       & name, dims, longname, units, xtype, &    \textcolor{comment}{! (in)}
146       & time\_average, average, err &            \textcolor{comment}{! (in) optional}
147       & ) 
148     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
