\hypertarget{gtvargetslice_8f90}{}\section{gtdata/gtvargetslice.f90 File Reference}
\label{gtvargetslice_8f90}\index{gtdata/gtvargetslice.\+f90@{gtdata/gtvargetslice.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{gtvargetslice_8f90_a058789887a6e8d18a4d712b2532c0ddf}{gtvargetslice} (var, dimord, start, count, stride, count\+\_\+compact)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{gtvargetslice_8f90_a058789887a6e8d18a4d712b2532c0ddf}\label{gtvargetslice_8f90_a058789887a6e8d18a4d712b2532c0ddf}} 
\index{gtvargetslice.\+f90@{gtvargetslice.\+f90}!gtvargetslice@{gtvargetslice}}
\index{gtvargetslice@{gtvargetslice}!gtvargetslice.\+f90@{gtvargetslice.\+f90}}
\subsubsection{\texorpdfstring{gtvargetslice()}{gtvargetslice()}}
{\footnotesize\ttfamily subroutine gtvargetslice (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(in)}]{var,  }\item[{integer, intent(in)}]{dimord,  }\item[{integer, intent(out), optional}]{start,  }\item[{integer, intent(out), optional}]{count,  }\item[{integer, intent(out), optional}]{stride,  }\item[{logical, intent(in), optional}]{count\+\_\+compact }\end{DoxyParamCaption})}



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



References gtdata\+\_\+internal\+\_\+map\+::dimord\+\_\+skip\+\_\+compact(), and gtdata\+\_\+internal\+\_\+map\+::map\+\_\+lookup().



Referenced by gtvargetsliceall().


\begin{DoxyCode}
14   \textcolor{comment}{!}
15   \textcolor{comment}{!== 変数入出力範囲限定情報を取得}
16   \textcolor{comment}{!}
17   \textcolor{comment}{! 変数 *var* の *dimord* 番目の次元に関して、}
18   \textcolor{comment}{! Slice によって設定された入出力範囲の情報を取得します。}
19   \textcolor{comment}{!}
20   \textcolor{comment}{! *start*, *count*, *stride* に関しては Slice を参照してください。}
21   \textcolor{comment}{!}
22   \textcolor{comment}{! *count\_compact* に .true. に指定すると、縮退された次元も}
23   \textcolor{comment}{! 含んで問い合わせを行います。}
24   \textcolor{comment}{!}
25   \textcolor{comment}{! *Get\_Slice* は 2 つのサブルーチンの総称名であり、}
26   \textcolor{comment}{! 他にも変数の依存する全ての次元に関して一括で情報を取得する}
27   \textcolor{comment}{! 方法もあります。上記のサブルーチンを参照ください。}
28   \textcolor{comment}{!}
29   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtdata__types_1_1gt__variable}{gt\_variable}
30   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__internal__map}{gtdata\_internal\_map}\textcolor{keywordtype}{, only}: \hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}, 
      \hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\_lookup}, \hyperlink{namespacegtdata__internal__map_a44f4fb36cd72433854ba6bdc6634500f}{dimord\_skip\_compact}
31   \textcolor{keywordtype}{implicit none}
32   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__types_1_1gt__variable}{gt\_variable}), \textcolor{keywordtype}{intent(in)}:: var
33   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: dimord
34   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: start
35   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: count
36   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: stride
37   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: count\_compact
38   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__internal__map_1_1gt__dimmap}{gt\_dimmap}), \textcolor{keywordtype}{allocatable}:: map(:)
39   \textcolor{keywordtype}{integer}:: vid, udimord, ndims
40   \textcolor{keywordtype}{logical}:: allmode
41 \textcolor{keywordflow}{continue}
42   allmode = .true.
43   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(count\_compact)) allmode = count\_compact
44   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\_lookup}(var, vid=vid, ndims=ndims)
45   \textcolor{keywordflow}{if} (vid < 0 .or. ndims <= 0) \textcolor{keywordflow}{goto} 999
46   \textcolor{keyword}{allocate}(map(ndims))
47   \textcolor{keyword}{call }\hyperlink{namespacegtdata__internal__map_a076911f777be03f10a2c024dac7efdad}{map\_lookup}(var, map=map)
48   \textcolor{keywordflow}{if} (allmode) \textcolor{keywordflow}{then}
49     udimord = dimord
50   \textcolor{keywordflow}{else}
51     udimord = \hyperlink{namespacegtdata__internal__map_a44f4fb36cd72433854ba6bdc6634500f}{dimord\_skip\_compact}(dimord, map)
52 \textcolor{keywordflow}{  endif}
53   \textcolor{keywordflow}{if} (udimord < 1 .or. udimord > \textcolor{keyword}{size}(map)) \textcolor{keywordflow}{goto} 997
54 
55   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(start)) start = map(udimord)%start
56   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(count)) count = map(udimord)%count
57   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(stride)) stride = map(udimord)%stride
58   \textcolor{keyword}{deallocate}(map)
59   \textcolor{keywordflow}{return}
60 
61 997 \textcolor{keywordflow}{continue}
62   \textcolor{keyword}{deallocate}(map)
63 999 \textcolor{keywordflow}{continue}
64   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(start)) start = -1
65   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(count)) count = -1
66   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(stride)) stride = -1
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{gtvargetslice_8f90_a058789887a6e8d18a4d712b2532c0ddf_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=270pt]{gtvargetslice_8f90_a058789887a6e8d18a4d712b2532c0ddf_icgraph}
\end{center}
\end{figure}
