\hypertarget{namespacegtool__history__internal}{}\section{gtool\+\_\+history\+\_\+internal Module Reference}
\label{namespacegtool__history__internal}\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
interface \hyperlink{interfacegtool__history__internal_1_1append__attrs}{append\+\_\+attrs}
\item 
interface \hyperlink{interfacegtool__history__internal_1_1copy__attrs}{copy\+\_\+attrs}
\item 
interface \hyperlink{interfacegtool__history__internal_1_1lookup__dimension}{lookup\+\_\+dimension}
\item 
interface \hyperlink{interfacegtool__history__internal_1_1lookup__var__or__dim}{lookup\+\_\+var\+\_\+or\+\_\+dim}
\item 
interface \hyperlink{interfacegtool__history__internal_1_1lookup__variable}{lookup\+\_\+variable}
\item 
interface \hyperlink{interfacegtool__history__internal_1_1lookup__variable__ord}{lookup\+\_\+variable\+\_\+ord}
\item 
interface \hyperlink{interfacegtool__history__internal_1_1set__fake__dim__value}{set\+\_\+fake\+\_\+dim\+\_\+value}
\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \hyperlink{namespacegtool__history__internal_aae9d1abb99dbb6a7350aac47ff56c56a}{append\+\_\+attrs} (varname, attrs, history)
\item 
subroutine, public \hyperlink{namespacegtool__history__internal_aad987e82cf62eb98fba014a8f464fb2d}{copy\+\_\+attrs} (from, to, err)
\item 
subroutine, public \hyperlink{namespacegtool__history__internal_addc41825760d626829d18cfd8458d35b}{set\+\_\+fake\+\_\+dim\+\_\+value} (history, dimord)
\item 
integer function, public \hyperlink{namespacegtool__history__internal_a2d399d3babe28eb5e94efc4f29e0372b}{lookup\+\_\+variable\+\_\+ord} (history, varname)
\item 
type(gt\+\_\+variable) function, public \hyperlink{namespacegtool__history__internal_a64eb4ea3c1c14a4dc0f90f5b377eec35}{lookup\+\_\+variable} (history, varname, ord)
\item 
type(gt\+\_\+variable) function, public \hyperlink{namespacegtool__history__internal_a337946d2d28e7da4c9ba5936ba253801}{lookup\+\_\+dimension} (history, dimname, ord)
\item 
subroutine, public \hyperlink{namespacegtool__history__internal_a133deeaafe15a24b5a60dc09f737f42c}{lookup\+\_\+var\+\_\+or\+\_\+dim} (history, name, var, err)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
type(gt\+\_\+history), target, save, public \hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default}
\item 
character(string), parameter, public \hyperlink{namespacegtool__history__internal_a62ea3a4c4f7a88a2bb8d4dd2dbe2b098}{gtool4\+\_\+netcdf\+\_\+conventions} = \char`\"{}http\+://www.\+gfd-\/dennou.\+org/library/gtool4/conventions/\char`\"{}
\item 
character(string), parameter, public \hyperlink{namespacegtool__history__internal_a29f3530387244862c313d41352821433}{gtool4\+\_\+netcdf\+\_\+version} = \char`\"{}4.\+3\char`\"{}
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacegtool__history__internal_aae9d1abb99dbb6a7350aac47ff56c56a}\label{namespacegtool__history__internal_aae9d1abb99dbb6a7350aac47ff56c56a}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!append\+\_\+attrs@{append\+\_\+attrs}}
\index{append\+\_\+attrs@{append\+\_\+attrs}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{append\+\_\+attrs()}{append\_attrs()}}
{\footnotesize\ttfamily subroutine, public \hyperlink{interfacegtool__history__internal_1_1append__attrs}{gtool\+\_\+history\+\_\+internal\+::append\+\_\+attrs} (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{varname,  }\item[{type(gt\+\_\+history\+\_\+attr), dimension(\+:), intent(in)}]{attrs,  }\item[{type(gt\+\_\+history), intent(inout), optional, target}]{history }\end{DoxyParamCaption})}



Definition at line 91 of file gtool\+\_\+history\+\_\+internal.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), default, and dc\+\_\+trace\+::endsub().


\begin{DoxyCode}
91     \textcolor{comment}{!}
92     \textcolor{comment}{! GT\_HISTORY\_ATTR 変数を history の varname 変数に}
93     \textcolor{comment}{! 付加するためのサブルーチン. 公開用ではなく,}
94     \textcolor{comment}{! HistoryCreate や HistoryAddVariable に GT\_HISTORY\_AXIS}
95     \textcolor{comment}{! や GT\_HISTORY\_VARINFO が与えられた時に内部的に利用される.}
96     \textcolor{comment}{!}
97     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__generic}{gtool\_history\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}
98     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__generic}{gtdata\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__generic_1_1put__attr}{put\_attr}
99     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
100     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}     \textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1strhead}{strhead}, \hyperlink{interfacedc__string_1_1lchar}{lchar}, \hyperlink{interfacedc__string_1_1tochar}{tochar}
101     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, 
      \hyperlink{structgtool__history__types_1_1gt__history__axis}{gt\_history\_axis}, \hyperlink{structgtool__history__types_1_1gt__history__varinfo}{gt\_history\_varinfo}, 
      \hyperlink{structgtool__history__types_1_1gt__history__attr}{gt\_history\_attr}
102     \textcolor{keywordtype}{implicit none}
103     \textcolor{keywordtype}{character(*)},     \textcolor{keywordtype}{intent(in)}:: varname
104     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history__attr}{gt\_history\_attr}),  \textcolor{keywordtype}{intent(in)}:: attrs(:)
105     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{intent(inout)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{optional}:: history
106     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: hst =>null()
107     \textcolor{keywordtype}{integer}                      :: \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}
108     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"append\_attrs"}
109   \textcolor{keywordflow}{continue}
110     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=<%c>, size(attrs(:))=<%d>'}, &
111       &        c1=trim(varname), \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}=(/\textcolor{keyword}{size}(attrs(:))/))
112     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(history)) \textcolor{keywordflow}{then}
113       hst => history
114     \textcolor{keywordflow}{else}
115       hst => \hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default}
116 \textcolor{keywordflow}{    endif}
117     \textcolor{comment}{! attrs(:) のサイズ分だけループ}
118     \textcolor{keywordflow}{do} \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i} = 1, \textcolor{keyword}{size}( attrs(:) )
119       \textcolor{comment}{! attrs(i)%attrtype の種別で与える変数を変える}
120       \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( \textcolor{stringliteral}{'char'}, trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype))) ) \textcolor{keywordflow}{then}
121         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}( &
122           & varname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname, &
123           & trim(attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Charvalue), hst )
124       \textcolor{keywordflow}{elseif} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( \textcolor{stringliteral}{'int'}, trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype))) ) \textcolor{keywordflow}{then}
125         \textcolor{keywordflow}{if} ( attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%array ) \textcolor{keywordflow}{then}
126           \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'Intarray(:) is selected.'})
127           \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}( &
128             & varname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname , &
129             & attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Intarray, hst       )
130         \textcolor{keywordflow}{else}
131           \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'Intvalue is selected'})
132           \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}( &
133             & varname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname , &
134             & attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Intvalue, hst      )
135 \textcolor{keywordflow}{        endif}
136       \textcolor{keywordflow}{elseif} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( \textcolor{stringliteral}{'real'}, trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype))) ) \textcolor{keywordflow}{then}
137         \textcolor{keywordflow}{if} ( attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%array ) \textcolor{keywordflow}{then}
138           \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'Realarray(:) is selected.'})
139           \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}( &
140             & varname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Realarray, hst)
141         \textcolor{keywordflow}{else}
142           \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'Realvalue is selected'})
143           \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}( &
144             & varname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Realvalue, hst)
145 \textcolor{keywordflow}{        endif}
146       \textcolor{keywordflow}{elseif} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( \textcolor{stringliteral}{'double'}, trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype))) ) \textcolor{keywordflow}{then}
147         \textcolor{keywordflow}{if} ( attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%array ) \textcolor{keywordflow}{then}
148           \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'Doublearray(:) is selected.'})
149           \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}( &
150             & varname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Doublearray, hst)
151         \textcolor{keywordflow}{else}
152           \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'Doublevalue is selected'})
153           \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}( &
154             & varname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Doublevalue, hst)
155 \textcolor{keywordflow}{        endif}
156       \textcolor{keywordflow}{elseif} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( \textcolor{stringliteral}{'logical'}, trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype))) ) \textcolor{keywordflow}{then}
157         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaddattr}{historyaddattr}( &
158           & varname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname, attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Logicalvalue, hst)
159       \textcolor{keywordflow}{else}
160         \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'attrtype=<%c>=<%c>is Invalid.'}   , &
161           &      c1=trim(attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype)         , &
162           &      c2=trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(attrs(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype))      )
163 \textcolor{keywordflow}{      endif}
164 \textcolor{keywordflow}{    enddo}
165     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtool__history__internal_aae9d1abb99dbb6a7350aac47ff56c56a_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtool__history__internal_aad987e82cf62eb98fba014a8f464fb2d}\label{namespacegtool__history__internal_aad987e82cf62eb98fba014a8f464fb2d}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!copy\+\_\+attrs@{copy\+\_\+attrs}}
\index{copy\+\_\+attrs@{copy\+\_\+attrs}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{copy\+\_\+attrs()}{copy\_attrs()}}
{\footnotesize\ttfamily subroutine, public \hyperlink{interfacegtool__history__internal_1_1copy__attrs}{gtool\+\_\+history\+\_\+internal\+::copy\+\_\+attrs} (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history\+\_\+attr), dimension(\+:), intent(in)}]{from,  }\item[{type(gt\+\_\+history\+\_\+attr), dimension(\+:), intent(out)}]{to,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 168 of file gtool\+\_\+history\+\_\+internal.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::gt\+\_\+eargsizemismatch, dc\+\_\+error\+::gt\+\_\+ebadattrname, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
168     \textcolor{comment}{!}
169     \textcolor{comment}{! GT\_HISTORY\_ATTR 変数をコピーするためのサブルーチン}
170     \textcolor{comment}{! このモジュール内部で利用されることを想定している.}
171     \textcolor{comment}{! from と to の配列サイズは同じであることが想定されている.}
172     \textcolor{comment}{! err を与えると, コピーの際何らかの不具合が生じると}
173     \textcolor{comment}{! 終了せずに err が真になって返る.}
174     \textcolor{comment}{!}
175     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{,only}: \hyperlink{interfacedc__string_1_1lchar}{lchar}, \hyperlink{interfacedc__string_1_1strhead}{strhead}
176     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
177     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, &
178       &  \hyperlink{namespacedc__error_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, \hyperlink{namespacedc__error_ab4a802d776d7febc685c5441fcf75ef1}{gt\_ebadattrname}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
179     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
180     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, 
      \hyperlink{structgtool__history__types_1_1gt__history__axis}{gt\_history\_axis}, \hyperlink{structgtool__history__types_1_1gt__history__varinfo}{gt\_history\_varinfo}, 
      \hyperlink{structgtool__history__types_1_1gt__history__attr}{gt\_history\_attr}
181     \textcolor{keywordtype}{implicit none}
182     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history__attr}{gt\_history\_attr}), \textcolor{keywordtype}{intent(in)}  :: from(:)
183     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history__attr}{gt\_history\_attr}), \textcolor{keywordtype}{intent(out)} :: to(:)
184     \textcolor{keywordtype}{logical},               \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
185     \textcolor{keywordtype}{integer}     :: \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}, stat
186     \textcolor{keywordtype}{character(STRING)} :: cause\_c
187     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"copy\_attrs"}
188   \textcolor{keywordflow}{continue}
189     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname)
190     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
191     cause\_c = \textcolor{stringliteral}{''}
192     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'size(from)=<%d>, size(to)=<%d>, So copy <%d> times.'}, &
193       &       \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}=(/ \textcolor{keyword}{size}(from), \textcolor{keyword}{size}(to), \hyperlink{interfacedc__date__generic_1_1min}{min}(\textcolor{keyword}{size}(from),\textcolor{keyword}{size}(to)) /) )
194     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(to) < \textcolor{keyword}{size}(from) ) \textcolor{keywordflow}{then}
195       stat = \hyperlink{namespacedc__error_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}
196       cause\_c = \textcolor{stringliteral}{'from is larger than to'}
197       \textcolor{keywordflow}{goto} 999
198 \textcolor{keywordflow}{    end if}
199     \textcolor{comment}{! from と to の小さい方に合わせてループ}
200     \textcolor{keywordflow}{do} \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i} = 1, \hyperlink{interfacedc__date__generic_1_1min}{min}( \textcolor{keyword}{size}(from), \textcolor{keyword}{size}(to) )
201       \textcolor{comment}{! attrname と attrtype と array はまずコピー}
202       to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname       = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrname
203       to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype       = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype
204       to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%array          = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%array
205       \textcolor{comment}{! from(i)%attrtype の種別でコピーする変数を変える.}
206       \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( \textcolor{stringliteral}{'char'}, trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype))) ) \textcolor{keywordflow}{then}
207         to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Charvalue      = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Charvalue
208                           \textcolor{keywordflow}{elseif} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( &
209         &   \hyperlink{interfacedc__string_1_1lchar}{lchar}(\textcolor{stringliteral}{'Int'}), trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype)))) \textcolor{keywordflow}{then}
210         \textcolor{keywordflow}{if} ( from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%array ) \textcolor{keywordflow}{then}
211           \textcolor{keyword}{allocate}(  to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Intarray( \textcolor{keyword}{size}(from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Intarray) )  )
212           to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Intarray = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Intarray
213         \textcolor{keywordflow}{else}
214           to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Intvalue = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Intvalue
215 \textcolor{keywordflow}{        endif}
216       \textcolor{keywordflow}{elseif} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( &
217         &   \hyperlink{interfacedc__string_1_1lchar}{lchar}(\textcolor{stringliteral}{'Real'}), trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype)))) \textcolor{keywordflow}{then}
218         \textcolor{keywordflow}{if} ( from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%array ) \textcolor{keywordflow}{then}
219           \textcolor{keyword}{allocate}(  to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Realarray( \textcolor{keyword}{size}(from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Realarray) )  )
220           to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Realarray = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Realarray
221         \textcolor{keywordflow}{else}
222           to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Realvalue = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Realvalue
223 \textcolor{keywordflow}{        endif}
224       \textcolor{keywordflow}{elseif} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( &
225         &   \hyperlink{interfacedc__string_1_1lchar}{lchar}(\textcolor{stringliteral}{'Double'}), trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype)))) \textcolor{keywordflow}{then}
226         \textcolor{keywordflow}{if} ( from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%array ) \textcolor{keywordflow}{then}
227           \textcolor{keyword}{allocate}(  to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Doublearray( \textcolor{keyword}{size}(from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Doublearray) )  )
228           to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Doublearray = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Doublearray
229         \textcolor{keywordflow}{else}
230           to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Doublevalue = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Doublevalue
231 \textcolor{keywordflow}{        endif}
232       \textcolor{keywordflow}{elseif} ( \hyperlink{interfacedc__string_1_1strhead}{strhead}( \textcolor{stringliteral}{'logical'}, trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype))) ) \textcolor{keywordflow}{then}
233         to(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Logicalvalue = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%Logicalvalue
234       \textcolor{keywordflow}{else}
235         stat = \hyperlink{namespacedc__error_ab4a802d776d7febc685c5441fcf75ef1}{gt\_ebadattrname}
236         cause\_c = from(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})%attrtype
237         \textcolor{keywordflow}{goto} 999
238 \textcolor{keywordflow}{      endif}
239 \textcolor{keywordflow}{    enddo}
240 999 \textcolor{keywordflow}{continue}
241     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c=cause\_c)
242     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtool__history__internal_aad987e82cf62eb98fba014a8f464fb2d_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtool__history__internal_a337946d2d28e7da4c9ba5936ba253801}\label{namespacegtool__history__internal_a337946d2d28e7da4c9ba5936ba253801}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!lookup\+\_\+dimension@{lookup\+\_\+dimension}}
\index{lookup\+\_\+dimension@{lookup\+\_\+dimension}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{lookup\+\_\+dimension()}{lookup\_dimension()}}
{\footnotesize\ttfamily type(gt\+\_\+variable) function, public \hyperlink{interfacegtool__history__internal_1_1lookup__dimension}{gtool\+\_\+history\+\_\+internal\+::lookup\+\_\+dimension} (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history), intent(in)}]{history,  }\item[{character(len = $\ast$), intent(in)}]{dimname,  }\item[{integer, intent(out), optional}]{ord }\end{DoxyParamCaption})}



Definition at line 357 of file gtool\+\_\+history\+\_\+internal.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::gt\+\_\+ebaddimname, dc\+\_\+error\+::storeerror(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
357     \textcolor{comment}{!}
358     \textcolor{comment}{! history 内の dimname という変数名を持つ次元の GT\_VARIABLE}
359     \textcolor{comment}{! 変数を返す. dimname 末尾の空白は無視される.}
360     \textcolor{comment}{!}
361     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__generic}{gtdata\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__generic_1_1inquire}{inquire}
362     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
363     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64665cb8d8cdc87f552d5bf7a5940f78}{gt\_ebaddimname}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
364     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
365     \textcolor{keywordtype}{implicit none}
366     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{intent(in)}:: history
367     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: dimname
368     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: ord
369     \textcolor{keywordtype}{integer}:: ordwork
370     \textcolor{keywordtype}{character(len = STRING)}:: name, cause\_c
371     \textcolor{keywordtype}{integer}:: \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}, stat
372     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'lookup\_dimension'}
373   \textcolor{keywordflow}{continue}
374     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'dimname=%c'}, c1=trim(dimname))
375     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
376     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ord)) ord = 0
377     ordwork = 0
378     \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(history % dimvars)) \textcolor{keywordflow}{then}
379       \textcolor{keywordflow}{do}, \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i} = 1, \textcolor{keyword}{size}(history % dimvars)
380         \textcolor{keyword}{call }\hyperlink{interfacegtdata__generic_1_1inquire}{inquire}(history % dimvars(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}), name=name)
381         \textcolor{keywordflow}{if} (name == trim(dimname)) \textcolor{keywordflow}{then}
382           result = history % dimvars(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})
383           \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ord)) ord = \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}
384           stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
385           cause\_c = \textcolor{stringliteral}{""}
386           \textcolor{keywordflow}{goto} 999
387 \textcolor{keywordflow}{        endif}
388 \textcolor{keywordflow}{      enddo}
389 \textcolor{keywordflow}{    endif}
390     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ord)) \textcolor{keywordflow}{then}
391       ord = 0
392     \textcolor{keywordflow}{else}
393       stat = \hyperlink{namespacedc__error_a64665cb8d8cdc87f552d5bf7a5940f78}{gt\_ebaddimname}
394       cause\_c = dimname
395 \textcolor{keywordflow}{    endif}
396 999 \textcolor{keywordflow}{continue}
397     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c=cause\_c)
398     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ord)) ordwork = ord
399     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{'ord=%d (0:not found)'}, \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}=(/ordwork/))
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtool__history__internal_a337946d2d28e7da4c9ba5936ba253801_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtool__history__internal_a133deeaafe15a24b5a60dc09f737f42c}\label{namespacegtool__history__internal_a133deeaafe15a24b5a60dc09f737f42c}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!lookup\+\_\+var\+\_\+or\+\_\+dim@{lookup\+\_\+var\+\_\+or\+\_\+dim}}
\index{lookup\+\_\+var\+\_\+or\+\_\+dim@{lookup\+\_\+var\+\_\+or\+\_\+dim}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{lookup\+\_\+var\+\_\+or\+\_\+dim()}{lookup\_var\_or\_dim()}}
{\footnotesize\ttfamily subroutine, public \hyperlink{interfacegtool__history__internal_1_1lookup__var__or__dim}{gtool\+\_\+history\+\_\+internal\+::lookup\+\_\+var\+\_\+or\+\_\+dim} (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history), intent(in)}]{history,  }\item[{character(len = $\ast$), intent(in)}]{name,  }\item[{type(gt\+\_\+variable), intent(out)}]{var,  }\item[{logical, intent(out)}]{err }\end{DoxyParamCaption})}



Definition at line 402 of file gtool\+\_\+history\+\_\+internal.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
402     \textcolor{comment}{!}
403     \textcolor{comment}{! history 内から, name という名前の次元または変数を探査し,}
404     \textcolor{comment}{! var に GT\_VARIABLE 変数を返す. 見つかって正常に}
405     \textcolor{comment}{! var が返る場合は stat には DC\_NOERR が返り,}
406     \textcolor{comment}{! history 内から name が発見されない場合には, stat に}
407     \textcolor{comment}{! NF90\_ENOTVAR が返る.}
408     \textcolor{comment}{!}
409     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, nf90\_enotvar
410     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
411     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
412     \textcolor{keywordtype}{implicit none}
413     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{intent(in)}:: history
414     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: name
415     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__types_1_1gt__variable}{gt\_variable}), \textcolor{keywordtype}{intent(out)}:: var
416     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}:: err
417     \textcolor{keywordtype}{integer}:: stat, ord
418     \textcolor{keywordtype}{character(STRING)} :: cause\_c
419     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'lookup\_var\_or\_dim'}
420   \textcolor{keywordflow}{continue}
421     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'name=<%c>'}, c1=trim(name))
422     cause\_c = \textcolor{stringliteral}{""}
423     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
424     var = \hyperlink{interfacegtool__history__internal_1_1lookup__variable}{lookup\_variable}(history, name, ord)
425     \textcolor{keywordflow}{if} (ord /= 0) \textcolor{keywordflow}{then}
426       stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
427       \textcolor{keywordflow}{goto} 999
428 \textcolor{keywordflow}{    endif}
429     var = \hyperlink{interfacegtool__history__internal_1_1lookup__dimension}{lookup\_dimension}(history, name, ord)
430     \textcolor{keywordflow}{if} (ord /= 0) \textcolor{keywordflow}{then}
431       stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
432       \textcolor{keywordflow}{goto} 999
433 \textcolor{keywordflow}{    endif}
434     stat = nf90\_enotvar
435     cause\_c = \textcolor{stringliteral}{"Any vars and dims are not found"}
436 999 \textcolor{keywordflow}{continue}
437     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
438     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{'ord=%d (0:not found)'}, \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}=(/ord/))
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtool__history__internal_a133deeaafe15a24b5a60dc09f737f42c_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtool__history__internal_a64eb4ea3c1c14a4dc0f90f5b377eec35}\label{namespacegtool__history__internal_a64eb4ea3c1c14a4dc0f90f5b377eec35}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!lookup\+\_\+variable@{lookup\+\_\+variable}}
\index{lookup\+\_\+variable@{lookup\+\_\+variable}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{lookup\+\_\+variable()}{lookup\_variable()}}
{\footnotesize\ttfamily type(gt\+\_\+variable) function, public \hyperlink{interfacegtool__history__internal_1_1lookup__variable}{gtool\+\_\+history\+\_\+internal\+::lookup\+\_\+variable} (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history), intent(in)}]{history,  }\item[{character(len = $\ast$), intent(in)}]{varname,  }\item[{integer, intent(out), optional}]{ord }\end{DoxyParamCaption})}



Definition at line 314 of file gtool\+\_\+history\+\_\+internal.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
314     \textcolor{comment}{!}
315     \textcolor{comment}{!  history 内での変数 varname の ID を取得}
316     \textcolor{comment}{!    ID を取得できた場合, 返り値 result と ord にそれぞれ}
317     \textcolor{comment}{!    その ID が返される。}
318     \textcolor{comment}{!    ID を取得できない場合、ord が渡されていなければその場で終了}
319     \textcolor{comment}{!    ord が渡されている場合は ord に 0 が返される。}
320     \textcolor{comment}{!}
321     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
322     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, nf90\_enotvar, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
323     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
324     \textcolor{keywordtype}{implicit none}
325     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{intent(in)}:: history
326     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: varname
327     \textcolor{keywordtype}{character(len = STRING)} :: cause\_c
328     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: ord
329     \textcolor{keywordtype}{integer}:: ordwork
330     \textcolor{keywordtype}{integer}:: \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}, stat
331     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'lookup\_variable'}
332   \textcolor{keywordflow}{continue}
333     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'%c'}, c1=trim(varname))
334     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
335     cause\_c = \textcolor{stringliteral}{''}
336     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ord)) ord = 0
337     ordwork = 0
338     \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i} = \hyperlink{interfacegtool__history__internal_1_1lookup__variable__ord}{lookup\_variable\_ord}(history, varname)
339     \textcolor{keywordflow}{if} (\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i} > 0) \textcolor{keywordflow}{then}
340       result = history % vars(\hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i})
341       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ord)) ord = \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}
342       \textcolor{keywordflow}{goto} 999
343 \textcolor{keywordflow}{    endif}
344     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ord)) \textcolor{keywordflow}{then}
345       ord = 0
346     \textcolor{keywordflow}{else}
347       stat = nf90\_enotvar
348       cause\_c = varname
349       \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i} = 0
350 \textcolor{keywordflow}{    endif}
351 999 \textcolor{keywordflow}{continue}
352     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c=cause\_c)
353     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ord)) ordwork = ord
354     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{"ord=%d (0: not found)"}, \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}=(/ordwork/))
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtool__history__internal_a64eb4ea3c1c14a4dc0f90f5b377eec35_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtool__history__internal_a2d399d3babe28eb5e94efc4f29e0372b}\label{namespacegtool__history__internal_a2d399d3babe28eb5e94efc4f29e0372b}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!lookup\+\_\+variable\+\_\+ord@{lookup\+\_\+variable\+\_\+ord}}
\index{lookup\+\_\+variable\+\_\+ord@{lookup\+\_\+variable\+\_\+ord}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{lookup\+\_\+variable\+\_\+ord()}{lookup\_variable\_ord()}}
{\footnotesize\ttfamily integer function, public \hyperlink{interfacegtool__history__internal_1_1lookup__variable__ord}{gtool\+\_\+history\+\_\+internal\+::lookup\+\_\+variable\+\_\+ord} (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history), intent(in)}]{history,  }\item[{character(len = $\ast$), intent(in)}]{varname }\end{DoxyParamCaption})}



Definition at line 287 of file gtool\+\_\+history\+\_\+internal.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+trace\+::endsub(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
287     \textcolor{comment}{!}
288     \textcolor{comment}{! history 内の varname 変数の変数番号を返す.}
289     \textcolor{comment}{! 現在, 明示的に history 変数を与えない場合の変数番号の}
290     \textcolor{comment}{! 検索は出来ない.}
291     \textcolor{comment}{!}
292     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
293     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__generic}{gtdata\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__generic_1_1inquire}{inquire}
294     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
295     \textcolor{keywordtype}{implicit none}
296     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{intent(in)}:: history
297     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: varname
298     \textcolor{keywordtype}{character(len = string)}:: name
299     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'lookup\_variable\_ord'}
300   \textcolor{keywordflow}{continue}
301     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'var=%c'}, c1 = trim(varname))
302     \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(history % vars)) \textcolor{keywordflow}{then}
303       \textcolor{keywordflow}{do}, result = 1, \textcolor{keyword}{size}(history % vars)
304         \textcolor{keyword}{call }\hyperlink{interfacegtdata__generic_1_1inquire}{inquire}(history % vars(result), name=name)
305         \textcolor{keywordflow}{if} (name == varname) \textcolor{keywordflow}{goto} 999
306         \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'no match <%c> <%c>'}, c1=trim(name), c2=trim(varname))
307 \textcolor{keywordflow}{      enddo}
308 \textcolor{keywordflow}{    endif}
309     result = 0
310 999 \textcolor{keywordflow}{continue}
311     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{"result=%d"}, \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}=(/result/))
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtool__history__internal_a2d399d3babe28eb5e94efc4f29e0372b_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtool__history__internal_addc41825760d626829d18cfd8458d35b}\label{namespacegtool__history__internal_addc41825760d626829d18cfd8458d35b}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!set\+\_\+fake\+\_\+dim\+\_\+value@{set\+\_\+fake\+\_\+dim\+\_\+value}}
\index{set\+\_\+fake\+\_\+dim\+\_\+value@{set\+\_\+fake\+\_\+dim\+\_\+value}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{set\+\_\+fake\+\_\+dim\+\_\+value()}{set\_fake\_dim\_value()}}
{\footnotesize\ttfamily subroutine, public \hyperlink{interfacegtool__history__internal_1_1set__fake__dim__value}{gtool\+\_\+history\+\_\+internal\+::set\+\_\+fake\+\_\+dim\+\_\+value} (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history), intent(inout)}]{history,  }\item[{integer, intent(in)}]{dimord }\end{DoxyParamCaption})}



Definition at line 245 of file gtool\+\_\+history\+\_\+internal.\+f90.



References dumperror().


\begin{DoxyCode}
245     \textcolor{comment}{!}
246     \textcolor{comment}{! 次元 history % dimvars(dimord) に値が設定されていない場合、}
247     \textcolor{comment}{! 「とりあえず」値を設定する。ただし、無制限次元 (時間次元)}
248     \textcolor{comment}{! に関しては history % origin, history % interval, history % count}
249     \textcolor{comment}{! から「まっとうな」値が設定される。}
250     \textcolor{comment}{!}
251     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__generic}{gtdata\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__generic_1_1inquire}{inquire}, \hyperlink{interfacegtdata__generic_1_1slice}{slice}, \hyperlink{interfacegtdata__generic_1_1put}{put}
252     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{dc__error_8f90_a805edc2691c008aded6c82bc8d28d99e}{dumperror}
253 \textcolor{comment}{!    use dc\_calendar, only: DCCalConvertByUnit}
254 \textcolor{comment}{!    use dc\_date, only: EvalByUnit}
255     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{intent(inout)}:: history
256     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: dimord
257     \textcolor{keywordtype}{integer}:: length, \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i}
258     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: \textcolor{keywordtype}{value}(:)
259     \textcolor{keywordtype}{logical}:: err
260   \textcolor{keywordflow}{continue}
261     \textcolor{keywordflow}{if} (dimord == history % unlimited\_index) \textcolor{keywordflow}{then}
262       \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(history % count)) \textcolor{keywordflow}{return}
263       length = maxval(history % count(:))
264     \textcolor{keywordflow}{else}
265       \textcolor{keyword}{call }\hyperlink{interfacegtdata__generic_1_1inquire}{inquire}(history % dimvars(dimord), size=length)
266 \textcolor{keywordflow}{    endif}
267     \textcolor{keywordflow}{if} (length == 0) \textcolor{keywordflow}{return}
268     \textcolor{keyword}{allocate}(value(length))
269     \textcolor{keywordflow}{if} (dimord == history % unlimited\_index) \textcolor{keywordflow}{then}
270       value(:) = (/(\textcolor{keywordtype}{real(i)}, \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i} = 1, length)/)
271       value(:) =   &
272         &   history % origin &
273         & + (value(:) - 1.0) * history % interval
274 \textcolor{comment}{!!$      value(:) =   &}
275 \textcolor{comment}{!!$        &   EvalByUnit( history % origin, '', history % unlimited\_units\_symbol ) &}
276 \textcolor{comment}{!!$        & + (value(:) - 1.0) &}
277 \textcolor{comment}{!!$        &   * EvalByUnit( history % interval, '', history % unlimited\_units\_symbol )}
278       \textcolor{keyword}{call }\hyperlink{interfacegtdata__generic_1_1slice}{slice}(history % dimvars(dimord), 1, start=1, count=length)
279     \textcolor{keywordflow}{else}
280       value(:) = (/(\textcolor{keywordtype}{real(i)}, \hyperlink{namespacedcunits__com_a5742752149f55f07bd09fc85d59f7319}{i} = 1, length)/)
281 \textcolor{keywordflow}{    endif}
282     \textcolor{keyword}{call }\hyperlink{interfacegtdata__generic_1_1put}{put}(history % dimvars(dimord), \textcolor{keywordtype}{value}, \textcolor{keyword}{size}(\textcolor{keywordtype}{value}), err)
283     \textcolor{keywordflow}{if} (err) \textcolor{keyword}{call }\hyperlink{dc__error_8f90_a805edc2691c008aded6c82bc8d28d99e}{dumperror}
284     \textcolor{keyword}{deallocate}(\textcolor{keywordtype}{value})
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtool__history__internal_addc41825760d626829d18cfd8458d35b_cgraph}
\end{center}
\end{figure}


\subsection{Variable Documentation}
\mbox{\Hypertarget{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}\label{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!default@{default}}
\index{default@{default}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{default}{default}}
{\footnotesize\ttfamily type(gt\+\_\+history), target, save, public gtool\+\_\+history\+\_\+internal\+::default}



Definition at line 49 of file gtool\+\_\+history\+\_\+internal.\+f90.



Referenced by append\+\_\+attrs(), historyaddattrchar0(), historyaddattrdouble0(), historyaddattrdouble1(), historyaddattrint0(), historyaddattrint1(), historyaddattrlogical0(), historyaddattrreal0(), historyaddattrreal1(), historyaddvariable1(), historyaddvariable2(), historyaxisaddattrchar0(), historyaxisaddattrdouble0(), historyaxisaddattrdouble1(), historyaxisaddattrint0(), historyaxisaddattrint1(), historyaxisaddattrlogical0(), historyaxisaddattrreal0(), historyaxisaddattrreal1(), historyaxisclear(), historyaxiscopy1(), historyaxiscreate1(), historyaxiscreate2(), historyaxisinquire1(), historyclose(), historycopy1(), historycopyvariable1(), historycreate1(), historycreate2(), historycreate3(), historyinquire1(), historyinquire2(), historyputaxismpidouble(), historyputaxismpiint(), historyputaxismpireal(), historyputcharex(), historyputdoubleex(), historyputintex(), historyputline(), historyputrealex(), historysettime(), historyvarinfoaddattrchar0(), historyvarinfoaddattrdouble0(), historyvarinfoaddattrdouble1(), historyvarinfoaddattrint0(), historyvarinfoaddattrint1(), historyvarinfoaddattrlogical0(), historyvarinfoaddattrreal0(), historyvarinfoaddattrreal1(), historyvarinfoclear0(), historyvarinfocopy1(), historyvarinfoinquire1(), and timegoahead().


\begin{DoxyCode}
49   \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{save}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{public}:: \hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default}
\end{DoxyCode}
\mbox{\Hypertarget{namespacegtool__history__internal_a62ea3a4c4f7a88a2bb8d4dd2dbe2b098}\label{namespacegtool__history__internal_a62ea3a4c4f7a88a2bb8d4dd2dbe2b098}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!gtool4\+\_\+netcdf\+\_\+conventions@{gtool4\+\_\+netcdf\+\_\+conventions}}
\index{gtool4\+\_\+netcdf\+\_\+conventions@{gtool4\+\_\+netcdf\+\_\+conventions}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{gtool4\+\_\+netcdf\+\_\+conventions}{gtool4\_netcdf\_conventions}}
{\footnotesize\ttfamily character(string), parameter, public gtool\+\_\+history\+\_\+internal\+::gtool4\+\_\+netcdf\+\_\+conventions = \char`\"{}http\+://www.\+gfd-\/dennou.\+org/library/gtool4/conventions/\char`\"{}}



Definition at line 57 of file gtool\+\_\+history\+\_\+internal.\+f90.



Referenced by historycreate1().


\begin{DoxyCode}
57   \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{parameter}, \textcolor{keywordtype}{public}:: &
58     & gtool4\_netCDF\_Conventions = &
59     &     \textcolor{stringliteral}{"http://www.gfd-dennou.org/library/gtool4/conventions/"}
\end{DoxyCode}
\mbox{\Hypertarget{namespacegtool__history__internal_a29f3530387244862c313d41352821433}\label{namespacegtool__history__internal_a29f3530387244862c313d41352821433}} 
\index{gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}!gtool4\+\_\+netcdf\+\_\+version@{gtool4\+\_\+netcdf\+\_\+version}}
\index{gtool4\+\_\+netcdf\+\_\+version@{gtool4\+\_\+netcdf\+\_\+version}!gtool\+\_\+history\+\_\+internal@{gtool\+\_\+history\+\_\+internal}}
\subsubsection{\texorpdfstring{gtool4\+\_\+netcdf\+\_\+version}{gtool4\_netcdf\_version}}
{\footnotesize\ttfamily character(string), parameter, public gtool\+\_\+history\+\_\+internal\+::gtool4\+\_\+netcdf\+\_\+version = \char`\"{}4.\+3\char`\"{}}



Definition at line 61 of file gtool\+\_\+history\+\_\+internal.\+f90.



Referenced by historycreate1().


\begin{DoxyCode}
61   \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{parameter}, \textcolor{keywordtype}{public}:: &
62     & gtool4\_netCDF\_version = \textcolor{stringliteral}{"4.3"}
\end{DoxyCode}
