\hypertarget{dccaldatecreate_8f90}{}\section{dc\+\_\+utils/dccaldatecreate.f90 File Reference}
\label{dccaldatecreate_8f90}\index{dc\+\_\+utils/dccaldatecreate.\+f90@{dc\+\_\+utils/dccaldatecreate.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{dccaldatecreate_8f90_aaad59132a8b0cca0d5108925d2c5b92a}{dccaldatecreate1} (year, month, day, hour, min, sec, date, zone, err)
\item 
subroutine \hyperlink{dccaldatecreate_8f90_a25e3a286eb61f6c6cbc04c995d8f5200}{dccaldatecreate2} (date\+\_\+str, date, err)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{dccaldatecreate_8f90_aaad59132a8b0cca0d5108925d2c5b92a}\label{dccaldatecreate_8f90_aaad59132a8b0cca0d5108925d2c5b92a}} 
\index{dccaldatecreate.\+f90@{dccaldatecreate.\+f90}!dccaldatecreate1@{dccaldatecreate1}}
\index{dccaldatecreate1@{dccaldatecreate1}!dccaldatecreate.\+f90@{dccaldatecreate.\+f90}}
\subsubsection{\texorpdfstring{dccaldatecreate1()}{dccaldatecreate1()}}
{\footnotesize\ttfamily subroutine dccaldatecreate1 (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{year,  }\item[{integer, intent(in)}]{month,  }\item[{integer, intent(in)}]{day,  }\item[{integer, intent(in)}]{hour,  }\item[{integer, intent(in)}]{min,  }\item[{real(dp), intent(in)}]{sec,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(out), optional, target}]{date,  }\item[{character($\ast$), intent(in), optional}]{zone,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 16 of file dccaldatecreate.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+regex\+::match(), dc\+\_\+error\+::storeerror(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
16   \textcolor{comment}{!}
17   \textcolor{comment}{! 日時の設定を行います. }
18   \textcolor{comment}{! }
19   \textcolor{comment}{! YYYY-MM-DDThh:mm:ss.sTZD のような文字列 }
20   \textcolor{comment}{! (YYYY は年, MM は月, DD は日, hh は時, mm は分, ss.s は秒,}
21   \textcolor{comment}{! TZD はタイムゾーン) で指定する場合には}
22   \textcolor{comment}{! 下記の同名のサブルーチンを使用して下さい. }
23   \textcolor{comment}{!}
24   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
25   \textcolor{comment}{! 保持される "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数に日時が}
26   \textcolor{comment}{! 設定されます. その後の手続きで *date* を省略した場合には}
27   \textcolor{comment}{! この日時が使用されます. }
28   \textcolor{comment}{! *date* が省略されない場合にはその変数に日時が設定されます. }
29   \textcolor{comment}{! その日時を使用する場合, 手続きにその "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数}
30   \textcolor{comment}{! を与えてください. }
31   \textcolor{comment}{!}
32   \textcolor{comment}{! Set date. }
33   \textcolor{comment}{!}
34   \textcolor{comment}{! If a string like as "YYYY-MM-DDThh:mm:ss.sTZD"}
35   \textcolor{comment}{! (YYYY is year, MM is month, DD is day, hh is hour, mm is minute, }
36   \textcolor{comment}{! ss.s is second, TZD is time zone) is used, }
37   \textcolor{comment}{! use a following homonymous subroutine. }
38   \textcolor{comment}{!}
39   \textcolor{comment}{! If an optional argument *date* is omitted, }
40   \textcolor{comment}{! the date setting is stored to a "dc\_calendar\_types#DC\_CAL\_DATE" }
41   \textcolor{comment}{! variable that is saved in the "dc\_calendar". }
42   \textcolor{comment}{! When *date* is omitted in subsequent procedures, the internal date}
43   \textcolor{comment}{! is used. }
44   \textcolor{comment}{! If *date* is not omitted, the settings is stored to the *date*. }
45   \textcolor{comment}{! In order to use the date setting, use the "dc\_calendar\_types#DC\_CAL\_DATE" }
46   \textcolor{comment}{! varieble to subsequent procedures. }
47   \textcolor{comment}{!}
48 
49 
50   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}
51   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
52   \textcolor{keywordtype}{use }\hyperlink{namespacedc__regex}{dc\_regex}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}
53   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
54   \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1lchar}{lchar}
55   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
56   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
57   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
58   \textcolor{keywordtype}{implicit none}
59   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: year  \textcolor{comment}{! 年. Year.}
60   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: month \textcolor{comment}{! 月. Month.}
61   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: day   \textcolor{comment}{! 日. Day.}
62   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: hour  \textcolor{comment}{! 時. Hour.}
63   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: min   \textcolor{comment}{! 分. Minute.}
64   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec  \textcolor{comment}{! 秒. Second.}
65   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
66                               \textcolor{comment}{! 日時情報を収めたオブジェクト. }
67                               \textcolor{comment}{! 省略した場合には, デフォルトの日時として}
68                               \textcolor{comment}{! 指定される. }
69                               \textcolor{comment}{! }
70                               \textcolor{comment}{! An object that stores information of }
71                               \textcolor{comment}{! date and time. }
72                               \textcolor{comment}{! If this is omitted, these information is }
73                               \textcolor{comment}{! set as default date and time. }
74   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: zone
75                               \textcolor{comment}{! UTC からの時差. Time-zone. }
76   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
77                               \textcolor{comment}{! 例外処理用フラグ. }
78                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
79                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
80                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
81                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
82                               \textcolor{comment}{! *err* に .true. が代入されます. }
83                               \textcolor{comment}{!}
84                               \textcolor{comment}{! Exception handling flag. }
85                               \textcolor{comment}{! By default, when error occur in }
86                               \textcolor{comment}{! this procedure, the program aborts. }
87                               \textcolor{comment}{! If this *err* argument is given, }
88                               \textcolor{comment}{! .true. is substituted to *err* and }
89                               \textcolor{comment}{! the program does not abort. }
90 
91 
92   \textcolor{comment}{! 作業変数}
93   \textcolor{comment}{! Work variables}
94   \textcolor{comment}{!}
95   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
96   \textcolor{keywordtype}{integer}:: start, length
97   \textcolor{keywordtype}{integer}:: stat
98   \textcolor{keywordtype}{character(STRING)}:: cause\_c
99   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: version = &
100     & \textcolor{stringliteral}{'$Name:  $'} // &
101     & \textcolor{stringliteral}{'$Id: dccaldatecreate.f90,v 1.3 2010-09-24 07:07:31 morikawa Exp $'}
102   character(*), \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateCreate1'}
103 \textcolor{keywordflow}{continue}
104   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname, version )
105   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
106   cause\_c = \textcolor{stringliteral}{''}
107 
108   \textcolor{comment}{! オブジェクトのポインタ割付}
109   \textcolor{comment}{! Associate pointer of an object}
110   \textcolor{comment}{!}
111   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
112     datep => date
113   \textcolor{keywordflow}{else}
114     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
115 \textcolor{keywordflow}{  end if}
116 
117 \textcolor{comment}{!!$  ! 初期設定のチェック}
118 \textcolor{comment}{!!$  ! Check initialization}
119 \textcolor{comment}{!!$  !}
120 \textcolor{comment}{!!$  if ( datep % initialized ) then}
121 \textcolor{comment}{!!$    stat = DC\_EALREADYINIT}
122 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
123 \textcolor{comment}{!!$    goto 999}
124 \textcolor{comment}{!!$  end if}
125 
126   \textcolor{comment}{! 日時の正当性のチェック}
127   \textcolor{comment}{! Validate date and time}
128   \textcolor{comment}{!}
129 \textcolor{comment}{!!$  if ( year < 1 ) then}
130 \textcolor{comment}{!!$    stat = DC\_EBADDATE}
131 \textcolor{comment}{!!$    call MessageNotify('W', subname, 'year=<%d> must be natural number', &}
132 \textcolor{comment}{!!$      & i = (/ year /) )}
133 \textcolor{comment}{!!$    goto 999}
134 \textcolor{comment}{!!$  end if}
135 
136   \textcolor{keywordflow}{if} ( month < 1 ) \textcolor{keywordflow}{then}
137     stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
138     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'month=<%d> must be natural number'}, &
139       & i = (/ month /) )
140     \textcolor{keywordflow}{goto} 999
141 \textcolor{keywordflow}{  end if}
142 
143   \textcolor{keywordflow}{if} ( day < 1 ) \textcolor{keywordflow}{then}
144     stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
145     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'day=<%d> must be natural number'}, &
146       & i = (/ day /) )
147     \textcolor{keywordflow}{goto} 999
148 \textcolor{keywordflow}{  end if}
149 
150   \textcolor{keywordflow}{if} ( hour < 0 ) \textcolor{keywordflow}{then}
151     stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
152     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'hour=<%d> must not be negative'}, &
153       & i = (/ hour /) )
154     \textcolor{keywordflow}{goto} 999
155 \textcolor{keywordflow}{  end if}
156 
157   \textcolor{keywordflow}{if} ( min < 0 ) \textcolor{keywordflow}{then}
158     stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
159     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'min=<%d> must not be negative'}, &
160       & i = (/ min /) )
161     \textcolor{keywordflow}{goto} 999
162 \textcolor{keywordflow}{  end if}
163 
164   \textcolor{keywordflow}{if} ( sec < 0.0\_dp ) \textcolor{keywordflow}{then}
165     stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
166     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'sec=<%f> must not be negative'}, &
167       & d = (/ sec /) )
168     \textcolor{keywordflow}{goto} 999
169 \textcolor{keywordflow}{  end if}
170 
171   \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}( \textcolor{stringliteral}{'^[#+-]#d+:#d+$'}, zone, & \textcolor{comment}{! (in)}
172     &         start, length )           \textcolor{comment}{! (out)}
173   \textcolor{keywordflow}{if} ( length > 0 ) \textcolor{keywordflow}{then}
174     datep % zone = zone
175   \textcolor{keywordflow}{else}
176     datep % zone = \textcolor{stringliteral}{''}
177 \textcolor{keywordflow}{  end if}
178 
179   \textcolor{comment}{! 各要素への値の設定}
180   \textcolor{comment}{! Configure elements}
181   \textcolor{comment}{!}
182   datep % year  = year
183   datep % month = month
184   datep % day   = day
185   datep % hour  = hour
186   datep % min   = min
187   datep % sec   = sec
188 
189   \textcolor{comment}{! 終了処理, 例外処理}
190   \textcolor{comment}{! Termination and Exception handling}
191   \textcolor{comment}{!}
192   datep % initialized = .true.
193 999 \textcolor{keywordflow}{continue}
194   \textcolor{keyword}{nullify}( datep )
195   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
196   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldatecreate_8f90_aaad59132a8b0cca0d5108925d2c5b92a_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccaldatecreate_8f90_a25e3a286eb61f6c6cbc04c995d8f5200}\label{dccaldatecreate_8f90_a25e3a286eb61f6c6cbc04c995d8f5200}} 
\index{dccaldatecreate.\+f90@{dccaldatecreate.\+f90}!dccaldatecreate2@{dccaldatecreate2}}
\index{dccaldatecreate2@{dccaldatecreate2}!dccaldatecreate.\+f90@{dccaldatecreate.\+f90}}
\subsubsection{\texorpdfstring{dccaldatecreate2()}{dccaldatecreate2()}}
{\footnotesize\ttfamily subroutine dccaldatecreate2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{date\+\_\+str,  }\item[{type(dc\+\_\+cal\+\_\+date), intent(out), optional, target}]{date,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 200 of file dccaldatecreate.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+ebaddate, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+date, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
200   \textcolor{comment}{!}
201   \textcolor{comment}{! 日時の設定を行います. }
202   \textcolor{comment}{! }
203   \textcolor{comment}{! *date\_str* に YYYY-MM-DDThh:mm:ss.sTZD の形式の文字列 }
204   \textcolor{comment}{! (YYYY は年, MM は月, DD は日, hh は時, mm は分, ss.s は秒,}
205   \textcolor{comment}{! TZD はタイムゾーン) を指定してください. }
206   \textcolor{comment}{! 年月日時分秒を各個変数で指定する場合には}
207   \textcolor{comment}{! 上記の同名のサブルーチンを使用して下さい. }
208   \textcolor{comment}{! 日時の文字列形式は }
209   \textcolor{comment}{! gtool4 netCDF 規約「5.5 日時形式」に準拠しています. }
210   \textcolor{comment}{! }
211   \textcolor{comment}{! "s since 2009-06-17T11:23:45+09:00" のような文字列を与えた場合には, }
212   \textcolor{comment}{! "s since " の部分をサブルーチン内で自動的に切り取って, }
213   \textcolor{comment}{! "2009-06-17T11:23:45+09:00" の部分を設定します. }
214   \textcolor{comment}{!}
215   \textcolor{comment}{! 省略可能引数 *date* が省略された場合には, dc\_calendar 内部で}
216   \textcolor{comment}{! 保持される "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数に日時が}
217   \textcolor{comment}{! 設定されます. その後の手続きで *date* を省略した場合には}
218   \textcolor{comment}{! この日時が使用されます. }
219   \textcolor{comment}{! *date* が省略されない場合にはその変数に日時が設定されます. }
220   \textcolor{comment}{! その日時を使用する場合, 手続きにその "dc\_calendar\_types#DC\_CAL\_DATE" 型の変数}
221   \textcolor{comment}{! を与えてください. }
222   \textcolor{comment}{!}
223   \textcolor{comment}{! Set date. }
224   \textcolor{comment}{!}
225   \textcolor{comment}{! Specify a string like as "YYYY-MM-DDThh:mm:ss.sTZD"}
226   \textcolor{comment}{! (YYYY is year, MM is month, DD is day, hh is hour, mm is minute, }
227   \textcolor{comment}{! ss.s is second, TZD is time zone). }
228   \textcolor{comment}{! If individual variables (year, month, day, hour, minute, second, zone) }
229   \textcolor{comment}{! are used, use a foregoing homonymous subroutine. }
230   \textcolor{comment}{! Format of date is conformed to gtool4 netCDF Convention "5.5 Expression of date and time" }
231   \textcolor{comment}{!}
232   \textcolor{comment}{! If a string like as "s since 2009-06-17T11:23:45+09:00" is specified, }
233   \textcolor{comment}{! A part "s since " is truncated automatically, and }
234   \textcolor{comment}{! a part "2009-06-17T11:23:45+09:00" is set. }
235   \textcolor{comment}{!}
236   \textcolor{comment}{! If an optional argument *date* is omitted, }
237   \textcolor{comment}{! the date setting is stored to a "dc\_calendar\_types#DC\_CAL\_DATE" }
238   \textcolor{comment}{! variable that is saved in the "dc\_calendar". }
239   \textcolor{comment}{! When *date* is omitted in subsequent procedures, the internal date}
240   \textcolor{comment}{! is used. }
241   \textcolor{comment}{! If *date* is not omitted, the settings is stored to the *date*. }
242   \textcolor{comment}{! In order to use the date setting, use the "dc\_calendar\_types#DC\_CAL\_DATE" }
243   \textcolor{comment}{! varieble to subsequent procedures. }
244   \textcolor{comment}{!}
245   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccaldateparsestr}{dccaldateparsestr}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}
246   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}
247   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
248   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
249   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
250   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
251   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}, \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
252   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
253   \textcolor{keywordtype}{implicit none}
254   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: date\_str
255                               \textcolor{comment}{! 日時情報を表す文字列. }
256                               \textcolor{comment}{! 表示形式については gtool4 netCDF 規約}
257                               \textcolor{comment}{! 5.5 日時形式を参照のこと. }
258                               \textcolor{comment}{! }
259                               \textcolor{comment}{! Strings that express date and time. }
260                               \textcolor{comment}{! See gtool4 netCDF Convention }
261                               \textcolor{comment}{! 5.5 Expression of date and time for details. }
262   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: date
263                               \textcolor{comment}{! 日時情報を収めたオブジェクト. }
264                               \textcolor{comment}{! 省略した場合には, デフォルトの日時として}
265                               \textcolor{comment}{! 指定される. }
266                               \textcolor{comment}{! }
267                               \textcolor{comment}{! An object that stores information of }
268                               \textcolor{comment}{! date and time. }
269                               \textcolor{comment}{! If this is omitted, these information is }
270                               \textcolor{comment}{! set as default date and time. }
271   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
272                               \textcolor{comment}{! 例外処理用フラグ. }
273                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
274                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
275                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
276                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
277                               \textcolor{comment}{! *err* に .true. が代入されます. }
278                               \textcolor{comment}{!}
279                               \textcolor{comment}{! Exception handling flag. }
280                               \textcolor{comment}{! By default, when error occur in }
281                               \textcolor{comment}{! this procedure, the program aborts. }
282                               \textcolor{comment}{! If this *err* argument is given, }
283                               \textcolor{comment}{! .true. is substituted to *err* and }
284                               \textcolor{comment}{! the program does not abort. }
285 
286 
287   \textcolor{comment}{! 作業変数}
288   \textcolor{comment}{! Work variables}
289   \textcolor{comment}{!}
290   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal__date}{dc\_cal\_date}), \textcolor{keywordtype}{pointer}:: datep =>null()
291   \textcolor{keywordtype}{integer}:: year  \textcolor{comment}{! 年. Year.}
292   \textcolor{keywordtype}{integer}:: month \textcolor{comment}{! 月. Month.}
293   \textcolor{keywordtype}{integer}:: day   \textcolor{comment}{! 日. Day.}
294   \textcolor{keywordtype}{integer}:: hour  \textcolor{comment}{! 時. Hour.}
295   \textcolor{keywordtype}{integer}:: min   \textcolor{comment}{! 分. Minute.}
296   \textcolor{keywordtype}{real(DP)}:: sec  \textcolor{comment}{! 秒. Second.}
297   \textcolor{keywordtype}{character(TOKEN)}:: zone
298                   \textcolor{comment}{! UTC からの時差. Time-zone.}
299   \textcolor{keywordtype}{integer}:: stat
300   \textcolor{keywordtype}{character(STRING)}:: cause\_c
301   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: version = &
302     & \textcolor{stringliteral}{'$Name:  $'} // &
303     & \textcolor{stringliteral}{'$Id: dccaldatecreate.f90,v 1.3 2010-09-24 07:07:31 morikawa Exp $'}
304   character(*), \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalDateCreate2'}
305 \textcolor{keywordflow}{continue}
306   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname, version )
307   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
308   cause\_c = \textcolor{stringliteral}{''}
309 
310   \textcolor{comment}{! オブジェクトのポインタ割付}
311   \textcolor{comment}{! Associate pointer of an object}
312   \textcolor{comment}{!}
313   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( date ) ) \textcolor{keywordflow}{then}
314     datep => date
315   \textcolor{keywordflow}{else}
316     datep => \hyperlink{namespacedc__calendar__internal_a3bc8a36b4f46e738aefa1d702a571111}{default\_date}
317 \textcolor{keywordflow}{  end if}
318 
319 \textcolor{comment}{!!$  ! 初期設定のチェック}
320 \textcolor{comment}{!!$  ! Check initialization}
321 \textcolor{comment}{!!$  !}
322 \textcolor{comment}{!!$  if ( datep % initialized ) then}
323 \textcolor{comment}{!!$    stat = DC\_EALREADYINIT}
324 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL\_DATE'}
325 \textcolor{comment}{!!$    goto 999}
326 \textcolor{comment}{!!$  end if}
327 
328   \textcolor{comment}{! 日時を表現した文字列の解釈}
329   \textcolor{comment}{! Parse strings that express date and time}
330   \textcolor{comment}{!}
331   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldateparsestr}{dccaldateparsestr}( date\_str, &           \textcolor{comment}{! (in)}
332     & year, month, day, hour, min, sec, zone, & \textcolor{comment}{! (out)}
333     & err = err )                               \textcolor{comment}{! (out) optional}
334   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(err) ) \textcolor{keywordflow}{then}
335     \textcolor{keywordflow}{if} ( err ) \textcolor{keywordflow}{then}
336       stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
337       \textcolor{keywordflow}{goto} 999
338 \textcolor{keywordflow}{    end if}
339 \textcolor{keywordflow}{  end if}
340 
341   \textcolor{comment}{! オブジェクトの作成}
342   \textcolor{comment}{! Create an object}
343   \textcolor{comment}{!}
344   \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccaldatecreate}{dccaldatecreate}( &
345     & year, month, day, hour, min, sec, & \textcolor{comment}{! (in)}
346     & datep, zone, err = err )            \textcolor{comment}{! (out) optional}
347   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(err) ) \textcolor{keywordflow}{then}
348     \textcolor{keywordflow}{if} ( err ) \textcolor{keywordflow}{then}
349       stat = \hyperlink{namespacedc__error_ac7e64bb1ca445d53f1c98ab82917bc51}{dc\_ebaddate}
350       \textcolor{keywordflow}{goto} 999
351 \textcolor{keywordflow}{    end if}
352 \textcolor{keywordflow}{  end if}
353 
354   \textcolor{comment}{! 終了処理, 例外処理}
355   \textcolor{comment}{! Termination and Exception handling}
356   \textcolor{comment}{!}
357 999 \textcolor{keywordflow}{continue}
358   \textcolor{keyword}{nullify}( datep )
359   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
360   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccaldatecreate_8f90_a25e3a286eb61f6c6cbc04c995d8f5200_cgraph}
\end{center}
\end{figure}
