\hypertarget{gdncvarattr_8f90}{}\section{gtdata/gtdata\+\_\+netcdf/gdncvarattr.f90 File Reference}
\label{gdncvarattr_8f90}\index{gtdata/gtdata\+\_\+netcdf/gdncvarattr.\+f90@{gtdata/gtdata\+\_\+netcdf/gdncvarattr.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{gdncvarattr_8f90_af606502a37480137d80ba810108df4a3}{gdncvarattrrewind} (var)
\item 
subroutine \hyperlink{gdncvarattr_8f90_a1e3dce33f9e11cba51b89c27ec7ca156}{gdncvarattrnext} (var, name, vend)
\end{DoxyCompactItemize}


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



Definition at line 30 of file gdncvarattr.\+f90.



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


\begin{DoxyCode}
30   \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}
31   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__internal}{gtdata\_netcdf\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__netcdf__internal_ad13e0de15b03a99e92efa41868e52549}{vtable\_set\_attrid}, 
      \hyperlink{namespacegtdata__netcdf__internal_afe013c8012ec100bf1e94e5147c340de}{vtable\_lookup}
32   \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_noerr, nf90\_max\_name, nf90\_inq\_attname, nf90\_global
33   \textcolor{keywordtype}{use }\hyperlink{namespacedc__url}{dc\_url}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__url_a373b7d2195c21ebf1458e79ad72dce0d}{gt\_plus}
34   \textcolor{keywordtype}{implicit none}
35   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable}{gd\_nc\_variable}), \textcolor{keywordtype}{intent(in)}:: var
36   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(out)}:: name
37   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__entry}{gd\_nc\_variable\_entry}):: ent
38   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: vend
39   \textcolor{keywordtype}{character(len = NF90\_MAX\_NAME)}:: attrname
40   \textcolor{keywordtype}{integer}:: stat
41   \textcolor{keywordtype}{integer}:: new\_attrid
42 
43   stat = \hyperlink{namespacegtdata__netcdf__internal_afe013c8012ec100bf1e94e5147c340de}{vtable\_lookup}(var, ent)
44   \textcolor{keywordflow}{if} (stat /= nf90\_noerr) \textcolor{keywordflow}{goto} 999
45 
46   new\_attrid = ent%attrid
47   \textcolor{comment}{! 最初は変数属性の検索}
48   \textcolor{keywordflow}{if} (ent%attrid >= 0) \textcolor{keywordflow}{then}
49     new\_attrid = ent%attrid + 1
50     stat = nf90\_inq\_attname(ent%fileid, ent%varid, new\_attrid, attrname)
51     \textcolor{keywordflow}{if} (stat == nf90\_noerr) \textcolor{keywordflow}{then}
52       name = attrname
53       stat = \hyperlink{namespacegtdata__netcdf__internal_ad13e0de15b03a99e92efa41868e52549}{vtable\_set\_attrid}(var, new\_attrid)
54       vend = .false.
55       \textcolor{keywordflow}{return}
56 \textcolor{keywordflow}{    end if}
57     new\_attrid = -1
58 \textcolor{keywordflow}{  endif}
59 
60   \textcolor{comment}{! 次は大域属性の検索}
61   stat = nf90\_inq\_attname(ent%fileid, nf90\_global, -new\_attrid, attrname)
62   \textcolor{keywordflow}{if} (stat == nf90\_noerr) \textcolor{keywordflow}{then}
63     new\_attrid = new\_attrid - 1
64     name = \hyperlink{namespacedc__url_a373b7d2195c21ebf1458e79ad72dce0d}{gt\_plus} // attrname
65     stat = \hyperlink{namespacegtdata__netcdf__internal_ad13e0de15b03a99e92efa41868e52549}{vtable\_set\_attrid}(var, new\_attrid)
66     vend = .false.
67     \textcolor{keywordflow}{return}
68 \textcolor{keywordflow}{  endif}
69 
70 999 \textcolor{keywordflow}{continue}
71   \textcolor{comment}{! ここでは attrid の再設定はしない。次呼んでもエラーになるのが適当。}
72   vend = .true.
73   name = \textcolor{stringliteral}{""}
74   \textcolor{keywordflow}{return}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=313pt]{gdncvarattr_8f90_a1e3dce33f9e11cba51b89c27ec7ca156_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{gdncvarattr_8f90_af606502a37480137d80ba810108df4a3}\label{gdncvarattr_8f90_af606502a37480137d80ba810108df4a3}} 
\index{gdncvarattr.\+f90@{gdncvarattr.\+f90}!gdncvarattrrewind@{gdncvarattrrewind}}
\index{gdncvarattrrewind@{gdncvarattrrewind}!gdncvarattr.\+f90@{gdncvarattr.\+f90}}
\subsubsection{\texorpdfstring{gdncvarattrrewind()}{gdncvarattrrewind()}}
{\footnotesize\ttfamily subroutine gdncvarattrrewind (\begin{DoxyParamCaption}\item[{type(gd\+\_\+nc\+\_\+variable), intent(in)}]{var }\end{DoxyParamCaption})}



Definition at line 16 of file gdncvarattr.\+f90.



References gtdata\+\_\+netcdf\+\_\+internal\+::vtable\+\_\+set\+\_\+attrid().


\begin{DoxyCode}
16   \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}
17   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__internal}{gtdata\_netcdf\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__netcdf__internal_ad13e0de15b03a99e92efa41868e52549}{vtable\_set\_attrid}
18   \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_noerr
19   \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: dbgmessage
20   \textcolor{keywordtype}{implicit none}
21   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable}{gd\_nc\_variable}), \textcolor{keywordtype}{intent(in)}:: var
22   \textcolor{keywordtype}{integer}:: stat
23   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'GDNcVarAttrRewind'}
24 
25   stat = \hyperlink{namespacegtdata__netcdf__internal_ad13e0de15b03a99e92efa41868e52549}{vtable\_set\_attrid}(var, 0)
26   \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{"%c %d"}, c1=subname, i=(/stat/))
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=323pt]{gdncvarattr_8f90_af606502a37480137d80ba810108df4a3_cgraph}
\end{center}
\end{figure}
