\hypertarget{namespacegtdata__internal__map}{}\section{gtdata\+\_\+internal\+\_\+map Module Reference}
\label{namespacegtdata__internal__map}\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
interface \hyperlink{interfacegtdata__internal__map_1_1dimrange}{dimrange}
\item 
type \hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\+\_\+dimmap}
\item 
type \hyperlink{structgtdata__internal__map_1_1map__table__entry}{map\+\_\+table\+\_\+entry}
\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{namespacegtdata__internal__map_aa967db174c30a859cad6bda4675f3594}{dimrange\+\_\+by\+\_\+dimno} (var, dimno, dimlo, dimhi)
\item 
subroutine \hyperlink{namespacegtdata__internal__map_abd624f8e775fa18a68b90ed01ec6e0f3}{map\+\_\+dup} (var, source\+\_\+var)
\item 
subroutine, public \hyperlink{namespacegtdata__internal__map_ab8c5494c00d4dd85417e891b762f77d9}{map\+\_\+create} (var, class, cid, ndims, allcount, stat)
\item 
subroutine, public \hyperlink{namespacegtdata__internal__map_aa0f727646e588a97e73dac30fb02ef25}{maptabadd} (mapid, vid)
\item 
subroutine, public \hyperlink{namespacegtdata__internal__map_a4d64e68c2ccbf5729f07a64822f90726}{maptabdelete} (var, err)
\item 
subroutine, public \hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\+\_\+lookup} (var, vid, map, ndims)
\item 
subroutine \hyperlink{namespacegtdata__internal__map_a2e6a789c1c8f4850421da11f10081cb7}{map\+\_\+set} (var, map, stat)
\item 
subroutine, public \hyperlink{namespacegtdata__internal__map_a86b920031832bea17e70a6bf4623c3d9}{var\+\_\+class} (var, class, cid)
\item 
subroutine \hyperlink{namespacegtdata__internal__map_a12dffe35d93120bca94db15c47818ae1}{map\+\_\+set\+\_\+ndims} (var, ndims, stat)
\item 
subroutine \hyperlink{namespacegtdata__internal__map_ade13b31dac124116c651f89ee2a693ef}{map\+\_\+set\+\_\+rank} (var, rank, stat)
\item 
subroutine, public \hyperlink{namespacegtdata__internal__map_a392037efec5853031c3f9fac8f52c507}{map\+\_\+to\+\_\+internal\+\_\+specs} (var, specs, ndims)
\item 
subroutine \hyperlink{namespacegtdata__internal__map_a53ed1ebec2d5efdf436782f9956fb13d}{map\+\_\+allocate} (map, ndims)
\item 
subroutine \hyperlink{namespacegtdata__internal__map_a0ae3e37d788b82682e1c22b0dfe09214}{map\+\_\+apply} (var, map)
\item 
subroutine \hyperlink{namespacegtdata__internal__map_ae904583b5f08e47440b3d0dc46996b22}{map\+\_\+resize} (var, ndims)
\item 
subroutine \hyperlink{namespacegtdata__internal__map_acbda65a71acbd7d3ba6175c6f4fceff0}{gtvar\+\_\+dump} (var)
\item 
integer function \hyperlink{namespacegtdata__internal__map_a44f4fb36cd72433854ba6bdc6634500f}{dimord\+\_\+skip\+\_\+compact} (dimord, map)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacegtdata__internal__map_a44f4fb36cd72433854ba6bdc6634500f}\label{namespacegtdata__internal__map_a44f4fb36cd72433854ba6bdc6634500f}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!dimord\+\_\+skip\+\_\+compact@{dimord\+\_\+skip\+\_\+compact}}
\index{dimord\+\_\+skip\+\_\+compact@{dimord\+\_\+skip\+\_\+compact}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{dimord\+\_\+skip\+\_\+compact()}{dimord\_skip\_compact()}}
{\footnotesize\ttfamily integer function gtdata\+\_\+internal\+\_\+map\+::dimord\+\_\+skip\+\_\+compact (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{dimord,  }\item[{type(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\+\_\+dimmap}), dimension(\+:), intent(in)}]{map }\end{DoxyParamCaption})}



Definition at line 519 of file gtdata\+\_\+internal\+\_\+map.\+f90.


\begin{DoxyCode}
519     \textcolor{comment}{! 次元表の中で非縮退次元だけを数えた次元番号 dimord の次元を}
520     \textcolor{comment}{! 特定し、外部向けの次元番号を返す。}
521     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: dbgmessage
522     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: dimord
523     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{intent(in)}:: map(:)
524     \textcolor{keywordtype}{integer}:: nd, id
525     result = -1
526     nd = 0
527     \textcolor{keywordflow}{do}, id = 1, \textcolor{keyword}{size}(map)
528       \textcolor{keywordflow}{if} (map(id)%count < 2) cycle
529       nd = nd + 1
530       \textcolor{keywordflow}{if} (nd < dimord) cycle
531       result = id
532       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'compact dim skip: %d <= %d'}, i=(/result, dimord/))
533       \textcolor{keywordflow}{exit}
534 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacegtdata__internal__map_aa967db174c30a859cad6bda4675f3594}\label{namespacegtdata__internal__map_aa967db174c30a859cad6bda4675f3594}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!dimrange\+\_\+by\+\_\+dimno@{dimrange\+\_\+by\+\_\+dimno}}
\index{dimrange\+\_\+by\+\_\+dimno@{dimrange\+\_\+by\+\_\+dimno}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{dimrange\+\_\+by\+\_\+dimno()}{dimrange\_by\_dimno()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::dimrange\+\_\+by\+\_\+dimno (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, intent(in)}]{dimno,  }\item[{integer, intent(out)}]{dimlo,  }\item[{integer, intent(out)}]{dimhi }\end{DoxyParamCaption})}



Definition at line 83 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References map\+\_\+lookup().


\begin{DoxyCode}
83     \textcolor{comment}{! 変数と次元番号を指定して、当該次元の内部的添字番号範囲を得る}
84     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
85     \textcolor{keywordtype}{use }gtdata\_generic\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__netcdf__generic_1_1open}{open}, \hyperlink{interfacegtdata__netcdf__generic_1_1close}{close}
86     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__vartable}{gtdata\_internal\_vartable}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__internal__map_1_1dimrange}{dimrange}
87     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
88     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: dimno
89     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: dimlo, dimhi
90     \textcolor{keywordtype}{type}(gt\_variable):: dimvar
91     \textcolor{keywordtype}{integer}:: vid
92     \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1open}{open}(dimvar, var, dimno, count\_compact=.true.)
93     \textcolor{keyword}{call }map\_lookup(dimvar, vid=vid)
94     \textcolor{keyword}{call }\hyperlink{interfacegtdata__internal__map_1_1dimrange}{dimrange}(vid, dimlo, dimhi)
95     \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1close}{close}(dimvar)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=330pt]{namespacegtdata__internal__map_aa967db174c30a859cad6bda4675f3594_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_acbda65a71acbd7d3ba6175c6f4fceff0}\label{namespacegtdata__internal__map_acbda65a71acbd7d3ba6175c6f4fceff0}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!gtvar\+\_\+dump@{gtvar\+\_\+dump}}
\index{gtvar\+\_\+dump@{gtvar\+\_\+dump}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{gtvar\+\_\+dump()}{gtvar\_dump()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::gtvar\+\_\+dump (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var }\end{DoxyParamCaption})}



Definition at line 481 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References gtdata\+\_\+internal\+\_\+vartable\+::vartable\+\_\+dump().


\begin{DoxyCode}
481     \textcolor{comment}{! 変数のプロパティを出力}
482     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
483     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__vartable}{gtdata\_internal\_vartable}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__internal__vartable_ab247c7c0f247a93928a561ec13d9df43}{vartable\_dump}
484     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: debug, dbgmessage
485     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
486     \textcolor{keywordtype}{integer}:: idim, imap
487     \textcolor{keywordtype}{logical}:: dbg\_mode
488   \textcolor{keywordflow}{continue}
489     \textcolor{keyword}{call }debug( dbg\_mode )
490     \textcolor{keywordflow}{if} (.not. dbg\_mode) \textcolor{keywordflow}{return}
491     imap = var%mapid
492     \textcolor{keywordflow}{if} (imap < 1 .or. imap > \textcolor{keyword}{size}(maptab)) \textcolor{keywordflow}{then}
493       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'[gt\_variable %d: invalid id]'}, i=(/imap/))
494       \textcolor{keywordflow}{return}
495 \textcolor{keywordflow}{    endif}
496     \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(maptab(imap)%map)) \textcolor{keywordflow}{then}
497       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'[gt\_variable %d: ndims=%d, map.size=%d]'}, &
498         & i=(/imap, maptab(imap)%ndims, \textcolor{keyword}{size}(maptab(imap)%map)/))
499       \textcolor{keywordflow}{do}, idim = 1, \textcolor{keyword}{size}(maptab(imap)%map)
500         \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'[dim%d dimno=%d ofs=%d step=%d'} &
501           &// \textcolor{stringliteral}{' all=%d start=%d count=%d stride=%d url=%c]'}, &
502           & c1=trim(maptab(imap)%map(idim)%url), &
503           & i=(/idim, maptab(imap)%map(idim)%dimno, &
504           & maptab(imap)%map(idim)%offset, &
505           & maptab(imap)%map(idim)%step, &
506           & maptab(imap)%map(idim)%allcount, &
507           & maptab(imap)%map(idim)%start, &
508           & maptab(imap)%map(idim)%count, &
509           & maptab(imap)%map(idim)%stride/))
510 \textcolor{keywordflow}{      enddo}
511     \textcolor{keywordflow}{else}
512       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'[gt\_variable %d: ndims=%d, map=null]'}, &
513         & i=(/imap, maptab(imap)%ndims/))
514 \textcolor{keywordflow}{    endif}
515     \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__vartable_ab247c7c0f247a93928a561ec13d9df43}{vartable\_dump}(maptab(imap)%vid)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=340pt]{namespacegtdata__internal__map_acbda65a71acbd7d3ba6175c6f4fceff0_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_a53ed1ebec2d5efdf436782f9956fb13d}\label{namespacegtdata__internal__map_a53ed1ebec2d5efdf436782f9956fb13d}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+allocate@{map\+\_\+allocate}}
\index{map\+\_\+allocate@{map\+\_\+allocate}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+allocate()}{map\_allocate()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::map\+\_\+allocate (\begin{DoxyParamCaption}\item[{type(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\+\_\+dimmap}), dimension(\+:), pointer}]{map,  }\item[{integer, intent(in)}]{ndims }\end{DoxyParamCaption})}



Definition at line 403 of file gtdata\+\_\+internal\+\_\+map.\+f90.


\begin{DoxyCode}
403     \textcolor{comment}{! 次元表エントリに ndims 個のエントリを割り付け初期化する。}
404     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: map(:)
405     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ndims
406     \textcolor{keywordflow}{if} (ndims <= 0) \textcolor{keywordflow}{then}
407       \textcolor{keyword}{nullify}(map)
408       \textcolor{keywordflow}{return}
409 \textcolor{keywordflow}{    endif}
410     \textcolor{keyword}{allocate}(map(1:ndims))
411     map(1:ndims)%dimno = -1
412     map(1:ndims)%url = \textcolor{stringliteral}{' '}
413     map(1:ndims)%allcount = 0
414     map(1:ndims)%offset = 0
415     map(1:ndims)%step = 1
416     map(1:ndims)%start = 1
417     map(1:ndims)%count = 0
418     map(1:ndims)%stride = 1
419     map(1:ndims)%scalar = .false.
\end{DoxyCode}
\mbox{\Hypertarget{namespacegtdata__internal__map_a0ae3e37d788b82682e1c22b0dfe09214}\label{namespacegtdata__internal__map_a0ae3e37d788b82682e1c22b0dfe09214}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+apply@{map\+\_\+apply}}
\index{map\+\_\+apply@{map\+\_\+apply}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+apply()}{map\_apply()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::map\+\_\+apply (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(inout)}]{var,  }\item[{type(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\+\_\+dimmap}), dimension(\+:), pointer}]{map }\end{DoxyParamCaption})}



Definition at line 423 of file gtdata\+\_\+internal\+\_\+map.\+f90.


\begin{DoxyCode}
423     \textcolor{comment}{! 変数 var にマップ表 map を組み合わせる}
424     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
425     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(inout)}:: var
426     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: map(:)
427     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: tmpmap(:), varmap
428     \textcolor{keywordtype}{integer}:: i, nd
429     nd = \textcolor{keyword}{size}(map)
430     \textcolor{keyword}{allocate}(tmpmap(nd))
431     \textcolor{keywordflow}{do}, i = 1, nd
432       tmpmap(i)%allcount = map(i)%allcount
433       tmpmap(i)%count = map(i)%count
434       \textcolor{keywordflow}{if} (map(i)%dimno > 0) \textcolor{keywordflow}{then}
435         varmap => maptab(var%mapid)%map(map(i)%dimno)
436         tmpmap(i)%url = varmap%url
437         tmpmap(i)%dimno = varmap%dimno
438         tmpmap(i)%offset = varmap%offset + map(i)%offset
439         tmpmap(i)%step = varmap%step * map(i)%step
440       \textcolor{keywordflow}{else}
441         tmpmap(i)%url = map(i)%url
442         tmpmap(i)%dimno = 0
443         tmpmap(i)%offset = map(i)%offset
444         tmpmap(i)%step = map(i)%step
445 \textcolor{keywordflow}{      endif}
446 \textcolor{keywordflow}{    enddo}
447     \textcolor{keyword}{deallocate}(map)
448     map => tmpmap
\end{DoxyCode}
\mbox{\Hypertarget{namespacegtdata__internal__map_ab8c5494c00d4dd85417e891b762f77d9}\label{namespacegtdata__internal__map_ab8c5494c00d4dd85417e891b762f77d9}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+create@{map\+\_\+create}}
\index{map\+\_\+create@{map\+\_\+create}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+create()}{map\_create()}}
{\footnotesize\ttfamily subroutine, public gtdata\+\_\+internal\+\_\+map\+::map\+\_\+create (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(out)}]{var,  }\item[{integer, intent(in)}]{class,  }\item[{integer, intent(in)}]{cid,  }\item[{integer, intent(in)}]{ndims,  }\item[{integer, dimension(\+:), intent(in)}]{allcount,  }\item[{integer, intent(out)}]{stat }\end{DoxyParamCaption})}



Definition at line 133 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+error\+::gt\+\_\+enomoredims, map\+\_\+allocate(), maptabadd(), and gtdata\+\_\+internal\+\_\+vartable\+::vartableadd().


\begin{DoxyCode}
133     \textcolor{comment}{! 変数 var を作成する。内部種別 class, 内部識別子 cid,}
134     \textcolor{comment}{! 外見的次元数 ndims, 外見的次元長 allcount(:) を与える。}
135     \textcolor{comment}{! オフセットゼロを仮定して諸元の初期化が行われる。}
136     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
137     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__vartable}{gtdata\_internal\_vartable}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__internal__vartable_a82fab475ec7a1438a92e5d27c13684d1}{vartableadd}
138     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: nf90\_enotvar, \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
139     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(out)}:: var
140     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: \textcolor{keywordtype}{class}, cid, ndims, allcount(:)
141     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: stat
142     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: map(:)
143     \textcolor{keywordtype}{integer}:: vid, i
144   \textcolor{keywordflow}{continue}
145 
146     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
147     \textcolor{keywordflow}{if} ( ndims < 0 ) \textcolor{keywordflow}{then}
148       stat = \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}
149       \textcolor{keywordflow}{goto} 999
150 \textcolor{keywordflow}{    end if}
151     \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__vartable_a82fab475ec7a1438a92e5d27c13684d1}{vartableadd}(vid, \textcolor{keywordtype}{class}, cid)
152     \textcolor{keyword}{call }maptabadd(var%mapid, vid)
153     \textcolor{keywordflow}{if} (ndims > 0) \textcolor{keywordflow}{then}
154       \textcolor{keyword}{call }map\_allocate(map, ndims)
155       maptab(var%mapid)%ndims = ndims
156       maptab(var%mapid)%map => map
157 
158       \textcolor{keywordflow}{do}, i = 1, ndims
159         map(i)%dimno = i
160         map(i)%allcount = allcount(i)
161         map(i)%count = allcount(i)
162         map(i)%offset = 0
163         map(i)%start = 1
164         map(i)%step = 1
165         map(i)%stride = 1
166         map(i)%scalar = .false.
167 \textcolor{keywordflow}{      enddo}
168     \textcolor{keywordflow}{else}
169       \textcolor{comment}{! スカラー変数 (ndims = 0) の場合}
170       \textcolor{keyword}{call }map\_allocate(map, 1)
171       maptab(var%mapid)%ndims = 0
172       maptab(var%mapid)%map => map
173       map(1)%dimno = 1
174       map(1)%allcount = 1
175       map(1)%count = 1
176       map(1)%offset = 0
177       map(1)%start = 1
178       map(1)%step = 1
179       map(1)%stride = 1
180       map(1)%scalar = .true.
181 \textcolor{keywordflow}{    end if}
182 
183 999 \textcolor{keywordflow}{continue}
184     \textcolor{keywordflow}{return}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=340pt]{namespacegtdata__internal__map_ab8c5494c00d4dd85417e891b762f77d9_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_abd624f8e775fa18a68b90ed01ec6e0f3}\label{namespacegtdata__internal__map_abd624f8e775fa18a68b90ed01ec6e0f3}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+dup@{map\+\_\+dup}}
\index{map\+\_\+dup@{map\+\_\+dup}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+dup()}{map\_dup()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::map\+\_\+dup (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(out)}]{var,  }\item[{type(gt\+\_\+variable), intent(in)}]{source\+\_\+var }\end{DoxyParamCaption})}



Definition at line 99 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References map\+\_\+lookup(), maptabadd(), gtdata\+\_\+internal\+\_\+vartable\+::vartableadd(), and gtdata\+\_\+internal\+\_\+vartable\+::vartablelookup().


\begin{DoxyCode}
99     \textcolor{comment}{! 変数 source\_var の複写 var を作成する}
100     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
101     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__vartable}{gtdata\_internal\_vartable}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__internal__vartable_a82fab475ec7a1438a92e5d27c13684d1}{vartableadd}, 
      \hyperlink{namespacegtdata__internal__vartable_a1bddf47a2cacc8db25b6fa2c32ed68db}{vartablelookup}
102     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: dbgmessage
103     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(out)}:: var
104     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: source\_var
105     \textcolor{keywordtype}{integer}:: vid, mid1, mid2, vid2, nd, \textcolor{keywordtype}{class}, cid
106     \textcolor{keyword}{call }map\_lookup(source\_var, vid=vid)
107     \textcolor{keywordflow}{if} (vid < 0) \textcolor{keywordflow}{then}
108       var = gt\_variable(-1)
109       \textcolor{keywordflow}{return}
110 \textcolor{keywordflow}{    endif}
111     \textcolor{keywordflow}{if} (vid == 0) \textcolor{keywordflow}{then}
112       vid2 = 0
113     \textcolor{keywordflow}{else}
114       \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__vartable_a1bddf47a2cacc8db25b6fa2c32ed68db}{vartablelookup}(vid, class=\textcolor{keywordtype}{class}, cid=cid)
115       \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__vartable_a82fab475ec7a1438a92e5d27c13684d1}{vartableadd}(vid2, \textcolor{keywordtype}{class}, cid)
116 \textcolor{keywordflow}{    endif}
117     \textcolor{keyword}{call }maptabadd(var%mapid, vid2)
118     mid1 = source\_var%mapid
119     mid2 = var%mapid
120     maptab(mid2)%ndims = maptab(mid1)%ndims
121     \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(maptab(mid1)%map)) \textcolor{keywordflow}{then}
122       nd = \textcolor{keyword}{size}(maptab(mid1)%map)
123       \textcolor{keyword}{allocate}(maptab(mid2)%map(nd))
124       maptab(mid2)%map(1:nd) = maptab(mid1)%map(1:nd)
125     \textcolor{keywordflow}{else}
126       \textcolor{keyword}{nullify}(maptab(mid2)%map)
127 \textcolor{keywordflow}{    endif}
128     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'map\_dup mapid(%d from %d) vid(%d from %d)'}, &
129       & i=(/mid2, mid1, maptab(mid2)%vid, maptab(mid1)%vid/))
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=340pt]{namespacegtdata__internal__map_abd624f8e775fa18a68b90ed01ec6e0f3_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}\label{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+lookup@{map\+\_\+lookup}}
\index{map\+\_\+lookup@{map\+\_\+lookup}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+lookup()}{map\_lookup()}}
{\footnotesize\ttfamily subroutine, public gtdata\+\_\+internal\+\_\+map\+::map\+\_\+lookup (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, intent(out), optional}]{vid,  }\item[{type(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\+\_\+dimmap}), dimension(\+:), intent(out), optional}]{map,  }\item[{integer, intent(out), optional}]{ndims }\end{DoxyParamCaption})}



Definition at line 251 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References gtdata\+\_\+internal\+\_\+vartable\+::vid\+\_\+invalid.


\begin{DoxyCode}
251     \textcolor{comment}{! 同じファイル番号の変数表の中身を返す}
252     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
253     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
254     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: vid
255     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: map(:)
256     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: ndims
257     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{allocated}(maptab)) \textcolor{keywordflow}{goto} 999
258     \textcolor{keywordflow}{if} (var%mapid <= 0 .or. var%mapid > \textcolor{keyword}{size}(maptab)) \textcolor{keywordflow}{goto} 999
259     \textcolor{keywordflow}{if} (maptab(var%mapid)%vid == vid\_invalid) \textcolor{keywordflow}{goto} 999
260     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(vid)) vid = maptab(var%mapid)%vid
261     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(map)) map(:) = maptab(var%mapid)%map(1:\textcolor{keyword}{size}(map))
262     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ndims)) ndims = maptab(var%mapid)%ndims
263     \textcolor{keywordflow}{return}
264 999 \textcolor{keywordflow}{continue}
265     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(vid)) vid = vid\_invalid
266     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(map)) \textcolor{keywordflow}{then}
267       map(:)%dimno = -1
268       map(:)%url = \textcolor{stringliteral}{" "}
269 \textcolor{keywordflow}{    endif}
270     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ndims)) ndims = 0
\end{DoxyCode}
\mbox{\Hypertarget{namespacegtdata__internal__map_ae904583b5f08e47440b3d0dc46996b22}\label{namespacegtdata__internal__map_ae904583b5f08e47440b3d0dc46996b22}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+resize@{map\+\_\+resize}}
\index{map\+\_\+resize@{map\+\_\+resize}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+resize()}{map\_resize()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::map\+\_\+resize (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, intent(in)}]{ndims }\end{DoxyParamCaption})}



Definition at line 452 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References map\+\_\+allocate().


\begin{DoxyCode}
452     \textcolor{comment}{! 変数 var の次元表の大きさを変える}
453     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
454     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
455     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ndims
456     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: newmap(:)
457     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: tmpmap(:)
458     \textcolor{keywordtype}{integer}:: n
459     \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(maptab(var%mapid)%map)) \textcolor{keywordflow}{then}
460       tmpmap => maptab(var%mapid)%map
461       \textcolor{keyword}{call }map\_allocate(newmap, ndims)
462       n = \hyperlink{interfacedc__date__generic_1_1min}{min}(\textcolor{keyword}{size}(tmpmap), ndims)
463       newmap(1:n) = tmpmap(1:n)
464       \textcolor{keyword}{deallocate}(tmpmap)
465       maptab(var%mapid)%map => newmap
466       newmap(n+1:ndims)%dimno = -1
467       newmap(n+1:ndims)%url = \textcolor{stringliteral}{' '}
468       newmap(n+1:ndims)%allcount = 0
469       newmap(n+1:ndims)%offset = 0
470       newmap(n+1:ndims)%step = 1
471       newmap(n+1:ndims)%start = 1
472       newmap(n+1:ndims)%count = 0
473       newmap(n+1:ndims)%stride = 1
474     \textcolor{keywordflow}{else}
475       \textcolor{keyword}{call }map\_allocate(maptab(var%mapid)%map, ndims)
476       n = 1
477 \textcolor{keywordflow}{    endif}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=324pt]{namespacegtdata__internal__map_ae904583b5f08e47440b3d0dc46996b22_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_a2e6a789c1c8f4850421da11f10081cb7}\label{namespacegtdata__internal__map_a2e6a789c1c8f4850421da11f10081cb7}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+set@{map\+\_\+set}}
\index{map\+\_\+set@{map\+\_\+set}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+set()}{map\_set()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::map\+\_\+set (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{type(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\+\_\+dimmap}), dimension(\+:), intent(in)}]{map,  }\item[{integer, intent(out)}]{stat }\end{DoxyParamCaption})}



Definition at line 274 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+error\+::gt\+\_\+enomoredims, and gtdata\+\_\+internal\+\_\+vartable\+::vid\+\_\+invalid.


\begin{DoxyCode}
274     \textcolor{comment}{! 同じファイル番号の変数表の値を設定する}
275     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
276     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: nf90\_enotvar, \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
277     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
278     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{intent(in)}:: map(:)
279     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: stat
280     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{allocated}(maptab)) \textcolor{keywordflow}{goto} 999
281     \textcolor{keywordflow}{if} (var%mapid <= 0 .or. var%mapid > \textcolor{keyword}{size}(maptab)) \textcolor{keywordflow}{goto} 999
282     \textcolor{keywordflow}{if} (maptab(var%mapid)%vid == vid\_invalid) \textcolor{keywordflow}{goto} 999
283     \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(map) > \textcolor{keyword}{size}(maptab(var%mapid)%map)) \textcolor{keywordflow}{then}
284       stat = \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}
285       \textcolor{keywordflow}{return}
286 \textcolor{keywordflow}{    endif}
287     maptab(var%mapid)%map(1:\textcolor{keyword}{size}(map)) = map(:)
288     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
289     \textcolor{keywordflow}{return}
290 999 \textcolor{keywordflow}{continue}
291     stat = nf90\_enotvar
\end{DoxyCode}
\mbox{\Hypertarget{namespacegtdata__internal__map_a12dffe35d93120bca94db15c47818ae1}\label{namespacegtdata__internal__map_a12dffe35d93120bca94db15c47818ae1}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+set\+\_\+ndims@{map\+\_\+set\+\_\+ndims}}
\index{map\+\_\+set\+\_\+ndims@{map\+\_\+set\+\_\+ndims}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+set\+\_\+ndims()}{map\_set\_ndims()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::map\+\_\+set\+\_\+ndims (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, intent(in)}]{ndims,  }\item[{integer, intent(out)}]{stat }\end{DoxyParamCaption})}



Definition at line 307 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+error\+::gt\+\_\+enomoredims, map\+\_\+lookup(), and gtdata\+\_\+internal\+\_\+vartable\+::vartablelookup().


\begin{DoxyCode}
307     \textcolor{comment}{! 変数 var の次元数を ndims に変える。}
308     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
309     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__vartable}{gtdata\_internal\_vartable}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__internal__vartable_a1bddf47a2cacc8db25b6fa2c32ed68db}{vartablelookup}
310     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: nf90\_enotvar, \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
311     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
312     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ndims
313     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: stat
314     \textcolor{keywordtype}{integer}:: vid
315     \textcolor{keyword}{call }map\_lookup(var, vid=vid)
316     \textcolor{keywordflow}{if} (vid == vid\_invalid) \textcolor{keywordflow}{then}
317       stat = nf90\_enotvar
318       \textcolor{keywordflow}{return}
319 \textcolor{keywordflow}{    endif}
320     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(maptab(var%mapid)%map)) \textcolor{keywordflow}{then}
321       \textcolor{keywordflow}{if} (ndims == 0) \textcolor{keywordflow}{then}
322         stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
323         maptab(var%mapid)%ndims = 0
324       \textcolor{keywordflow}{else}
325         stat = \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}
326 \textcolor{keywordflow}{      endif}
327     \textcolor{keywordflow}{else}
328       \textcolor{keywordflow}{if} (ndims > \textcolor{keyword}{size}(maptab(var%mapid)%map)) \textcolor{keywordflow}{then}
329         stat = \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}
330       \textcolor{keywordflow}{else}
331         stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
332         maptab(var%mapid)%ndims = ndims
333 \textcolor{keywordflow}{      endif}
334 \textcolor{keywordflow}{    endif}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=340pt]{namespacegtdata__internal__map_a12dffe35d93120bca94db15c47818ae1_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_ade13b31dac124116c651f89ee2a693ef}\label{namespacegtdata__internal__map_ade13b31dac124116c651f89ee2a693ef}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+set\+\_\+rank@{map\+\_\+set\+\_\+rank}}
\index{map\+\_\+set\+\_\+rank@{map\+\_\+set\+\_\+rank}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+set\+\_\+rank()}{map\_set\_rank()}}
{\footnotesize\ttfamily subroutine gtdata\+\_\+internal\+\_\+map\+::map\+\_\+set\+\_\+rank (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, intent(in)}]{rank,  }\item[{integer, intent(out)}]{stat }\end{DoxyParamCaption})}



Definition at line 338 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+error\+::gt\+\_\+enomoredims, map\+\_\+lookup(), and gtdata\+\_\+internal\+\_\+vartable\+::vartablelookup().


\begin{DoxyCode}
338     \textcolor{comment}{! 変数 var のランク(非縮退次元数)を rank に減らすように}
339     \textcolor{comment}{! count 値を1に減らす。ランクを増やすことや外見次元数の操作はしない。}
340     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
341     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__vartable}{gtdata\_internal\_vartable}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__internal__vartable_a1bddf47a2cacc8db25b6fa2c32ed68db}{vartablelookup}
342     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: nf90\_enotvar, \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
343     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
344     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: rank
345     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: stat
346     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: tmpmap(:)
347     \textcolor{keywordtype}{integer}:: ndims
348     \textcolor{keywordtype}{integer}:: vid, nd
349     \textcolor{keyword}{call }map\_lookup(var, vid, ndims=ndims)
350     \textcolor{keywordflow}{if} (vid == vid\_invalid) \textcolor{keywordflow}{then}
351       stat = nf90\_enotvar
352       \textcolor{keywordflow}{return}
353 \textcolor{keywordflow}{    endif}
354     \textcolor{keywordflow}{if} (ndims < rank) \textcolor{keywordflow}{then}
355       stat = \hyperlink{namespacedc__error_adbe5d07dca84213ae01fef87caf04be3}{gt\_enomoredims}
356       \textcolor{keywordflow}{return}
357 \textcolor{keywordflow}{    endif}
358     tmpmap => maptab(var%mapid)%map
359     \textcolor{keywordflow}{do}, nd = ndims, 1, -1
360       \textcolor{keywordflow}{if} (count(tmpmap(1:ndims)%count > 1) <= rank) \textcolor{keywordflow}{exit}
361       tmpmap(nd)%count = 1
362 \textcolor{keywordflow}{    enddo}
363     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=340pt]{namespacegtdata__internal__map_ade13b31dac124116c651f89ee2a693ef_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_a392037efec5853031c3f9fac8f52c507}\label{namespacegtdata__internal__map_a392037efec5853031c3f9fac8f52c507}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!map\+\_\+to\+\_\+internal\+\_\+specs@{map\+\_\+to\+\_\+internal\+\_\+specs}}
\index{map\+\_\+to\+\_\+internal\+\_\+specs@{map\+\_\+to\+\_\+internal\+\_\+specs}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{map\+\_\+to\+\_\+internal\+\_\+specs()}{map\_to\_internal\_specs()}}
{\footnotesize\ttfamily subroutine, public gtdata\+\_\+internal\+\_\+map\+::map\+\_\+to\+\_\+internal\+\_\+specs (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, dimension(\+:, \+:), pointer}]{specs,  }\item[{integer, intent(out), optional}]{ndims }\end{DoxyParamCaption})}



Definition at line 367 of file gtdata\+\_\+internal\+\_\+map.\+f90.



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


\begin{DoxyCode}
367     \textcolor{comment}{! マップ表から netCDF の引数にふさわしい start, count, stride, imap}
368     \textcolor{comment}{! を作成する。ただし、stride が負になるばあいは対策されていない。}
369     \textcolor{comment}{! (暫定的に gdncvarget/gdncvarput が対応している)}
370     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
371     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__vartable}{gtdata\_internal\_vartable}\textcolor{keywordtype}{, only}: num\_dimensions => 
      \hyperlink{namespacegtdata__internal__vartable_ae622b02798006661945bef1406c25ea4}{ndims}
372     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
373     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: specs(:, :)
374     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: \hyperlink{namespacegtdata__internal__vartable_ae622b02798006661945bef1406c25ea4}{ndims}
375     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{pointer}:: it
376     \textcolor{keywordtype}{integer}:: vid, i, j, imap, internal\_ndims
377     \textcolor{keywordtype}{integer}:: external\_ndims
378   \textcolor{keywordflow}{continue}
379     \textcolor{keyword}{call }map\_lookup(var, vid, \hyperlink{namespacegtdata__internal__vartable_ae622b02798006661945bef1406c25ea4}{ndims}=external\_ndims)
380     internal\_ndims = num\_dimensions(vid)
381     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(\hyperlink{namespacegtdata__internal__vartable_ae622b02798006661945bef1406c25ea4}{ndims})) \hyperlink{namespacegtdata__internal__vartable_ae622b02798006661945bef1406c25ea4}{ndims} = internal\_ndims
382     \textcolor{keyword}{allocate}(specs(\hyperlink{interfacedc__date__generic_1_1max}{max}(1, internal\_ndims), 4))
383     specs(:, 1) = 1
384     specs(:, 2) = 1
385     specs(:, 3) = 1
386     specs(:, 4) = 0
387     imap = 1
388     \textcolor{keywordflow}{do}, i = 1, \textcolor{keyword}{size}(maptab(var%mapid)%map)
389       it => maptab(var%mapid)%map(i)
390       j = it%dimno
391       \textcolor{keywordflow}{if} (j > 0 .and. j <= internal\_ndims) \textcolor{keywordflow}{then}
392         specs(j, 1) = it%start + it%offset
393         specs(j, 2) = it%count
394         \textcolor{keywordflow}{if} (i > external\_ndims) specs(j, 2) = 1
395         specs(j, 3) = it%stride * it%step
396         specs(j, 4) = imap
397 \textcolor{keywordflow}{      endif}
398       imap = imap * it%count
399 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtdata__internal__map_a392037efec5853031c3f9fac8f52c507_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_aa0f727646e588a97e73dac30fb02ef25}\label{namespacegtdata__internal__map_aa0f727646e588a97e73dac30fb02ef25}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!maptabadd@{maptabadd}}
\index{maptabadd@{maptabadd}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{maptabadd()}{maptabadd()}}
{\footnotesize\ttfamily subroutine, public gtdata\+\_\+internal\+\_\+map\+::maptabadd (\begin{DoxyParamCaption}\item[{integer, intent(out)}]{mapid,  }\item[{integer, intent(in)}]{vid }\end{DoxyParamCaption})}



Definition at line 188 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References gtdata\+\_\+internal\+\_\+vartable\+::vid\+\_\+invalid.


\begin{DoxyCode}
188     \textcolor{comment}{! すでに実体表に追加されたエントリ番号 vid を指定して、}
189     \textcolor{comment}{! マップ表にエントリを追加する。}
190     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: mapid
191     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: vid
192     \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1map__table__entry}{map\_table\_entry}), \textcolor{keywordtype}{allocatable}:: tmp\_maptab(:)
193     \textcolor{keywordtype}{integer}:: i, n
194     \textcolor{comment}{! 必要なら初期確保}
195     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{allocated}(maptab)) \textcolor{keywordflow}{then}
196       \textcolor{keyword}{allocate}(maptab(maptab\_init\_size))
197       maptab(:)%vid = vid\_invalid
198       \textcolor{keywordflow}{do}, n = 1, maptab\_init\_size
199         \textcolor{keyword}{nullify}(maptab(n)%map)
200 \textcolor{keywordflow}{      enddo}
201 \textcolor{keywordflow}{    endif}
202     \textcolor{comment}{! 空き地があればそこに割り当て}
203     \textcolor{keywordflow}{do}, i = 1, \textcolor{keyword}{size}(maptab)
204       \textcolor{keywordflow}{if} (maptab(i)%vid == vid\_invalid) \textcolor{keywordflow}{then}
205         mapid = i
206         maptab(mapid)%vid = vid
207         \textcolor{keywordflow}{return}
208 \textcolor{keywordflow}{      endif}
209 \textcolor{keywordflow}{    enddo}
210     \textcolor{comment}{! 空き地はなかったのだから倍幅確保}
211     n = \textcolor{keyword}{size}(maptab)
212     \textcolor{keyword}{allocate}(tmp\_maptab(n))
213     tmp\_maptab(:) = maptab(:)
214     \textcolor{keyword}{deallocate}(maptab)
215     \textcolor{keyword}{allocate}(maptab(n * 2))
216     \textcolor{comment}{! 確保したところはクリア}
217     maptab(1:n) = tmp\_maptab(1:n)
218     \textcolor{keywordflow}{do}, i = n + 1, (2 * \textcolor{keyword}{size}(tmp\_maptab))
219       maptab(i)%vid = vid\_invalid
220       \textcolor{keyword}{nullify}(maptab(i)%map)
221 \textcolor{keywordflow}{    enddo}
222     \textcolor{keyword}{deallocate}(tmp\_maptab)
223     mapid = n + 1
224     maptab(mapid)%vid = vid
\end{DoxyCode}
\mbox{\Hypertarget{namespacegtdata__internal__map_a4d64e68c2ccbf5729f07a64822f90726}\label{namespacegtdata__internal__map_a4d64e68c2ccbf5729f07a64822f90726}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!maptabdelete@{maptabdelete}}
\index{maptabdelete@{maptabdelete}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{maptabdelete()}{maptabdelete()}}
{\footnotesize\ttfamily subroutine, public gtdata\+\_\+internal\+\_\+map\+::maptabdelete (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 228 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+error\+::storeerror(), and gtdata\+\_\+internal\+\_\+vartable\+::vid\+\_\+invalid.


\begin{DoxyCode}
228     \textcolor{comment}{! 変数 var をマップ表から削除する。}
229     \textcolor{comment}{! 実体表には手をつけない。}
230     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: nf90\_enotvar, \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
231     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
232     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: dbgmessage
233     \textcolor{keywordtype}{implicit none}
234     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
235     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
236     \textcolor{keywordtype}{integer}:: mapid
237     mapid = var%mapid
238     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{allocated}(maptab)) \textcolor{keywordflow}{goto} 999
239     \textcolor{keywordflow}{if} (mapid <= 0 .or. mapid > \textcolor{keyword}{size}(maptab)) \textcolor{keywordflow}{goto} 999
240     \textcolor{keywordflow}{if} (maptab(mapid)%vid == vid\_invalid) \textcolor{keywordflow}{goto} 999
241     maptab(mapid)%vid = vid\_invalid
242     \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(maptab(mapid)%map)) \textcolor{keyword}{deallocate}(maptab(mapid)%map)
243     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(\hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, \textcolor{stringliteral}{'maptabdelete'}, err)
244     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'gtdata\_internal\_map table %d deleted'}, i=(/mapid/))
245     \textcolor{keywordflow}{return}
246 999 \textcolor{keywordflow}{continue}
247     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(nf90\_enotvar, \textcolor{stringliteral}{'maptabdelete'}, err)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacegtdata__internal__map_a4d64e68c2ccbf5729f07a64822f90726_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacegtdata__internal__map_a86b920031832bea17e70a6bf4623c3d9}\label{namespacegtdata__internal__map_a86b920031832bea17e70a6bf4623c3d9}} 
\index{gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}!var\+\_\+class@{var\+\_\+class}}
\index{var\+\_\+class@{var\+\_\+class}!gtdata\+\_\+internal\+\_\+map@{gtdata\+\_\+internal\+\_\+map}}
\subsubsection{\texorpdfstring{var\+\_\+class()}{var\_class()}}
{\footnotesize\ttfamily subroutine, public gtdata\+\_\+internal\+\_\+map\+::var\+\_\+class (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, intent(out), optional}]{class,  }\item[{integer, intent(out), optional}]{cid }\end{DoxyParamCaption})}



Definition at line 296 of file gtdata\+\_\+internal\+\_\+map.\+f90.



References map\+\_\+lookup(), and gtdata\+\_\+internal\+\_\+vartable\+::vartablelookup().


\begin{DoxyCode}
296     \textcolor{comment}{! 変数 var を指定して、内部種別 class, 内部識別子 cid を得る。}
297     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
298     \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__vartable}{gtdata\_internal\_vartable}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__internal__vartable_a1bddf47a2cacc8db25b6fa2c32ed68db}{vartablelookup}
299     \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}:: var
300     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: \textcolor{keywordtype}{class}, cid
301     \textcolor{keywordtype}{integer}:: vid
302     \textcolor{keyword}{call }map\_lookup(var, vid=vid)
303     \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__vartable_a1bddf47a2cacc8db25b6fa2c32ed68db}{vartablelookup}(vid, class=\textcolor{keywordtype}{class}, cid=cid)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=340pt]{namespacegtdata__internal__map_a86b920031832bea17e70a6bf4623c3d9_cgraph}
\end{center}
\end{figure}
