\hypertarget{historyinquire_8f90}{}\section{gtool/gtool\+\_\+history/historyinquire.f90 File Reference}
\label{historyinquire_8f90}\index{gtool/gtool\+\_\+history/historyinquire.\+f90@{gtool/gtool\+\_\+history/historyinquire.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{historyinquire_8f90_ac4221dcdbfdd161af7aff82efc95be7b}{historyinquire1} (history, err, file, title, source, dims, dimsizes, longnames, units, xtypes, institution, origin, interval, newest, oldest, conventions, gt\+\_\+version, axes, varinfo)
\item 
subroutine \hyperlink{historyinquire_8f90_a41c0430a3d3402d52b907a52b93714fa}{historyinquire2} (history, err, file, title, source, dims, dimsizes, longnames, units, xtypes, institution, origin, interval, newest, oldest, conventions, gt\+\_\+version, axes, varinfo)
\item 
subroutine \hyperlink{historyinquire_8f90_a038b3b374eec0f0856f9c66062fec648}{historyinquire3} (history, err, file, title, source, dims, dimsizes, longnames, units, xtypes, institution, origin, interval, newest, oldest, conventions, gt\+\_\+version, axes, varinfo)
\item 
subroutine \hyperlink{historyinquire_8f90_a5d2c93991c9723eb7f6f6c8e66a473f6}{historyinquire4} (history, err, file, title, source, dims, dimsizes, longnames, units, xtypes, institution, origin, interval, newest, oldest, conventions, gt\+\_\+version, axes, varinfo)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{historyinquire_8f90_ac4221dcdbfdd161af7aff82efc95be7b}\label{historyinquire_8f90_ac4221dcdbfdd161af7aff82efc95be7b}} 
\index{historyinquire.\+f90@{historyinquire.\+f90}!historyinquire1@{historyinquire1}}
\index{historyinquire1@{historyinquire1}!historyinquire.\+f90@{historyinquire.\+f90}}
\subsubsection{\texorpdfstring{historyinquire1()}{historyinquire1()}}
{\footnotesize\ttfamily subroutine historyinquire1 (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history), intent(in)}]{history,  }\item[{logical, intent(out), optional}]{err,  }\item[{character($\ast$), intent(out), optional}]{file,  }\item[{character($\ast$), intent(out), optional}]{title,  }\item[{character($\ast$), intent(out), optional}]{source,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{dims,  }\item[{integer, dimension(\+:), optional, pointer}]{dimsizes,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{longnames,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{units,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{xtypes,  }\item[{character($\ast$), intent(out), optional}]{institution,  }\item[{real, intent(out), optional}]{origin,  }\item[{real, intent(out), optional}]{interval,  }\item[{real, intent(out), optional}]{newest,  }\item[{real, intent(out), optional}]{oldest,  }\item[{character($\ast$), intent(out), optional}]{conventions,  }\item[{character($\ast$), intent(out), optional}]{gt\+\_\+version,  }\item[{type(gt\+\_\+history\+\_\+axis), dimension(\+:), optional, pointer}]{axes,  }\item[{type(gt\+\_\+history\+\_\+varinfo), dimension(\+:), optional, pointer}]{varinfo }\end{DoxyParamCaption})}



Definition at line 15 of file historyinquire.\+f90.



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


\begin{DoxyCode}
15     \textcolor{comment}{!}
16     \textcolor{comment}{!== GT\_HISTORY 型変数への問い合わせ}
17     \textcolor{comment}{!}
18     \textcolor{comment}{! HistoryCreate や HistoryAddVariable などで設定した値の}
19     \textcolor{comment}{! 参照を行います。}
20     \textcolor{comment}{!}
21     \textcolor{comment}{! file, title, source, institution, origin, interval,}
22     \textcolor{comment}{! conventions, gt\_version, dims, dimsizes, longnames, units,}
23     \textcolor{comment}{! xtypes に関しては HistoryCreate を参照してください。}
24     \textcolor{comment}{!}
25     \textcolor{comment}{! title, source, institution, origin, interval, conventions, gt\_version}
26     \textcolor{comment}{! に関しては、値が得られなかった場合は "unknown" が返ります。}
27     \textcolor{comment}{!}
28     \textcolor{comment}{! dims, dimsizes, longnames, units, xtypes に関してはポインタに}
29     \textcolor{comment}{! 値を返すため、必ずポインタを空状態にしてから与えてください。}
30     \textcolor{comment}{!}
31     \textcolor{comment}{! axes と varinfo にはそれぞれ座標軸情報と変数情報を返します。}
32     \textcolor{comment}{! 将来的には全ての属性の値も一緒に返す予定ですが、現在は}
33     \textcolor{comment}{! long\_name, units, xtype のみが属性の値として返ります。}
34     \textcolor{comment}{!}
35     \textcolor{comment}{! *HistoryInquire* は 2 つのサブルーチンの総称名です。}
36     \textcolor{comment}{! HistoryCreate で *history* を与えなかった場合の問い合わせに関しては}
37     \textcolor{comment}{! 上記のサブルーチンを参照してください。}
38     \textcolor{comment}{!}
39     \textcolor{comment}{!=== エラー}
40     \textcolor{comment}{!}
41     \textcolor{comment}{! 以下の場合に、このサブルーチンはエラーを生じプログラムを終了させます。}
42     \textcolor{comment}{! ただし、*err* 引数を与える場合、この引数に <tt>.true.</tt> を}
43     \textcolor{comment}{! 返し、プログラムは続行します。}
44     \textcolor{comment}{!}
45     \textcolor{comment}{! - *history* が HistoryCreate によって初期設定されていない場合}
46     \textcolor{comment}{! - HistoryAddVariable や HistoryCopyVariable 等による変数定義が}
47     \textcolor{comment}{!   一度も行われていない GT\_HISTORY 変数に対して引数 varinfo}
48     \textcolor{comment}{!   を渡した場合}
49     \textcolor{comment}{!}
50     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: gt\_history, gt\_history\_axis, gt\_history\_varinfo, 
      gt\_history\_attr
51     \textcolor{keywordtype}{use }gtool\_history\_internal\textcolor{keywordtype}{, only}: default
52     \textcolor{keywordtype}{use }gtdata\_generic\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}, \hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}, \hyperlink{interfacegtdata__netcdf__generic_1_1open}{open}, \hyperlink{interfacegtdata__netcdf__generic_1_1close}{close}
53     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
54     \textcolor{keywordtype}{use }\hyperlink{namespacedc__url}{dc\_url}\textcolor{keywordtype}{, only}: urlsplit
55     \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_a0333e5d0387850c7c38b332f2526a196}{gt\_ebadhistory}, nf90\_enotvar
56     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}
57     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
58     \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}
59     \textcolor{keywordtype}{implicit none}
60     \textcolor{keywordtype}{type}(gt\_history), \textcolor{keywordtype}{intent(in)}:: history
61     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
62     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: file, title, source, institution
63     \textcolor{keywordtype}{real},\textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: origin, interval
64     \textcolor{keywordtype}{real},\textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: newest \textcolor{comment}{! 最新の時刻}
65     \textcolor{keywordtype}{real},\textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: oldest \textcolor{comment}{! 最初の時刻}
66     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: conventions, gt\_version
67     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: dims(:) \textcolor{comment}{! (out)}
68     \textcolor{keywordtype}{integer},\textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: dimsizes(:) \textcolor{comment}{! (out)}
69     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: longnames(:) \textcolor{comment}{! (out)}
70     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: units(:) \textcolor{comment}{! (out)}
71     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: xtypes(:) \textcolor{comment}{! (out)}
72     \textcolor{keywordtype}{type}(gt\_history\_axis), \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional} :: axes(:) \textcolor{comment}{! (out)}
73     \textcolor{keywordtype}{type}(gt\_history\_varinfo), \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional} :: varinfo(:) \textcolor{comment}{! (out)}
74 
75     \textcolor{comment}{! Internal Work}
76     \textcolor{keywordtype}{character(STRING)}      :: url, cause\_c
77     \textcolor{keywordtype}{character(TOKEN)}       :: unknown\_mes = \textcolor{stringliteral}{'unknown'}
78     \textcolor{keywordtype}{integer}          :: i, j, numdims, numvars, alldims, stat
79     \textcolor{keywordtype}{logical}                :: growable
80     \textcolor{keywordtype}{type}(gt\_variable)      :: dimvar
81     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryInquire1"}
82   \textcolor{keywordflow}{continue}
83     \textcolor{keyword}{call }beginsub(subname)
84     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
85     cause\_c =  \textcolor{stringliteral}{''}
86     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(history % dimvars) .or. &
87       & \textcolor{keyword}{size}(history % dimvars) < 1) \textcolor{keywordflow}{then}
88       stat = \hyperlink{namespacedc__error_a0333e5d0387850c7c38b332f2526a196}{gt\_ebadhistory}
89       \textcolor{keywordflow}{goto} 999
90 \textcolor{keywordflow}{    end if}
91 
92     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(file)) \textcolor{keywordflow}{then}
93       \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(history % dimvars(1), url=url)
94       \textcolor{keyword}{call }urlsplit(fullname=url, file=file)
95 \textcolor{keywordflow}{    end if}
96     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(title)) \textcolor{keywordflow}{then}
97       \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(1), \textcolor{stringliteral}{'+title'}, title, trim(unknown\_mes))
98 \textcolor{keywordflow}{    end if}
99     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(source)) \textcolor{keywordflow}{then}
100       \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(1), \textcolor{stringliteral}{'+source'}, source, trim(unknown\_mes))
101 \textcolor{keywordflow}{    end if}
102     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(institution)) \textcolor{keywordflow}{then}
103       \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(1), \textcolor{stringliteral}{'+institution'}, institution, trim(unknown\_mes))
104 \textcolor{keywordflow}{    end if}
105 
106     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(origin)) \textcolor{keywordflow}{then}
107       origin = history % origin
108 \textcolor{comment}{!      origin = EvalByUnit( history % origin, '', history % unlimited\_units\_symbol )}
109 \textcolor{keywordflow}{    end if}
110     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(interval)) \textcolor{keywordflow}{then}
111       interval = history % interval
112 \textcolor{comment}{!      interval = EvalByUnit( history % interval, '', history % unlimited\_units\_symbol )}
113 \textcolor{keywordflow}{    end if}
114     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(newest)) \textcolor{keywordflow}{then}
115       newest = history % newest
116 \textcolor{comment}{!      newest = EvalByUnit( history % newest, '', history % unlimited\_units\_symbol )}
117 \textcolor{keywordflow}{    end if}
118     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(oldest)) \textcolor{keywordflow}{then}
119       oldest = history % oldest
120 \textcolor{comment}{!      oldest = EvalByUnit( history % oldest, '', history % unlimited\_units\_symbol )}
121 \textcolor{keywordflow}{    end if}
122     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(conventions)) \textcolor{keywordflow}{then}
123       \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(1), \textcolor{stringliteral}{'+Conventions'}, conventions, trim(unknown\_mes))
124 \textcolor{keywordflow}{    end if}
125     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(gt\_version)) \textcolor{keywordflow}{then}
126       \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(1), \textcolor{stringliteral}{'+gt\_version'}, gt\_version, trim(unknown\_mes))
127 \textcolor{keywordflow}{    end if}
128     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dims)) \textcolor{keywordflow}{then}
129       numdims = \textcolor{keyword}{size}(history % dimvars)
130       \textcolor{keyword}{allocate}(dims(numdims))
131       \textcolor{keywordflow}{do} i = 1, numdims
132         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(history % dimvars(i), name=dims(i))
133 \textcolor{keywordflow}{      end do}
134 \textcolor{keywordflow}{    end if}
135     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dimsizes)) \textcolor{keywordflow}{then}
136       numdims = \textcolor{keyword}{size}(history % dimvars)
137       \textcolor{keyword}{allocate}(dimsizes(numdims))
138       \textcolor{keywordflow}{do} i = 1, numdims
139         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(history % dimvars(i), size=dimsizes(i), growable=growable)
140         \textcolor{keywordflow}{if} (growable) dimsizes(i) = 0
141 \textcolor{keywordflow}{      end do}
142 \textcolor{keywordflow}{    end if}
143     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(longnames)) \textcolor{keywordflow}{then}
144       numdims = \textcolor{keyword}{size}(history % dimvars)
145       \textcolor{keyword}{allocate}(longnames(numdims))
146       \textcolor{keywordflow}{do} i = 1, numdims
147         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(i), \textcolor{stringliteral}{'long\_name'}, &
148           & longnames(i), \textcolor{stringliteral}{'unknown'})
149 \textcolor{keywordflow}{      end do}
150 \textcolor{keywordflow}{    end if}
151     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(units)) \textcolor{keywordflow}{then}
152       numdims = \textcolor{keyword}{size}(history % dimvars)
153       \textcolor{keyword}{allocate}(units(numdims))
154       \textcolor{keywordflow}{do} i = 1, numdims
155         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(i), \textcolor{stringliteral}{'units'}, &
156           & units(i), \textcolor{stringliteral}{'unknown'})
157 \textcolor{keywordflow}{      end do}
158 \textcolor{keywordflow}{    end if}
159     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(xtypes)) \textcolor{keywordflow}{then}
160       numdims = \textcolor{keyword}{size}(history % dimvars)
161       \textcolor{keyword}{allocate}(xtypes(numdims))
162       \textcolor{keywordflow}{do} i = 1, numdims
163         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(history % dimvars(i), xtype=xtypes(i))
164 \textcolor{keywordflow}{      end do}
165 \textcolor{keywordflow}{    end if}
166     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(axes)) \textcolor{keywordflow}{then}
167       numvars = \textcolor{keyword}{size}(history % dimvars)
168       \textcolor{keyword}{allocate}(axes(numvars))
169       \textcolor{keywordflow}{do} i = 1, numvars
170         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(history % dimvars(i), &
171           & allcount=axes(i) % length, &
172           & xtype=axes(i) % xtype, name=axes(i) % name)
173         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(i), \textcolor{stringliteral}{'long\_name'}, &
174           & axes(i) % longname, \textcolor{stringliteral}{'unknown'})
175         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % dimvars(i), \textcolor{stringliteral}{'units'}, &
176           & axes(i) % units, \textcolor{stringliteral}{'unknown'})
177 
178         \textcolor{comment}{! 属性 GT\_HISTORY\_ATTR はまだ取得できない}
179         \textcolor{comment}{!}
180         \textcolor{comment}{! するためには, 属性名に対して様々な型が存在しうると}
181         \textcolor{comment}{! 考えられるため, get\_attr (gtdata\_generic および gtdata\_netcdf\_generic)}
182         \textcolor{comment}{! に err 属性を装備させ, 取得できない際にエラーを}
183         \textcolor{comment}{! 返してもらわなければならないだろう.}
184 
185 \textcolor{keywordflow}{      end do}
186 \textcolor{keywordflow}{    end if}
187 
188     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(varinfo)) \textcolor{keywordflow}{then}
189       \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(history % vars) .or. &
190         & \textcolor{keyword}{size}(history % vars) < 1) \textcolor{keywordflow}{then}
191         stat = nf90\_enotvar
192         \textcolor{keywordflow}{goto} 999
193 \textcolor{keywordflow}{      end if}
194 
195       numvars = \textcolor{keyword}{size}(history % vars)
196       \textcolor{keyword}{allocate}(varinfo(numvars))
197       \textcolor{keywordflow}{do} i = 1, numvars
198         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(history % vars(i), alldims=alldims, &
199           & xtype=varinfo(i) % xtype, name=varinfo(i) % name)
200         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % vars(i), \textcolor{stringliteral}{'long\_name'}, &
201           & varinfo(i) % longname, \textcolor{stringliteral}{'unknown'})
202         \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1get__attr}{get\_attr}(history % vars(i), \textcolor{stringliteral}{'units'}, &
203           & varinfo(i) % units, \textcolor{stringliteral}{'unknown'})
204 
205         \textcolor{comment}{! 属性 GT\_HISTORY\_ATTR はまだ取得できない}
206         \textcolor{comment}{!}
207         \textcolor{comment}{! するためには, 属性名に対して様々な型が存在しうると}
208         \textcolor{comment}{! 考えられるため, get\_attr (gtdata\_generic および gtdata\_netcdf\_generic)}
209         \textcolor{comment}{! に err 属性を装備させ, 取得できない際にエラーを}
210         \textcolor{comment}{! 返してもらわなければならないだろう.}
211 
212         \textcolor{keyword}{allocate}(varinfo(i) % dims(alldims))
213         \textcolor{keywordflow}{do} j = 1, alldims
214           \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1open}{open}(var=dimvar, source\_var=history % vars(i), &
215             & dimord=j, count\_compact=.true.)
216           \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(dimvar, name=varinfo(i) % dims(j))
217           \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1close}{close}(dimvar)
218 \textcolor{keywordflow}{        end do}
219 
220         varinfo(i) % initialized = .true.
221 
222 \textcolor{keywordflow}{      end do}
223 \textcolor{keywordflow}{    end if}
224 999 \textcolor{keywordflow}{continue}
225     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c=cause\_c)
226     \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]{historyinquire_8f90_ac4221dcdbfdd161af7aff82efc95be7b_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyinquire_8f90_a41c0430a3d3402d52b907a52b93714fa}\label{historyinquire_8f90_a41c0430a3d3402d52b907a52b93714fa}} 
\index{historyinquire.\+f90@{historyinquire.\+f90}!historyinquire2@{historyinquire2}}
\index{historyinquire2@{historyinquire2}!historyinquire.\+f90@{historyinquire.\+f90}}
\subsubsection{\texorpdfstring{historyinquire2()}{historyinquire2()}}
{\footnotesize\ttfamily subroutine historyinquire2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{history,  }\item[{logical, intent(out), optional}]{err,  }\item[{character($\ast$), intent(out), optional}]{file,  }\item[{character($\ast$), intent(out), optional}]{title,  }\item[{character($\ast$), intent(out), optional}]{source,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{dims,  }\item[{integer, dimension(\+:), optional, pointer}]{dimsizes,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{longnames,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{units,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{xtypes,  }\item[{character($\ast$), intent(out), optional}]{institution,  }\item[{real, intent(out), optional}]{origin,  }\item[{real, intent(out), optional}]{interval,  }\item[{real, intent(out), optional}]{newest,  }\item[{real, intent(out), optional}]{oldest,  }\item[{character($\ast$), intent(out), optional}]{conventions,  }\item[{character($\ast$), intent(out), optional}]{gt\+\_\+version,  }\item[{type(gt\+\_\+history\+\_\+axis), dimension(\+:), optional, pointer}]{axes,  }\item[{type(gt\+\_\+history\+\_\+varinfo), dimension(\+:), optional, pointer}]{varinfo }\end{DoxyParamCaption})}



Definition at line 236 of file historyinquire.\+f90.



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


\begin{DoxyCode}
236     \textcolor{comment}{!}
237     \textcolor{comment}{!== GT\_HISTORY 型変数への問い合わせ}
238     \textcolor{comment}{!}
239     \textcolor{comment}{! HistoryCreate で *history* を指定しなかった場合はこちらの}
240     \textcolor{comment}{! サブルーチンで問い合わせを行います。}
241     \textcolor{comment}{! *history* には必ず "<tt>default</tt>" という文字列を与えてください。}
242     \textcolor{comment}{!}
243     \textcolor{comment}{! *HistoryInquire* は 2 つのサブルーチンの総称名です。}
244     \textcolor{comment}{! 各引数の情報に関しては下記のサブルーチンを参照してください。}
245     \textcolor{comment}{!}
246     \textcolor{comment}{!--}
247     \textcolor{comment}{! HistoryInquire1 と同機能だが, こちらは}
248     \textcolor{comment}{! history に "default" という文字列を代入することで,}
249     \textcolor{comment}{! デフォルトで出力されるファイル名 (HistoryCreate で}
250     \textcolor{comment}{! history 引数を与えない場合のファイル名) が返る.}
251     \textcolor{comment}{!++}
252     \textcolor{comment}{!}
253     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: gt\_history, gt\_history\_axis, gt\_history\_varinfo, 
      gt\_history\_attr
254     \textcolor{keywordtype}{use }gtool\_history\_internal\textcolor{keywordtype}{, only}: default
255     \textcolor{keywordtype}{use }gtool\_history\_generic\textcolor{keywordtype}{, only}: historyinquire
256     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, nf90\_einval
257     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
258     \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}
259     \textcolor{keywordtype}{implicit none}
260     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: history
261     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
262     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: file, title, source, institution
263     \textcolor{keywordtype}{real},\textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: origin, interval, newest, oldest
264     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: conventions, gt\_version
265     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: dims(:) \textcolor{comment}{! (out)}
266     \textcolor{keywordtype}{integer},\textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: dimsizes(:) \textcolor{comment}{! (out)}
267     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: longnames(:) \textcolor{comment}{! (out)}
268     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: units(:) \textcolor{comment}{! (out)}
269     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: xtypes(:) \textcolor{comment}{! (out)}
270     \textcolor{keywordtype}{type}(gt\_history\_axis), \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional} :: axes(:) \textcolor{comment}{! (out)}
271     \textcolor{keywordtype}{type}(gt\_history\_varinfo), \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional} :: varinfo(:) \textcolor{comment}{! (out)}
272     \textcolor{keywordtype}{integer}:: stat
273     \textcolor{keywordtype}{character(STRING)}:: cause\_c
274     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryInquire2"}
275   \textcolor{keywordflow}{continue}
276     \textcolor{keyword}{call }beginsub(subname, \textcolor{stringliteral}{"history=%c"}, c1=trim(history))
277     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
278     cause\_c = \textcolor{stringliteral}{''}
279     \textcolor{keywordflow}{if} (trim(history) /= \textcolor{stringliteral}{'default'}) \textcolor{keywordflow}{then}
280       stat = nf90\_einval
281       cause\_c = \textcolor{stringliteral}{'history="'} // trim(history) // \textcolor{stringliteral}{'"'}
282       \textcolor{keywordflow}{goto} 999
283 \textcolor{keywordflow}{    end if}
284     \textcolor{keyword}{call }historyinquire(default, err, file, title, source, &
285       & dims, dimsizes, longnames, units, xtypes, &
286       & institution, origin, interval, newest, oldest, &
287       & conventions, gt\_version, &
288       & axes, varinfo )
289 999 \textcolor{keywordflow}{continue}
290     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c=cause\_c)
291     \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]{historyinquire_8f90_a41c0430a3d3402d52b907a52b93714fa_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyinquire_8f90_a038b3b374eec0f0856f9c66062fec648}\label{historyinquire_8f90_a038b3b374eec0f0856f9c66062fec648}} 
\index{historyinquire.\+f90@{historyinquire.\+f90}!historyinquire3@{historyinquire3}}
\index{historyinquire3@{historyinquire3}!historyinquire.\+f90@{historyinquire.\+f90}}
\subsubsection{\texorpdfstring{historyinquire3()}{historyinquire3()}}
{\footnotesize\ttfamily subroutine historyinquire3 (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history), intent(in)}]{history,  }\item[{logical, intent(out), optional}]{err,  }\item[{character($\ast$), intent(out), optional}]{file,  }\item[{character($\ast$), intent(out), optional}]{title,  }\item[{character($\ast$), intent(out), optional}]{source,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{dims,  }\item[{integer, dimension(\+:), optional, pointer}]{dimsizes,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{longnames,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{units,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{xtypes,  }\item[{character($\ast$), intent(out), optional}]{institution,  }\item[{real, intent(out), optional}]{origin,  }\item[{real, intent(out), optional}]{interval,  }\item[{real, intent(out), optional}]{newest,  }\item[{real, intent(out), optional}]{oldest,  }\item[{character($\ast$), intent(out), optional}]{conventions,  }\item[{character($\ast$), intent(out), optional}]{gt\+\_\+version,  }\item[{type(gt\+\_\+history\+\_\+axis), dimension(\+:), optional, pointer}]{axes,  }\item[{type(gt\+\_\+history\+\_\+varinfo), dimension(\+:), optional, pointer}]{varinfo }\end{DoxyParamCaption})}



Definition at line 301 of file historyinquire.\+f90.


\begin{DoxyCode}
301     \textcolor{comment}{!}
302     \textcolor{comment}{! 使用方法は HistoryInquire と同様です.}
303     \textcolor{comment}{!}
304     \textcolor{comment}{! Usage is same as "HistoryInquire".}
305     \textcolor{comment}{!}
306     \textcolor{comment}{!--}
307     \textcolor{comment}{! 総称名 Inquire として提供するためのサブルーチンです.}
308     \textcolor{comment}{! 機能は HistoryInquire1 と同じです.}
309     \textcolor{comment}{!++}
310     \textcolor{comment}{!}
311     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: gt\_history, gt\_history\_axis, gt\_history\_varinfo, 
      gt\_history\_attr
312     \textcolor{keywordtype}{use }gtool\_history\_generic\textcolor{keywordtype}{, only}: historyinquire
313     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
314     \textcolor{keywordtype}{implicit none}
315     \textcolor{keywordtype}{type}(gt\_history), \textcolor{keywordtype}{intent(in)}:: history
316     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
317     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: file, title, source, institution
318     \textcolor{keywordtype}{real},\textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: origin, interval
319     \textcolor{keywordtype}{real},\textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: newest \textcolor{comment}{! 最新の時刻}
320     \textcolor{keywordtype}{real},\textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: oldest \textcolor{comment}{! 最初の時刻}
321     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: conventions, gt\_version
322     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: dims(:) \textcolor{comment}{! (out)}
323     \textcolor{keywordtype}{integer},\textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: dimsizes(:) \textcolor{comment}{! (out)}
324     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: longnames(:) \textcolor{comment}{! (out)}
325     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: units(:) \textcolor{comment}{! (out)}
326     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: xtypes(:) \textcolor{comment}{! (out)}
327     \textcolor{keywordtype}{type}(gt\_history\_axis), \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional} :: axes(:) \textcolor{comment}{! (out)}
328     \textcolor{keywordtype}{type}(gt\_history\_varinfo), \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional} :: varinfo(:) \textcolor{comment}{! (out)}
329 
330     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryInquire3"}
331   \textcolor{keywordflow}{continue}
332     \textcolor{keyword}{call }beginsub(subname)
333     \textcolor{keyword}{call }historyinquire(history, err, file, title, source, &
334       & dims, dimsizes, longnames, units, xtypes, &
335       & institution, origin, interval, newest, oldest, &
336       & conventions, gt\_version, &
337       & axes, varinfo )
338     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
\mbox{\Hypertarget{historyinquire_8f90_a5d2c93991c9723eb7f6f6c8e66a473f6}\label{historyinquire_8f90_a5d2c93991c9723eb7f6f6c8e66a473f6}} 
\index{historyinquire.\+f90@{historyinquire.\+f90}!historyinquire4@{historyinquire4}}
\index{historyinquire4@{historyinquire4}!historyinquire.\+f90@{historyinquire.\+f90}}
\subsubsection{\texorpdfstring{historyinquire4()}{historyinquire4()}}
{\footnotesize\ttfamily subroutine historyinquire4 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{history,  }\item[{logical, intent(out), optional}]{err,  }\item[{character($\ast$), intent(out), optional}]{file,  }\item[{character($\ast$), intent(out), optional}]{title,  }\item[{character($\ast$), intent(out), optional}]{source,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{dims,  }\item[{integer, dimension(\+:), optional, pointer}]{dimsizes,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{longnames,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{units,  }\item[{character($\ast$), dimension(\+:), optional, pointer}]{xtypes,  }\item[{character($\ast$), intent(out), optional}]{institution,  }\item[{real, intent(out), optional}]{origin,  }\item[{real, intent(out), optional}]{interval,  }\item[{real, intent(out), optional}]{newest,  }\item[{real, intent(out), optional}]{oldest,  }\item[{character($\ast$), intent(out), optional}]{conventions,  }\item[{character($\ast$), intent(out), optional}]{gt\+\_\+version,  }\item[{type(gt\+\_\+history\+\_\+axis), dimension(\+:), optional, pointer}]{axes,  }\item[{type(gt\+\_\+history\+\_\+varinfo), dimension(\+:), optional, pointer}]{varinfo }\end{DoxyParamCaption})}



Definition at line 348 of file historyinquire.\+f90.


\begin{DoxyCode}
348     \textcolor{comment}{!}
349     \textcolor{comment}{! 使用方法は HistoryInquire と同様です.}
350     \textcolor{comment}{!}
351     \textcolor{comment}{! Usage is same as "HistoryInquire".}
352     \textcolor{comment}{!}
353     \textcolor{comment}{!--}
354     \textcolor{comment}{! 総称名 Inquire として提供するためのサブルーチンです.}
355     \textcolor{comment}{! 機能は HistoryInquire2 と同じです.}
356     \textcolor{comment}{!++}
357     \textcolor{comment}{!}
358     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: gt\_history, gt\_history\_axis, gt\_history\_varinfo, 
      gt\_history\_attr
359     \textcolor{keywordtype}{use }gtool\_history\_generic\textcolor{keywordtype}{, only}: historyinquire
360     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
361     \textcolor{keywordtype}{implicit none}
362     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: history
363     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
364     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: file, title, source, institution
365     \textcolor{keywordtype}{real},\textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: origin, interval, newest, oldest
366     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: conventions, gt\_version
367     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: dims(:) \textcolor{comment}{! (out)}
368     \textcolor{keywordtype}{integer},\textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: dimsizes(:) \textcolor{comment}{! (out)}
369     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: longnames(:) \textcolor{comment}{! (out)}
370     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: units(:) \textcolor{comment}{! (out)}
371     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: xtypes(:) \textcolor{comment}{! (out)}
372     \textcolor{keywordtype}{type}(gt\_history\_axis), \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional} :: axes(:) \textcolor{comment}{! (out)}
373     \textcolor{keywordtype}{type}(gt\_history\_varinfo), \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional} :: varinfo(:) \textcolor{comment}{! (out)}
374     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryInquire4"}
375   \textcolor{keywordflow}{continue}
376     \textcolor{keyword}{call }beginsub(subname)
377     \textcolor{keyword}{call }historyinquire(history, err, file, title, source, &
378       & dims, dimsizes, longnames, units, xtypes, &
379       & institution, origin, interval, newest, oldest, &
380       & conventions, gt\_version, &
381       & axes, varinfo )
382     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
