\hypertarget{gdmemvarattrget_8f90}{}\section{gtdata/gtdata\+\_\+memory/gdmemvarattrget.f90 File Reference}
\label{gdmemvarattrget_8f90}\index{gtdata/gtdata\+\_\+memory/gdmemvarattrget.\+f90@{gtdata/gtdata\+\_\+memory/gdmemvarattrget.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{gdmemvarattrget_8f90_a989a758f091a2cc3dc82ea0e62117df8}{gdmemvarattrget} (var, name, value, err)
\end{DoxyCompactItemize}


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



Definition at line 2 of file gdmemvarattrget.\+f90.



References dc\+\_\+error\+::storeerror().


\begin{DoxyCode}
2   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__memory__types}{gtdata\_memory\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtdata__memory__types_1_1gd__mem__variable}{gd\_mem\_variable}, 
      \hyperlink{structgtdata__memory__types_1_1gd__mem__variable__entry}{gd\_mem\_variable\_entry}, \hyperlink{structgtdata__memory__types_1_1gd__mem__attr__chain}{gd\_mem\_attr\_chain}
3   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__memory__internal}{gtdata\_memory\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__memory__internal_1_1memtab__lookup}{memtab\_lookup}
4   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}
5   \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_enotatt, nf90\_noerr
6   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__memory__types_1_1gd__mem__variable}{gd\_mem\_variable}), \textcolor{keywordtype}{intent(in)}:: var
7   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: name
8   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(out)}:: value
9   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
10   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__memory__types_1_1gd__mem__variable__entry}{gd\_mem\_variable\_entry}), \textcolor{keywordtype}{pointer}:: ent
11   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__memory__types_1_1gd__mem__attr__chain}{gd\_mem\_attr\_chain}), \textcolor{keywordtype}{pointer}:: p
12   \textcolor{keywordtype}{integer}:: i, stat
13   stat = \hyperlink{interfacegtdata__memory__internal_1_1memtab__lookup}{memtab\_lookup}(var, ent)
14   \textcolor{keywordflow}{if} (stat == nf90\_noerr) \textcolor{keywordflow}{then}
15     \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(ent%current)) \textcolor{keywordflow}{then}
16       p => ent%current
17       \textcolor{keywordflow}{if} (p%name == name) \textcolor{keywordflow}{goto} 100
18 \textcolor{keywordflow}{    endif}
19     p => ent%attr
20     \textcolor{keywordflow}{do}
21       \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(p)) \textcolor{keywordflow}{exit}
22       \textcolor{keywordflow}{if} (p%name == name) \textcolor{keywordflow}{goto} 100
23       p => p%next
24 \textcolor{keywordflow}{    enddo}
25     stat = nf90\_enotatt
26 \textcolor{keywordflow}{  endif}
27   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, \textcolor{stringliteral}{"GDMemVarAttrGet"}, err, cause\_c=name)
28   \textcolor{keywordflow}{return}
29 
30 100 \textcolor{keywordflow}{continue}
31   \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(p%cbuf)) \textcolor{keywordflow}{then}
32     \textcolor{keywordflow}{do}, i = 1, len(\textcolor{keywordtype}{value})
33       value(i:i) = p%cbuf(i)
34 \textcolor{keywordflow}{    enddo}
35   \textcolor{keywordflow}{else}
36     \textcolor{keywordtype}{value} = \textcolor{stringliteral}{""}
37 \textcolor{keywordflow}{  endif}
38 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{gdmemvarattrget_8f90_a989a758f091a2cc3dc82ea0e62117df8_cgraph}
\end{center}
\end{figure}
