\hypertarget{gdncattrinquire_8f90}{}\section{gtdata/gtdata\+\_\+netcdf/gdncattrinquire.f90 File Reference}
\label{gdncattrinquire_8f90}\index{gtdata/gtdata\+\_\+netcdf/gdncattrinquire.\+f90@{gtdata/gtdata\+\_\+netcdf/gdncattrinquire.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{gdncattrinquire_8f90_a02f920a16ce07fdad7f6902d1dfc880d}{gdncattrinquire} (var, attrname, xtype)
\item 
subroutine \hyperlink{gdncattrinquire_8f90_aa89bc13a2b0172da1db0c24f958ab040}{gdncattrinquireplus} (var, attrname, varid, nf\+\_\+attrname)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{gdncattrinquire_8f90_a02f920a16ce07fdad7f6902d1dfc880d}\label{gdncattrinquire_8f90_a02f920a16ce07fdad7f6902d1dfc880d}} 
\index{gdncattrinquire.\+f90@{gdncattrinquire.\+f90}!gdncattrinquire@{gdncattrinquire}}
\index{gdncattrinquire@{gdncattrinquire}!gdncattrinquire.\+f90@{gdncattrinquire.\+f90}}
\subsubsection{\texorpdfstring{gdncattrinquire()}{gdncattrinquire()}}
{\footnotesize\ttfamily subroutine gdncattrinquire (\begin{DoxyParamCaption}\item[{type(gd\+\_\+nc\+\_\+variable), intent(in)}]{var,  }\item[{character(len=$\ast$), intent(in)}]{attrname,  }\item[{character(len=$\ast$), intent(out), optional}]{xtype }\end{DoxyParamCaption})}



Definition at line 5 of file gdncattrinquire.\+f90.



References gdncxtypename(), dc\+\_\+url\+::gt\+\_\+plus, and gtdata\+\_\+netcdf\+\_\+internal\+::vtable\+\_\+lookup().


\begin{DoxyCode}
5   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__types}{gtdata\_netcdf\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable}{gd\_nc\_variable}, 
      \hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__entry}{gd\_nc\_variable\_entry}
6   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__internal}{gtdata\_netcdf\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__netcdf__internal_afe013c8012ec100bf1e94e5147c340de}{vtable\_lookup}
7   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__generic}{gtdata\_netcdf\_generic}\textcolor{keywordtype}{, only}: \hyperlink{gdncxtypename_8f90_a61d937db46bd95ad9652b0c86987f5db}{gdncxtypename}, 
      \hyperlink{interfacegtdata__netcdf__generic_1_1inquireplus}{inquireplus}
8   \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_max\_name, nf90\_noerr, nf90\_inquire\_attribute
9   \textcolor{keywordtype}{use }\hyperlink{namespacedc__url}{dc\_url}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__url_a373b7d2195c21ebf1458e79ad72dce0d}{gt\_plus}
10   \textcolor{keywordtype}{implicit none}
11   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable}{gd\_nc\_variable}), \textcolor{keywordtype}{intent(in)}:: var
12   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)}:: attrname
13   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: xtype
14   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__entry}{gd\_nc\_variable\_entry}):: ent
15   \textcolor{keywordtype}{integer}:: varid, i\_xtype, stat
16   \textcolor{keywordtype}{character(len=NF90\_MAX\_NAME)}:: anam
17   stat = \hyperlink{namespacegtdata__netcdf__internal_afe013c8012ec100bf1e94e5147c340de}{vtable\_lookup}(var, ent)
18   \textcolor{keywordflow}{if} (stat /= nf90\_noerr) \textcolor{keywordflow}{return}
19   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(xtype)) \textcolor{keywordflow}{then}
20     \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquireplus}{inquireplus}(var, attrname, varid, anam)
21     stat = nf90\_inquire\_attribute(ent%fileid, varid, anam, xtype=i\_xtype)
22     \textcolor{keywordflow}{if} (stat /= nf90\_noerr) i\_xtype = 0
23     \textcolor{keyword}{call }\hyperlink{gdncxtypename_8f90_a61d937db46bd95ad9652b0c86987f5db}{gdncxtypename}(i\_xtype, xtype)
24 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=309pt]{gdncattrinquire_8f90_a02f920a16ce07fdad7f6902d1dfc880d_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{gdncattrinquire_8f90_aa89bc13a2b0172da1db0c24f958ab040}\label{gdncattrinquire_8f90_aa89bc13a2b0172da1db0c24f958ab040}} 
\index{gdncattrinquire.\+f90@{gdncattrinquire.\+f90}!gdncattrinquireplus@{gdncattrinquireplus}}
\index{gdncattrinquireplus@{gdncattrinquireplus}!gdncattrinquire.\+f90@{gdncattrinquire.\+f90}}
\subsubsection{\texorpdfstring{gdncattrinquireplus()}{gdncattrinquireplus()}}
{\footnotesize\ttfamily subroutine gdncattrinquireplus (\begin{DoxyParamCaption}\item[{type(gd\+\_\+nc\+\_\+variable), intent(in)}]{var,  }\item[{character(len=$\ast$), intent(in)}]{attrname,  }\item[{integer, intent(out)}]{varid,  }\item[{character(len=$\ast$), intent(out)}]{nf\+\_\+attrname }\end{DoxyParamCaption})}



Definition at line 28 of file gdncattrinquire.\+f90.



References dc\+\_\+url\+::gt\+\_\+plus, and gtdata\+\_\+netcdf\+\_\+internal\+::vtable\+\_\+lookup().


\begin{DoxyCode}
28   \textcolor{comment}{!}
29   \textcolor{comment}{! 実際にアクセスするときに使う varid, attrname を得る.}
30   \textcolor{comment}{! attrname の先頭が '+' ---> 大域属性を強制指示.}
31   \textcolor{comment}{! attrname の先頭が '-' ---> 変数属性、大域属性の順で検索.}
32   \textcolor{comment}{!}
33   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__types}{gtdata\_netcdf\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable}{gd\_nc\_variable}, 
      \hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__entry}{gd\_nc\_variable\_entry}
34   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__internal}{gtdata\_netcdf\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__netcdf__internal_afe013c8012ec100bf1e94e5147c340de}{vtable\_lookup}
35   \textcolor{keywordtype}{use }\hyperlink{namespacedc__url}{dc\_url}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__url_a373b7d2195c21ebf1458e79ad72dce0d}{gt\_plus}
36   \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_global, nf90\_noerr, nf90\_inquire\_attribute
37   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable}{gd\_nc\_variable}), \textcolor{keywordtype}{intent(in)}:: var
38   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)}:: attrname
39   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: varid
40   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__entry}{gd\_nc\_variable\_entry}):: ent
41   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(out)}:: nf\_attrname
42   \textcolor{keywordtype}{integer}:: stat, n
43   stat = \hyperlink{namespacegtdata__netcdf__internal_afe013c8012ec100bf1e94e5147c340de}{vtable\_lookup}(var, ent)
44   \textcolor{keywordflow}{if} (stat /= nf90\_noerr) \textcolor{keywordflow}{return}
45   \textcolor{keywordflow}{if} (attrname(1:1) == \hyperlink{namespacedc__url_a373b7d2195c21ebf1458e79ad72dce0d}{gt\_plus}) \textcolor{keywordflow}{then}
46     varid = nf90\_global
47     nf\_attrname = attrname(2: )
48   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (attrname(1:1) == \textcolor{stringliteral}{'-'}) \textcolor{keywordflow}{then}
49     varid = ent%varid
50     nf\_attrname = attrname(2: )
51     stat = nf90\_inquire\_attribute(ent%fileid, varid, nf\_attrname, len = n)
52     \textcolor{keywordflow}{if} (stat == nf90\_noerr) \textcolor{keywordflow}{return}
53     varid = nf90\_global
54   \textcolor{keywordflow}{else}
55     varid = ent%varid
56     nf\_attrname = attrname
57 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=327pt]{gdncattrinquire_8f90_aa89bc13a2b0172da1db0c24f958ab040_cgraph}
\end{center}
\end{figure}
