<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\hypertarget{gtvaradddim_8f90}{}\section{gtdata/gtvaradddim.f90 File Reference}
\label{gtvaradddim_8f90}\index{gtdata/gtvaradddim.\+f90@{gtdata/gtvaradddim.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{gtvaradddim_8f90_ab4cf8b294912ceca560487a119aa11bf}{gtvaradddim} (var, dimord, dimvar, err)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{gtvaradddim_8f90_ab4cf8b294912ceca560487a119aa11bf}\label{gtvaradddim_8f90_ab4cf8b294912ceca560487a119aa11bf}} 
\index{gtvaradddim.\+f90@{gtvaradddim.\+f90}!gtvaradddim@{gtvaradddim}}
\index{gtvaradddim@{gtvaradddim}!gtvaradddim.\+f90@{gtvaradddim.\+f90}}
\subsubsection{\texorpdfstring{gtvaradddim()}{gtvaradddim()}}
{\footnotesize\ttfamily subroutine gtvaradddim (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, intent(in)}]{dimord,  }\item[{type(gt\+\_\+variable), intent(in)}]{dimvar,  }\item[{logical, intent(out)}]{err }\end{DoxyParamCaption})}



Definition at line 14 of file gtvaradddim.\+f90.



References gtdata\+\_\+internal\+\_\+map\+::map\+\_\+lookup(), gtdata\+\_\+internal\+\_\+map\+::map\+\_\+resize(), gtdata\+\_\+internal\+\_\+map\+::map\+\_\+set(), and gtdata\+\_\+internal\+\_\+map\+::map\+\_\+set\+\_\+ndims().


\begin{DoxyCode}
14   \textcolor{comment}{!}
15   \textcolor{comment}{!== 谺｡蜈��霑ｽ蜉�}
16   \textcolor{comment}{!}
17   \textcolor{comment}{! 螟画焚 *var* 縺ｮ *dimord* 逡ｪ逶ｮ縺ｮ菴咲ｽｮ縺ｫ谺｡蜈� *dimvar*}
18   \textcolor{comment}{! 繧定ｿｽ蜉�縺励∪縺吶�*dimord* 逡ｪ逶ｮ莉･髯阪�谺｡蜈�� 1 縺､蠕後ｍ縺ｫ縺壹ｌ縺ｾ縺吶�}
19   \textcolor{comment}{! 繧ゅ＠ *dimord* 縺� *var* 縺ｮ譛牙柑谺｡蜈�焚繧医ｊ繧ょ､ｧ縺阪＞蝣ｴ蜷医±
20   \textcolor{comment}{! (譛牙柑谺｡蜈�焚 + 1) 縺御ｸ弱∴繧峨ｌ縺溘ｂ縺ｮ縺ｨ隕九↑縺輔ｌ縺ｾ縺吶�}
21   \textcolor{comment}{!}
22   \textcolor{comment}{! 繧ｨ繝ｩ繝ｼ縺檎函縺倥◆蝣ｴ蜷医√Γ繝�そ繝ｼ繧ｸ繧貞�蜉孺
23   \textcolor{comment}{! 縺励※繝励Ο繧ｰ繝ｩ繝�縺ｯ蠑ｷ蛻ｶ邨ゆｺ�＠縺ｾ縺吶�*err* 繧剃ｸ弱∴縺ｦ縺ゅｋ蝣ｴ蜷医↓縺ｯ}
24   \textcolor{comment}{! 縺ｮ蠑墓焚縺ｫ .true. 縺瑚ｿ斐ｊ縲√�繝ｭ繧ｰ繝ｩ繝�縺ｯ邨ゆｺ�＠縺ｾ縺帙ｓ縲�}
25   \textcolor{comment}{!}
26   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
27   \textcolor{keywordtype}{use }gtdata\_generic\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}
28   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__map}{gtdata\_internal\_map}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\_lookup}, 
      \hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}, \hyperlink{namespacegtdata__internal__map_a12dffe35d93120bca94db15c47818ae1}{map\_set\_ndims}, \hyperlink{namespacegtdata__internal__map_a2e6a789c1c8f4850421da11f10081cb7}{map\_set}, \hyperlink{namespacegtdata__internal__map_ae904583b5f08e47440b3d0dc46996b22}{map\_resize}
29   \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
30   \textcolor{keywordtype}{implicit none}
31   \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
32   \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: dimvar
33   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: dimord
34   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}:: err
35   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: map(:)
36   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}):: tmpmap
37   \textcolor{keywordtype}{integer}:: id, nd, ndimsp, stat, vid
38   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'GTVarAddDim'}
39 \textcolor{keywordflow}{continue}
40   err = .true.
41   \textcolor{keyword}{call }beginsub(subname)
42 
43   \textcolor{keywordflow}{if} (dimord &lt; 1) \textcolor{keywordflow}{then}
44     \textcolor{keyword}{call }endsub(subname, \textcolor{stringliteral}{"negative dimord=%d invalid"}, i=(/dimord/))
45     \textcolor{keywordflow}{return}
46 \textcolor{keywordflow}{  endif}
47 
48   \textcolor{comment}{! dimvar 繧偵メ繧ｧ繝�け縺励�繝��險ｭ螳壹ｒ tmpmap 縺ｫ菫晏ｭ�}
49   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\_lookup}(dimvar, vid=vid, ndims=nd)
50   \textcolor{keywordflow}{if} (vid &lt; 0) \textcolor{keywordflow}{then}
51     \textcolor{keyword}{call }endsub(subname, \textcolor{stringliteral}{"dimvar invalid"})
52     \textcolor{keywordflow}{return}
53 \textcolor{keywordflow}{  endif}
54   \textcolor{keywordflow}{if} (nd &lt;= 0) \textcolor{keywordflow}{then}
55     \textcolor{keyword}{call }endsub(subname, \textcolor{stringliteral}{"dimvar nondimensional"})
56     \textcolor{keywordflow}{return}
57   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (nd &gt; 1) \textcolor{keywordflow}{then}
58     \textcolor{keyword}{call }endsub(subname, \textcolor{stringliteral}{"dimvar multidimensional"})
59     \textcolor{keywordflow}{return}
60 \textcolor{keywordflow}{  endif}
61   \textcolor{keyword}{allocate}(map(nd))
62   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\_lookup}(dimvar, map=map)
63   tmpmap = map(1)
64   \textcolor{keyword}{deallocate}(map)
65 
66   \textcolor{comment}{! dimord 逡ｪ逶ｮ (縺溘□縺� ndimsp + 1 繧定ｶ翫∴縺ｪ縺�) 縺ｫ謖ｿ蜈･縺吶ｋ髫咎俣繧偵≠縺代ｋ}
67   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\_lookup}(var, ndims=ndimsp)
68   \textcolor{keywordflow}{if} (dimord &gt; ndimsp + 1) \textcolor{keywordflow}{then}
69     id = ndimsp + 1
70   \textcolor{keywordflow}{else}
71     id = dimord
72 \textcolor{keywordflow}{  endif}
73   \textcolor{keyword}{allocate}(map(nd + 1))
74   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_ae904583b5f08e47440b3d0dc46996b22}{map\_resize}(var, nd + 1)
75   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\_lookup}(var, map=map)
76   map(id+1: nd+1) = map(id: nd)
77 
78   \textcolor{comment}{! 譁ｰ縺励＞谺｡蜈�∈縺ｮ蜿ら�繧呈諺蜈･}
79   map(id)%dimno = -1
80   \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(dimvar, url=map(id)%url)
81   map(id)%allcount = tmpmap%allcount
82   map(id)%offset = tmpmap%offset
83   map(id)%step = tmpmap%step
84   map(id)%start = tmpmap%start
85   map(id)%count = tmpmap%count
86   map(id)%stride = tmpmap%stride
87 
88   \textcolor{comment}{! 逋ｻ骭ｲ}
89   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_a2e6a789c1c8f4850421da11f10081cb7}{map\_set}(var, map=map, stat=stat)
90   \textcolor{keywordflow}{if} (stat /= 0) \textcolor{keywordflow}{goto} 999
91   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_a12dffe35d93120bca94db15c47818ae1}{map\_set\_ndims}(var, ndims=ndimsp + 1, stat=stat)
92 
93 999 \textcolor{keywordflow}{continue}
94   err = (stat /= 0)
95   \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]{gtvaradddim_8f90_ab4cf8b294912ceca560487a119aa11bf_cgraph}
\end{center}
\end{figure}
</pre></body></html>