\hypertarget{gdncfilesync_8f90}{}\section{gtdata/gtdata\+\_\+netcdf/gtdata\+\_\+netcdf\+\_\+file/gdncfilesync.f90 File Reference}
\label{gdncfilesync_8f90}\index{gtdata/gtdata\+\_\+netcdf/gtdata\+\_\+netcdf\+\_\+file/gdncfilesync.\+f90@{gtdata/gtdata\+\_\+netcdf/gtdata\+\_\+netcdf\+\_\+file/gdncfilesync.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{gdncfilesync_8f90_af8d39b1bad7faf9dc6812a17f4270d36}{gdncfilesync} (fileid, stat)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{gdncfilesync_8f90_af8d39b1bad7faf9dc6812a17f4270d36}\label{gdncfilesync_8f90_af8d39b1bad7faf9dc6812a17f4270d36}} 
\index{gdncfilesync.\+f90@{gdncfilesync.\+f90}!gdncfilesync@{gdncfilesync}}
\index{gdncfilesync@{gdncfilesync}!gdncfilesync.\+f90@{gdncfilesync.\+f90}}
\subsubsection{\texorpdfstring{gdncfilesync()}{gdncfilesync()}}
{\footnotesize\ttfamily subroutine gdncfilesync (\begin{DoxyParamCaption}\item[{integer, intent(in), optional}]{fileid,  }\item[{integer, intent(out), optional}]{stat }\end{DoxyParamCaption})}



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



References gdncfiledatamode(), gtdata\+\_\+netcdf\+\_\+file\+\_\+internal\+::id\+\_\+head, and gtdata\+\_\+netcdf\+\_\+file\+\_\+internal\+::id\+\_\+used.



Referenced by gdncvarclose(), and gdncvarsync().


\begin{DoxyCode}
2   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__file__types}{gtdata\_netcdf\_file\_types}\textcolor{keywordtype}{, only}: 
      \hyperlink{structgtdata__netcdf__file__types_1_1gd__nc__file__id__entry}{gd\_nc\_file\_id\_entry}
3   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__file__internal}{gtdata\_netcdf\_file\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtdata__netcdf__file__internal_adc425214d1fe0c8803e7b91f0d2074f8}{id\_head}, 
      \hyperlink{namespacegtdata__netcdf__file__internal_ad13ad75c1b2a9be6fd6f67d457dd710f}{id\_used}
4   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__netcdf__file__generic}{gtdata\_netcdf\_file\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{gdncfiledatamode_8f90_a62939a5bbb992ef5dd1093b1f854cfce}{gdncfiledatamode}
5   \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_sync, nf90\_noerr
6   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}
7   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: fileid
8   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: stat
9   \textcolor{keywordtype}{integer}:: ncid, mystat
10   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__netcdf__file__types_1_1gd__nc__file__id__entry}{gd\_nc\_file\_id\_entry}), \textcolor{keywordtype}{pointer}:: identptr
11 \textcolor{keywordflow}{continue}
12   mystat = nf90\_noerr
13   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(fileid)) \textcolor{keywordflow}{then}
14     ncid = fileid
15     mystat = \hyperlink{gdncfiledatamode_8f90_a62939a5bbb992ef5dd1093b1f854cfce}{gdncfiledatamode}(ncid)
16     \textcolor{keywordflow}{if} (mystat /= nf90\_noerr) \textcolor{keywordflow}{goto} 999
17     mystat = nf90\_sync(ncid)
18   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\hyperlink{namespacegtdata__netcdf__file__internal_ad13ad75c1b2a9be6fd6f67d457dd710f}{id\_used}) \textcolor{keywordflow}{then}
19     identptr => \hyperlink{namespacegtdata__netcdf__file__internal_adc425214d1fe0c8803e7b91f0d2074f8}{id\_head}
20     \textcolor{keywordflow}{do}
21       \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(identptr)) \textcolor{keywordflow}{exit}
22       ncid = identptr % id
23       mystat = \hyperlink{gdncfiledatamode_8f90_a62939a5bbb992ef5dd1093b1f854cfce}{gdncfiledatamode}(ncid)
24       \textcolor{keywordflow}{if} (mystat /= nf90\_noerr) \textcolor{keywordflow}{exit}
25       mystat = nf90\_sync(ncid)
26       \textcolor{keywordflow}{if} (mystat /= nf90\_noerr) \textcolor{keywordflow}{exit}
27       identptr => identptr % next
28 \textcolor{keywordflow}{    enddo}
29 \textcolor{keywordflow}{  endif}
30 999 \textcolor{keywordflow}{continue}
31   \textcolor{comment}{! 自発的には StoreError しない。StoreError の SysdepAbort}
32   \textcolor{comment}{! からも呼ばれる可能性があるためである。}
33   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(stat)) stat = mystat
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{gdncfilesync_8f90_af8d39b1bad7faf9dc6812a17f4270d36_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{gdncfilesync_8f90_af8d39b1bad7faf9dc6812a17f4270d36_icgraph}
\end{center}
\end{figure}
