\hypertarget{gdncvarsearch_8f90}{}\section{gtdata/gtdata\+\_\+netcdf/gdncvarsearch.f90 File Reference}
\label{gdncvarsearch_8f90}\index{gtdata/gtdata\+\_\+netcdf/gdncvarsearch.\+f90@{gtdata/gtdata\+\_\+netcdf/gdncvarsearch.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{gdncvarsearch_8f90_a8ecf8b897d9b97d7721db7674331ee3e}{gdncvarsearchinit} (iter, url\+Base)
\item 
subroutine \hyperlink{gdncvarsearch_8f90_a5082b95b06c1c69e314fdaeffd7207c6}{gdncvarsearchnext} (iter, url, end)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{gdncvarsearch_8f90_a8ecf8b897d9b97d7721db7674331ee3e}\label{gdncvarsearch_8f90_a8ecf8b897d9b97d7721db7674331ee3e}} 
\index{gdncvarsearch.\+f90@{gdncvarsearch.\+f90}!gdncvarsearchinit@{gdncvarsearchinit}}
\index{gdncvarsearchinit@{gdncvarsearchinit}!gdncvarsearch.\+f90@{gdncvarsearch.\+f90}}
\subsubsection{\texorpdfstring{gdncvarsearchinit()}{gdncvarsearchinit()}}
{\footnotesize\ttfamily subroutine gdncvarsearchinit (\begin{DoxyParamCaption}\item[{type(gd\+\_\+nc\+\_\+variable\+\_\+search), intent(out)}]{iter,  }\item[{character(len = $\ast$), intent(in)}]{url\+Base }\end{DoxyParamCaption})}



Definition at line 10 of file gdncvarsearch.\+f90.



References gdncfileopen(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
10   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
11   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__types}{gtdata\_netcdf\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__search}{gd\_nc\_variable\_search}
12   \textcolor{keywordtype}{use }\hyperlink{namespacedc__url}{dc\_url}\textcolor{keywordtype}{, only}: urlsplit
13   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__file__generic}{gtdata\_netcdf\_file\_generic}\textcolor{keywordtype}{, only}: \hyperlink{gdncfileopen_8f90_a4f95f1f240238c6a431b39ea8e7c6f47}{gdncfileopen}
14   \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
15   \textcolor{keywordtype}{implicit none}
16   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__search}{gd\_nc\_variable\_search}), \textcolor{keywordtype}{intent(out)}:: iter
17   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: urlbase
18   \textcolor{keywordtype}{character(len = string)}:: file
19   \textcolor{keywordtype}{logical}:: err
20   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'GDNcVarSearchInit'}
21 
22   \textcolor{keyword}{call }beginsub(subname, \textcolor{stringliteral}{'urlbase=<%c>'}, c1=trim(urlbase))
23   \textcolor{keyword}{call }urlsplit(trim(urlbase), file=file)
24   \textcolor{keyword}{call }\hyperlink{gdncfileopen_8f90_a4f95f1f240238c6a431b39ea8e7c6f47}{gdncfileopen}(iter%fileid, filename=file, writable=.false., err=err)
25   \textcolor{keywordflow}{if} (err) iter%fileid = -1
26   iter%varid = 0
27   iter%dimid = 0
28   \textcolor{keyword}{call }endsub(subname, \textcolor{stringliteral}{'file=%d'}, i=(/iter%fileid/))
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{gdncvarsearch_8f90_a8ecf8b897d9b97d7721db7674331ee3e_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{gdncvarsearch_8f90_a5082b95b06c1c69e314fdaeffd7207c6}\label{gdncvarsearch_8f90_a5082b95b06c1c69e314fdaeffd7207c6}} 
\index{gdncvarsearch.\+f90@{gdncvarsearch.\+f90}!gdncvarsearchnext@{gdncvarsearchnext}}
\index{gdncvarsearchnext@{gdncvarsearchnext}!gdncvarsearch.\+f90@{gdncvarsearch.\+f90}}
\subsubsection{\texorpdfstring{gdncvarsearchnext()}{gdncvarsearchnext()}}
{\footnotesize\ttfamily subroutine gdncvarsearchnext (\begin{DoxyParamCaption}\item[{type(gd\+\_\+nc\+\_\+variable\+\_\+search), intent(inout)}]{iter,  }\item[{character(len = $\ast$), intent(out)}]{url,  }\item[{logical, intent(out)}]{end }\end{DoxyParamCaption})}



Definition at line 32 of file gdncvarsearch.\+f90.



References gdncfileclose(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
32   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__types}{gtdata\_netcdf\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__search}{gd\_nc\_variable\_search}
33   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
34   \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_max\_name, nf90\_noerr, &
35     & nf90\_inquire\_variable, nf90\_inquire\_dimension, nf90\_inq\_varid
36   \textcolor{keywordtype}{use }\hyperlink{namespacedc__url}{dc\_url}\textcolor{keywordtype}{, only}: urlmerge
37   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__file__generic}{gtdata\_netcdf\_file\_generic}\textcolor{keywordtype}{, only}: gdncfileinquire, 
      \hyperlink{gdncfileclose_8f90_a66baca675a6538aeb500f29c3e36f905}{gdncfileclose}
38   \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
39   \textcolor{keywordtype}{implicit none}
40   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__types_1_1gd__nc__variable__search}{gd\_nc\_variable\_search}), \textcolor{keywordtype}{intent(inout)}:: iter
41   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(out)}:: url
42   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}:: end
43   \textcolor{keywordtype}{character(len = string)}:: filename
44   \textcolor{keywordtype}{character(len = NF90\_MAX\_NAME)}:: varname
45   \textcolor{keywordtype}{integer}:: stat, varid\_tmp
46   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'GDNcVarSearchNext'}
47 \textcolor{keywordflow}{continue}
48   \textcolor{keyword}{call }beginsub(subname)
49   \textcolor{keywordflow}{if} (iter%fileid <= 0) \textcolor{keywordflow}{then}
50 \textcolor{keyword}{    end }= .TRUE.
51     url = \textcolor{stringliteral}{''}
52     \textcolor{keyword}{call }endsub(subname, \textcolor{stringliteral}{"bad file %d"}, i=(/iter%fileid/))
53     \textcolor{keywordflow}{return}
54 \textcolor{keywordflow}{  endif}
55   \textcolor{keywordflow}{if} (iter%varid >= 0) \textcolor{keywordflow}{then}
56     iter%varid = iter%varid + 1
57     stat = nf90\_inquire\_variable(iter%fileid, iter%varid, name = varname)
58     \textcolor{keywordflow}{if} (stat == nf90\_noerr) \textcolor{keywordflow}{goto} 900
59     iter%varid = -1
60 \textcolor{keywordflow}{  endif}
61   \textcolor{keywordflow}{do} \textcolor{keywordflow}{while} (iter%dimid >= 0)
62     iter%dimid = iter%dimid + 1
63     \textcolor{comment}{! --- 指定番号の次元がなければエラー ---}
64     stat = nf90\_inquire\_dimension(iter%fileid, iter%dimid, name = varname)
65     \textcolor{keywordflow}{if} (stat /= nf90\_noerr) \textcolor{keywordflow}{exit}
66     \textcolor{comment}{! --- 指定番号の次元と同名の変数があれば却下、次番号へ ---}
67     stat = nf90\_inq\_varid(iter%fileid, varname, varid\_tmp)
68     \textcolor{keywordflow}{if} (stat /= nf90\_noerr) \textcolor{keywordflow}{goto} 900
69 \textcolor{keywordflow}{  enddo}
70 \textcolor{keyword}{  end }= .TRUE.
71   url = \textcolor{stringliteral}{""}
72   \textcolor{keyword}{call }\hyperlink{gdncfileclose_8f90_a66baca675a6538aeb500f29c3e36f905}{gdncfileclose}(iter%fileid)
73   iter%dimid = -1
74   \textcolor{keyword}{call }endsub(subname, \textcolor{stringliteral}{"end file %d"}, i=(/iter%fileid/))
75   \textcolor{keywordflow}{return}
76 
77 900 \textcolor{keywordflow}{continue}
78   \textcolor{keyword}{call }gdncfileinquire(iter%fileid, name=filename)
79   url = urlmerge(file=trim(filename), var=trim(varname))
80 \textcolor{keyword}{  end }= .FALSE.
81   \textcolor{keyword}{call }endsub(subname, \textcolor{stringliteral}{"file=%d url=<%c>"}, &
82     & i=(/iter%fileid/), c1=trim(url))
83   \textcolor{keywordflow}{return}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{gdncvarsearch_8f90_a5082b95b06c1c69e314fdaeffd7207c6_cgraph}
\end{center}
\end{figure}
