\hypertarget{gtvarsliceauto_8f90}{}\section{gtdata/gtvarsliceauto.f90 File Reference}
\label{gtvarsliceauto_8f90}\index{gtdata/gtvarsliceauto.\+f90@{gtdata/gtvarsliceauto.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{gtvarsliceauto_8f90_a7015be98872c42a860e760563b388643}{gtvarsliceauto} (var, compatible)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{gtvarsliceauto_8f90_a7015be98872c42a860e760563b388643}\label{gtvarsliceauto_8f90_a7015be98872c42a860e760563b388643}} 
\index{gtvarsliceauto.\+f90@{gtvarsliceauto.\+f90}!gtvarsliceauto@{gtvarsliceauto}}
\index{gtvarsliceauto@{gtvarsliceauto}!gtvarsliceauto.\+f90@{gtvarsliceauto.\+f90}}
\subsubsection{\texorpdfstring{gtvarsliceauto()}{gtvarsliceauto()}}
{\footnotesize\ttfamily subroutine gtvarsliceauto (\begin{DoxyParamCaption}\item[{type(gt\+\_\+variable), intent(inout)}]{var,  }\item[{type(gt\+\_\+variable), intent(in), optional}]{compatible }\end{DoxyParamCaption})}



Definition at line 15 of file gtvarsliceauto.\+f90.



References gtvarslice().


\begin{DoxyCode}
15   \textcolor{comment}{!}
16   \textcolor{comment}{!== 入出力範囲をおまかせ指示}
17   \textcolor{comment}{!}
18   \textcolor{comment}{! 変数 *var* の入出力範囲を「適当に」小さくします。}
19   \textcolor{comment}{! *compatible* を指定すると、その変数と全く同じ入出力範囲に}
20   \textcolor{comment}{! に指定します。}
21   \textcolor{comment}{!}
22   \textcolor{comment}{! *Slice* は複数のサブルーチンの総称名であり、}
23   \textcolor{comment}{! 他にも文字列や番号で指定する方法があります。}
24   \textcolor{comment}{! 以下のサブルーチンを参照してください。}
25   \textcolor{comment}{!}
26   \textcolor{comment}{! Slice に関連する手続きとして、Get\_Slice と Slice\_Next が}
27   \textcolor{comment}{! あります。Get\_Slice は設定された入出力範囲を取得します。 }
28   \textcolor{comment}{! Slice\_Next は入出力範囲を移動することによって、変数全体を読み取る}
29   \textcolor{comment}{! ために利用するサブルーチンです。}
30   \textcolor{comment}{!}
31   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__types}{gtdata\_types}\textcolor{keywordtype}{, only}: gt\_variable
32   \textcolor{keywordtype}{use }gtdata\_generic\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}, get\_slice, \hyperlink{gtvarslice_8f90_ac2fa32099894dc037b1871433e307fe3}{gtvarslice}
33   \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(inout)}:: var
34   \textcolor{keywordtype}{type}(gt\_variable), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: compatible
35   \textcolor{keywordtype}{integer}:: nd, i
36   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: start(:), count(:), stride(:)
37   \textcolor{keyword}{call }\hyperlink{interfacegtdata__netcdf__generic_1_1inquire}{inquire}(var, alldims=nd)
38   \textcolor{keywordflow}{if} (nd <= 0) \textcolor{keywordflow}{return}
39   \textcolor{keyword}{allocate}(start(nd), count(nd), stride(nd))
40   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(compatible)) \textcolor{keywordflow}{then}
41     \textcolor{keyword}{call }get\_slice(compatible, start, count, stride)
42     \textcolor{keywordflow}{do}, i = 1, nd
43       \textcolor{keyword}{call }\hyperlink{gtvarslice_8f90_ac2fa32099894dc037b1871433e307fe3}{gtvarslice}(var, i, start(i), count(i), stride(i))
44 \textcolor{keywordflow}{    enddo}
45   \textcolor{keywordflow}{else}
46     \textcolor{keyword}{call }get\_slice(var, start, count, stride)
47     \textcolor{keywordflow}{do}, i = 1, nd
48       \textcolor{keywordflow}{if} (count(i) < 1) count(i) = 1
49       \textcolor{keyword}{call }\hyperlink{gtvarslice_8f90_ac2fa32099894dc037b1871433e307fe3}{gtvarslice}(var, i, start(i), count(i), stride(i))
50 \textcolor{keywordflow}{    enddo}
51 \textcolor{keywordflow}{  endif}
52   \textcolor{keyword}{deallocate}(start, count, stride)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{gtvarsliceauto_8f90_a7015be98872c42a860e760563b388643_cgraph}
\end{center}
\end{figure}
