\hypertarget{dcdatetimecreate_8f90}{}\section{dc\+\_\+utils/dcdatetimecreate.f90 File Reference}
\label{dcdatetimecreate_8f90}\index{dc\+\_\+utils/dcdatetimecreate.\+f90@{dc\+\_\+utils/dcdatetimecreate.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a75befe68ee432089d742a2b06291b078}{dcdatetimecreate1} (time, year, mon, day, hour, min, sec, zone, zone\+\_\+hour, zone\+\_\+min, caltype, caltype\+\_\+str, day\+\_\+seconds, sclyear, sclmon, sclday, sclsec, err)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_ad22ad4d11e3e4c440d970551b06f7390}{get\+\_\+current\+\_\+time} (jyear, jmon, jday, jsec, jzone)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_ad6f53f75c7dc472fc2d3d385eb05be42}{dcdifftimecreate1} (diff, year, mon, day, hour, min, sec, day\+\_\+seconds, nondim, sclyear, sclmon, sclday, sclsec)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a4306947e2dacc1d9c8664763015f719d}{dcdifftimecreate2d} (diff, value, unit, unit\+\_\+symbol, err)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a1c05f9be8f46ccbc67b7448bc19f77af}{dcdifftimecreate2r} (diff, value, unit, unit\+\_\+symbol, err)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_abbc27202aac4dd490d5e8816d0299385}{dcdifftimecreate2i} (diff, value, unit, unit\+\_\+symbol, err)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a6e7763f111d9bc60caef743aabea4e0c}{dcdatetimecreatei} (time, sec)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a08ea8e2b03ef2fd6514af22e10747c32}{dcdatetimecreater} (time, sec)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_ab0042be762fa4fff994e94e4833d4afa}{dcdatetimecreated} (time, sec)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a41e55ed814e431bc152237ba8b17f420}{dcdifftimecreatei} (diff, sec)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a569becca14dca236805d1e614b839356}{dcdifftimecreater} (diff, sec)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a18a1770dd8c6953daa1feff6c0e1ef38}{dcdifftimecreated} (diff, sec)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a0eab109013f0a6ad9053925b48ebb4aa}{dcdatetimecreate1\+\_\+bc} (time, year, mon, day, hour, min, sec, zone, caltype, day\+\_\+seconds, err)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_a6176a6b32e692aed56ead29d83ac1d95}{dcdifftimecreate1\+\_\+bc} (diff, year, mon, day, hour, min, sec, day\+\_\+seconds)
\item 
subroutine \hyperlink{dcdatetimecreate_8f90_acd8f5d65bfc9414373abf2c786feec9c}{dcdifftimecreate2\+\_\+bc} (diff, value, unit, err)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a75befe68ee432089d742a2b06291b078}\label{dcdatetimecreate_8f90_a75befe68ee432089d742a2b06291b078}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdatetimecreate1@{dcdatetimecreate1}}
\index{dcdatetimecreate1@{dcdatetimecreate1}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdatetimecreate1()}{dcdatetimecreate1()}}
{\footnotesize\ttfamily subroutine dcdatetimecreate1 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+datetime), intent(out)}]{time,  }\item[{integer, intent(in), optional}]{year,  }\item[{integer, intent(in), optional}]{mon,  }\item[{integer, intent(in), optional}]{day,  }\item[{integer, intent(in), optional}]{hour,  }\item[{integer, intent(in), optional}]{min,  }\item[{real(dp), intent(in), optional}]{sec,  }\item[{character($\ast$), intent(in), optional}]{zone,  }\item[{integer, intent(in), optional}]{zone\+\_\+hour,  }\item[{integer, intent(in), optional}]{zone\+\_\+min,  }\item[{integer, intent(in), optional}]{caltype,  }\item[{character($\ast$), intent(in), optional}]{caltype\+\_\+str,  }\item[{real(dp), intent(in), optional}]{day\+\_\+seconds,  }\item[{type(dc\+\_\+scaled\+\_\+sec), intent(in), optional}]{sclyear,  }\item[{type(dc\+\_\+scaled\+\_\+sec), intent(in), optional}]{sclmon,  }\item[{type(dc\+\_\+scaled\+\_\+sec), intent(in), optional}]{sclday,  }\item[{type(dc\+\_\+scaled\+\_\+sec), intent(in), optional}]{sclsec,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



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



References dc\+\_\+trace\+::beginsub(), dc\+\_\+date\+\_\+types\+::cal\+\_\+cyclic, dc\+\_\+date\+\_\+types\+::cal\+\_\+gregorian, dc\+\_\+date\+\_\+types\+::cal\+\_\+julian, dc\+\_\+date\+\_\+types\+::cal\+\_\+noleap, dc\+\_\+date\+\_\+types\+::caltype, dc\+\_\+date\+\_\+types\+::cyclic\+\_\+mdays, dc\+\_\+date\+\_\+types\+::day\+\_\+seconds\+\_\+scl, dc\+\_\+error\+::dc\+\_\+ebadcaltype, dc\+\_\+error\+::dc\+\_\+ebadtimezone, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+date\+\_\+internal\+::dcdate\+\_\+set\+\_\+day\+\_\+seconds\+\_\+scl(), dc\+\_\+scaledsec\+::dcscaledsecputline(), dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+date\+\_\+types\+::flag\+\_\+set\+\_\+day\+\_\+seconds\+\_\+scl, dc\+\_\+date\+\_\+types\+::four\+\_\+years, get\+\_\+current\+\_\+time(), dc\+\_\+date\+\_\+types\+::hour\+\_\+seconds, dc\+\_\+date\+\_\+types\+::min\+\_\+seconds, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, and dc\+\_\+date\+\_\+types\+::year\+\_\+months.


\begin{DoxyCode}
16   \textcolor{comment}{!}
17   \textcolor{comment}{! dc\_date\_types#DC\_DATETIME 型変数の生成を行います.}
18   \textcolor{comment}{! 引数 *year*, *mon*, *day*, *hour*, *min*, *sec* の全てを与えない場合,}
19   \textcolor{comment}{! このサブルーチンが呼ばれた際の時刻が使用されます.}
20   \textcolor{comment}{!}
21   \textcolor{comment}{! 引数 *caltype* には暦法を設定します.}
22   \textcolor{comment}{! dc\_date\_types#CAL\_CYCLIC, dc\_date\_types#CAL\_NOLEAP, }
23   \textcolor{comment}{! dc\_date\_types#CAL\_JULIAN, dc\_date\_types#CAL\_GREGORIAN}
24   \textcolor{comment}{! のいづれかを与えてください. 引数 *caltype* を指定しない場合, 暦法は}
25   \textcolor{comment}{! dc\_date\_types#CAL\_GREGORIAN に設定されます.}
26   \textcolor{comment}{! 暦法は *caltype\_str* に文字列を与えることでも指定可能です. }
27   \textcolor{comment}{! 上記の暦法に対応する文字列は以下の通りです. (大文字小文字は区別しません)}
28   \textcolor{comment}{!}
29   \textcolor{comment}{! dc\_date\_types#CAL\_CYCLIC    :: cyclic}
30   \textcolor{comment}{! dc\_date\_types#CAL\_NOLEAP    :: noleap}
31   \textcolor{comment}{! dc\_date\_types#CAL\_JULIAN    :: julian}
32   \textcolor{comment}{! dc\_date\_types#CAL\_GREGORIAN :: gregorian}
33   \textcolor{comment}{!}
34   \textcolor{comment}{! 引数 *zone* には UTC からの時差を設定します.}
35   \textcolor{comment}{! '+09:00' や '-13:00' のように時差を 6 文字で指定してください.}
36   \textcolor{comment}{! 引数 *zone* を指定しない場合, date\_and\_time 組み込みサブルーチン}
37   \textcolor{comment}{! によって得られる時差を設定します. }
38   \textcolor{comment}{! 時差は *zone\_hour* または *zone\_min* に整数型を与えることでも}
39   \textcolor{comment}{! 指定可能です. }
40   \textcolor{comment}{!}
41   \textcolor{comment}{! 引数 *day\_seconds* には 1 日何秒かを設定します. この引数を}
42   \textcolor{comment}{! 指定しない場合, dc\_date\_types#day\_seconds の値が用いられます.}
43   \textcolor{comment}{! dc\_date\_types#day\_seconds は SetSecOfDay で変更可能です.}
44   \textcolor{comment}{!}
45   \textcolor{comment}{! 引数 *caltype* および, *zone* に不適切な値が与えられた場合,}
46   \textcolor{comment}{! エラーを発生させます.}
47   \textcolor{comment}{! 引数 *err* を与えている場合には *err* に .true. が返り,}
48   \textcolor{comment}{! プログラムは続行します.}
49   \textcolor{comment}{!}
50 
51   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}, &
52     & \hyperlink{interfacedc__date__generic_1_1validcaltype}{validcaltype}, \hyperlink{interfacedc__date__generic_1_1validzone}{validzone}, \hyperlink{interfacedc__string_1_1tochar}{tochar}
53   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__internal}{dc\_date\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__date__internal_a986d1c2850053f05ac5e05101c3a898d}{dcdate\_set\_day\_seconds\_scl}
54   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}, \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, &
55     & caltype\_default => \hyperlink{namespacedc__date__types_a53f333d57f250b428c53e2d81c077ac6}{caltype}, &
56     & \hyperlink{namespacedc__date__types_a76480c9f5c3830964e78f329d2cd0834}{flag\_set\_day\_seconds\_scl}, \hyperlink{namespacedc__date__types_a6639cadf54729d549ad335815ece6762}{day\_seconds\_scl}, &
57     & \hyperlink{namespacedc__date__types_a1b048467a83d24231df41029f3d8f30e}{cyclic\_mdays}, \hyperlink{namespacedc__date__types_a17e592b1b1e371849a4ff1a83a5cc55d}{cal\_noleap}, \hyperlink{namespacedc__date__types_afc0b0bf5152bfd5a33e2677afe1d16ee}{cal\_julian}, 
      \hyperlink{namespacedc__date__types_a3ce8040b3f1b4d71f8e6eb194811daed}{cal\_cyclic}, \hyperlink{namespacedc__date__types_a9547e9bf73750e1ee9b19e5e9d45a74d}{cal\_gregorian}, &
58     & \hyperlink{namespacedc__date__types_ab8d0e537d5aeeaaeb9c0023a54deeee4}{min\_seconds}, \hyperlink{namespacedc__date__types_a22b42c8ad86c45a1343d4c285277067d}{hour\_seconds}, \hyperlink{namespacedc__date__types_a3891fe74f25c5149084ff0860085326a}{four\_years}, 
      \hyperlink{namespacedc__date__types_a94f04fc15c5b633e99505d4b1741e6bf}{year\_months}
59   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_acb56887bf09e6518808f8f4c95650b04}{dc\_ebadcaltype}, 
      \hyperlink{namespacedc__error_ace08fdbe745eff9029a6689bde03b811}{dc\_ebadtimezone}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
60   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
61   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
62   \textcolor{keywordtype}{use }\hyperlink{namespacedc__present}{dc\_present}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__present_1_1present__select}{present\_select}
63   \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1lchar}{lchar}, \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
64   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, &
65     & \textcolor{keyword}{assignment}(=), \hyperlink{namespacedc__scaledsec_ab5dc51f7cad44a7944e7ea3953a18b25}{dcscaledsecputline}, &
66     & \textcolor{keyword}{operator}(==), \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \textcolor{keyword}{operator}(>=), \textcolor{keyword}{operator}(<=), &
67     & \textcolor{keyword}{operator}(+), \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(*), \textcolor{keyword}{operator}(/), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}, &
68     & \hyperlink{interfacedc__scaledsec_1_1abs}{abs}, \hyperlink{interfacedc__scaledsec_1_1int}{int}, \hyperlink{interfacedc__scaledsec_1_1sign}{sign}, \hyperlink{interfacedc__scaledsec_1_1floor}{floor}, \hyperlink{namespacedc__scaledsec_ab5dc51f7cad44a7944e7ea3953a18b25}{dcscaledsecputline}
69   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{,      only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
70   \textcolor{keywordtype}{implicit none}
71   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}), \textcolor{keywordtype}{intent(out)} :: time
72   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: year \textcolor{comment}{! 年}
73   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: mon  \textcolor{comment}{! 月}
74   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: day  \textcolor{comment}{! 日}
75   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: hour \textcolor{comment}{! 時}
76   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{interfacedc__date__generic_1_1min}{min}  \textcolor{comment}{! 分}
77   \textcolor{keywordtype}{real(DP)},\textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sec  \textcolor{comment}{! 秒}
78   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: zone \textcolor{comment}{! UTC からの時差}
79   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: zone\_hour \textcolor{comment}{! UTC からの時差 (時)}
80   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: zone\_min  \textcolor{comment}{! UTC からの時差 (分)}
81   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{namespacedc__date__types_a53f333d57f250b428c53e2d81c077ac6}{caltype} \textcolor{comment}{! 暦法}
82   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: caltype\_str \textcolor{comment}{! 暦法 (文字型による指定)}
83   \textcolor{keywordtype}{real(DP)},\textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: day\_seconds  \textcolor{comment}{! 1 日の秒数}
84   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sclyear \textcolor{comment}{! 年 (DC\_SCALED\_SEC 型)}
85   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sclmon  \textcolor{comment}{! 月 (DC\_SCALED\_SEC 型)}
86   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sclday  \textcolor{comment}{! 日 (DC\_SCALED\_SEC 型)}
87   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sclsec  \textcolor{comment}{! 秒 (DC\_SCALED\_SEC 型)}
88   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
89 
90   \textcolor{keywordtype}{real(DP)}:: gcsec
91   \textcolor{keywordtype}{integer} :: gcday, gcmon, gcyear
92   \textcolor{keywordtype}{real(DP)}:: essec, esds
93   \textcolor{keywordtype}{integer} :: esday
94   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: iday, imon, month, iyear, century, isec
95   \textcolor{keywordtype}{character(6)} :: izone
96   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: year\_default = 0, mon\_default = 1
97   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: day\_default = 1
98   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: sec\_default = 0
99   \textcolor{keywordtype}{logical} :: current\_time\_used
100   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}):: zonediff
101   \textcolor{keywordtype}{character(TOKEN)}:: zone\_str
102   \textcolor{keywordtype}{integer} :: stat, cause\_i
103   \textcolor{keywordtype}{character(STRING)} :: cause\_c
104   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter} :: subname = \textcolor{stringliteral}{'DCDateTimeCreate1'}
105 \textcolor{keywordflow}{continue}
106   current\_time\_used = .not. \textcolor{keyword}{present}(year) &
107     & .and. .not. \textcolor{keyword}{present}(mon) &
108     & .and. .not. \textcolor{keyword}{present}(day) &
109     & .and. .not. \textcolor{keyword}{present}(hour) &
110     & .and. .not. \textcolor{keyword}{present}(\hyperlink{interfacedc__date__generic_1_1min}{min}) &
111     & .and. .not. \textcolor{keyword}{present}(sec) &
112     & .and. .not. \textcolor{keyword}{present}(sclyear) &
113     & .and. .not. \textcolor{keyword}{present}(sclmon) &
114     & .and. .not. \textcolor{keyword}{present}(sclday) &
115     & .and. .not. \textcolor{keyword}{present}(sclsec)
116   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'current\_time\_used=<%y>'}, l=(/current\_time\_used/))
117   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
118   cause\_i = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
119   cause\_c = \textcolor{stringliteral}{''}
120 
121   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(day\_seconds) ) \textcolor{keywordflow}{then}
122     time % day\_seconds = day\_seconds
123   \textcolor{keywordflow}{else}
124     \textcolor{keywordflow}{if} ( .not. \hyperlink{namespacedc__date__types_a76480c9f5c3830964e78f329d2cd0834}{flag\_set\_day\_seconds\_scl} ) \textcolor{keyword}{call }
      \hyperlink{namespacedc__date__internal_a986d1c2850053f05ac5e05101c3a898d}{dcdate\_set\_day\_seconds\_scl}
125     time % day\_seconds = \hyperlink{namespacedc__date__types_a6639cadf54729d549ad335815ece6762}{day\_seconds\_scl}
126 \textcolor{keywordflow}{  end if}
127 
128   \textcolor{keyword}{call }\hyperlink{dcdatetimecreate_8f90_ad22ad4d11e3e4c440d970551b06f7390}{get\_current\_time}(gcyear, gcmon, gcday, gcsec, izone) \textcolor{comment}{! (out)}
129   iyear = gcyear
130   imon = gcmon
131   iday = gcday
132   isec = gcsec
133 
134   \textcolor{keywordflow}{if} (.not. current\_time\_used) \textcolor{keywordflow}{then}
135     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(zone\_hour) .or. \textcolor{keyword}{present}(zone\_min) ) \textcolor{keywordflow}{then}
136       \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}( zonediff, &     \textcolor{comment}{! (out)}
137         & hour = zone\_hour, \hyperlink{interfacedc__date__generic_1_1min}{min} = zone\_min ) \textcolor{comment}{! (in)}
138       zone\_str = \hyperlink{interfacedc__string_1_1tochar}{tochar}(zonediff)
139       \textcolor{keywordflow}{if} ( zone\_str(1:1) == \textcolor{stringliteral}{'-'} ) \textcolor{keywordflow}{then}
140         izone(1:1) = \textcolor{stringliteral}{'-'}
141       \textcolor{keywordflow}{else}
142         izone(1:1) = \textcolor{stringliteral}{'+'}
143 \textcolor{keywordflow}{      end if}
144       izone(2:6) = zone\_str(13:17)
145 \textcolor{keywordflow}{    end if}
146     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(zone)) \textcolor{keywordflow}{then}
147       izone = zone
148 \textcolor{keywordflow}{    end if}
149     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacedc__date__generic_1_1validzone}{validzone}(izone)) \textcolor{keywordflow}{then}
150       stat = \hyperlink{namespacedc__error_ace08fdbe745eff9029a6689bde03b811}{dc\_ebadtimezone}
151       cause\_c = izone
152       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(err)) \textcolor{keywordflow}{then}
153         \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, &
154           & \textcolor{stringliteral}{'zone=<%c> is invalid.'}, &
155           & c1=trim(izone))
156       \textcolor{keywordflow}{else}
157         \textcolor{keywordflow}{goto} 999
158 \textcolor{keywordflow}{      end if}
159 \textcolor{keywordflow}{    end if}
160 
161     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclsec) ) \textcolor{keywordflow}{then}
162       isec = sclsec
163     \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(sec) ) \textcolor{keywordflow}{then}
164       isec = sec
165     \textcolor{keywordflow}{else}
166       isec = sec\_default
167 \textcolor{keywordflow}{    end if}
168     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(\hyperlink{interfacedc__date__generic_1_1min}{min})) \textcolor{keywordflow}{then}
169       isec = isec + \hyperlink{interfacedc__date__generic_1_1min}{min} * \hyperlink{namespacedc__date__types_ab8d0e537d5aeeaaeb9c0023a54deeee4}{min\_seconds}
170 \textcolor{keywordflow}{    end if}
171     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(hour)) \textcolor{keywordflow}{then}
172       isec = isec + hour * \hyperlink{namespacedc__date__types_a22b42c8ad86c45a1343d4c285277067d}{hour\_seconds}
173 \textcolor{keywordflow}{    end if}
174 
175     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclday) ) \textcolor{keywordflow}{then}
176       iday = sclday
177     \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(day) ) \textcolor{keywordflow}{then}
178       iday = day
179     \textcolor{keywordflow}{else}
180       iday = day\_default
181 \textcolor{keywordflow}{    end if}
182 
183     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclday) ) \textcolor{keywordflow}{then}
184       iday = sclday
185     \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(day) ) \textcolor{keywordflow}{then}
186       iday = day
187     \textcolor{keywordflow}{else}
188       iday = day\_default
189 \textcolor{keywordflow}{    end if}
190     iday = iday + \hyperlink{interfacedc__scaledsec_1_1floor}{floor}(isec / time % day\_seconds)
191 
192     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclmon) ) \textcolor{keywordflow}{then}
193       imon = sclmon
194     \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(mon) ) \textcolor{keywordflow}{then}
195       imon = mon
196     \textcolor{keywordflow}{else}
197       imon = mon\_default
198 \textcolor{keywordflow}{    end if}
199 
200     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclyear) ) \textcolor{keywordflow}{then}
201       iyear = sclyear
202     \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(year) ) \textcolor{keywordflow}{then}
203       iyear = year
204     \textcolor{keywordflow}{else}
205       iyear = year\_default
206 \textcolor{keywordflow}{    end if}
207 \textcolor{keywordflow}{  end if}
208 
209   time % zone = izone
210   time % sec = \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}(isec, time % day\_seconds)
211   time % caltype = caltype\_default
212   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(caltype\_str)) \textcolor{keywordflow}{then}
213     \textcolor{keywordflow}{select case}( \hyperlink{interfacedc__string_1_1lchar}{lchar}(trim(caltype\_str)) )
214     \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'cyclic'})
215       time % caltype = \hyperlink{namespacedc__date__types_a3ce8040b3f1b4d71f8e6eb194811daed}{cal\_cyclic}
216     \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'noleap'})
217       time % caltype = \hyperlink{namespacedc__date__types_a17e592b1b1e371849a4ff1a83a5cc55d}{cal\_noleap}
218     \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'julian'})
219       time % caltype = \hyperlink{namespacedc__date__types_afc0b0bf5152bfd5a33e2677afe1d16ee}{cal\_julian}
220     \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'gregorian'})
221       time % caltype = \hyperlink{namespacedc__date__types_a9547e9bf73750e1ee9b19e5e9d45a74d}{cal\_gregorian}
222     \textcolor{keywordflow}{case}(\textcolor{stringliteral}{''})
223       time % caltype = \hyperlink{namespacedc__date__types_a9547e9bf73750e1ee9b19e5e9d45a74d}{cal\_gregorian}
224 \textcolor{keywordflow}{    case default}
225       stat = \hyperlink{namespacedc__error_acb56887bf09e6518808f8f4c95650b04}{dc\_ebadcaltype}
226       cause\_i = 0
227       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, &
228         & \textcolor{stringliteral}{'caltype=<%c> is invalid calender type.'}, &
229         & c1 = trim(caltype\_str) )
230       \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{present}(err) ) \textcolor{keywordflow}{then}
231         \textcolor{keywordflow}{goto} 999
232 \textcolor{keywordflow}{      end if}
233 \textcolor{keywordflow}{    end select}
234 \textcolor{keywordflow}{  end if}
235 
236   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(\hyperlink{namespacedc__date__types_a53f333d57f250b428c53e2d81c077ac6}{caltype})) \textcolor{keywordflow}{then}
237     \textcolor{keywordflow}{if} (\hyperlink{interfacedc__date__generic_1_1validcaltype}{validcaltype}(\hyperlink{namespacedc__date__types_a53f333d57f250b428c53e2d81c077ac6}{caltype})) \textcolor{keywordflow}{then}
238       time % caltype = \hyperlink{namespacedc__date__types_a53f333d57f250b428c53e2d81c077ac6}{caltype}
239     \textcolor{keywordflow}{else}
240       stat = \hyperlink{namespacedc__error_acb56887bf09e6518808f8f4c95650b04}{dc\_ebadcaltype}
241       cause\_i = \hyperlink{namespacedc__date__types_a53f333d57f250b428c53e2d81c077ac6}{caltype}
242       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(err)) \textcolor{keywordflow}{then}
243         \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, &
244           & \textcolor{stringliteral}{'caltype=<%d> is invalid calender type.'}, &
245           & i=(/\hyperlink{namespacedc__date__types_a53f333d57f250b428c53e2d81c077ac6}{caltype}/))
246       \textcolor{keywordflow}{else}
247         \textcolor{keywordflow}{goto} 999
248 \textcolor{keywordflow}{      end if}
249 \textcolor{keywordflow}{    end if}
250 \textcolor{keywordflow}{  end if}
251   \textcolor{keywordflow}{if} (time % caltype == \hyperlink{namespacedc__date__types_a3ce8040b3f1b4d71f8e6eb194811daed}{cal\_cyclic}) \textcolor{keywordflow}{then}
252     time % day = \hyperlink{interfacedc__scaledsec_1_1int}{int}( iday + imon * \hyperlink{namespacedc__date__types_a1b048467a83d24231df41029f3d8f30e}{cyclic\_mdays} )
253     \textcolor{keywordflow}{goto} 999
254 \textcolor{keywordflow}{  endif}
255   month = \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}(imon - 3, \hyperlink{namespacedc__date__types_a94f04fc15c5b633e99505d4b1741e6bf}{year\_months}) + 3
256   iyear = iyear + \hyperlink{interfacedc__scaledsec_1_1int}{int}( (imon - month) / \hyperlink{namespacedc__date__types_a94f04fc15c5b633e99505d4b1741e6bf}{year\_months} )
257   iday = iday + \hyperlink{interfacedc__scaledsec_1_1int}{int}( (month * 306 - 914) / 10 )
258   \textcolor{keywordflow}{if} (time % caltype == \hyperlink{namespacedc__date__types_a17e592b1b1e371849a4ff1a83a5cc55d}{cal\_noleap}) \textcolor{keywordflow}{then}
259     time % day = iday + iyear * 365 + 90
260   \textcolor{keywordflow}{else}
261     iday = iday + \hyperlink{interfacedc__scaledsec_1_1int}{int}( (iyear * \hyperlink{namespacedc__date__types_a3891fe74f25c5149084ff0860085326a}{four\_years} - \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}(iyear * 
      \hyperlink{namespacedc__date__types_a3891fe74f25c5149084ff0860085326a}{four\_years}, 4)) / 4 )
262     \textcolor{keywordflow}{if} (time % caltype == \hyperlink{namespacedc__date__types_afc0b0bf5152bfd5a33e2677afe1d16ee}{cal\_julian} .or. iday < 640116) \textcolor{keywordflow}{then}
263       time % day = iday + 91
264     \textcolor{keywordflow}{else}
265       century = (iyear - \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}(iyear, 100)) / 100 + 1
266       time % day = iday - \hyperlink{interfacedc__scaledsec_1_1int}{int}( (century * 3 - \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}(century * 3, 4)) / 4 ) + 93
267 \textcolor{keywordflow}{    endif}
268 \textcolor{keywordflow}{  endif}
269 
270 
271 999 \textcolor{keywordflow}{continue}
272   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c, cause\_i)
273   esday = time % day ; essec = time % sec ; esds = time % day\_seconds
274   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{'time (caltype=%d, day=%d, sec=%f, zone=%c, day\_seconds=%f)'}, &
275     & i=(/time % caltype, esday/), d=(/essec, esds/), &
276     & c1=trim(time % zone))
277 
278   \textcolor{keyword}{contains}
279 \textcolor{keyword}{    subroutine }\hyperlink{dcdatetimecreate_8f90_ad22ad4d11e3e4c440d970551b06f7390}{get\_current\_time}(jyear, jmon, jday, jsec, jzone)
280       \textcolor{comment}{!}
281       \textcolor{comment}{! date\_and\_time 組み込みサブルーチンを用いて, 現在}
282       \textcolor{comment}{! 時刻と UTC からの時差を返します.}
283       \textcolor{comment}{!}
284       \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
285       \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1stod}{stod}
286       \textcolor{keywordtype}{implicit none}
287       \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)} :: jyear, jmon, jday
288       \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(out)} :: jsec
289       \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)} :: jzone
290 
291       \textcolor{keywordtype}{integer} :: date\_time\_values(1:8)
292       \textcolor{keywordtype}{character(5)}  :: zone\_raw
293     \textcolor{keywordflow}{continue}
294 
295       \textcolor{keyword}{call }date\_and\_time(zone=zone\_raw, values=date\_time\_values)
296 
297       jzone = zone\_raw(1:3) // \textcolor{stringliteral}{":"} // zone\_raw(4:5)
298 
299       jyear = date\_time\_values(1)
300       jmon  = date\_time\_values(2)
301       jday  = date\_time\_values(3)
302       jsec  = \textcolor{keywordtype}{real(date\_time\_values(5), DP)} * \hyperlink{namespacedc__date__types_a22b42c8ad86c45a1343d4c285277067d}{hour\_seconds} &
303         &     + real(date\_time\_values(6), DP) * MIN\_SECONDS &
304         &     + real(date\_time\_values(7), DP)
305 
306 \textcolor{keyword}{    end subroutine }\hyperlink{dcdatetimecreate_8f90_ad22ad4d11e3e4c440d970551b06f7390}{get\_current\_time}
307 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dcdatetimecreate_8f90_a75befe68ee432089d742a2b06291b078_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a0eab109013f0a6ad9053925b48ebb4aa}\label{dcdatetimecreate_8f90_a0eab109013f0a6ad9053925b48ebb4aa}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdatetimecreate1\+\_\+bc@{dcdatetimecreate1\+\_\+bc}}
\index{dcdatetimecreate1\+\_\+bc@{dcdatetimecreate1\+\_\+bc}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdatetimecreate1\+\_\+bc()}{dcdatetimecreate1\_bc()}}
{\footnotesize\ttfamily subroutine dcdatetimecreate1\+\_\+bc (\begin{DoxyParamCaption}\item[{type(dc\+\_\+datetime), intent(out)}]{time,  }\item[{integer, intent(in), optional}]{year,  }\item[{integer, intent(in), optional}]{mon,  }\item[{integer, intent(in), optional}]{day,  }\item[{integer, intent(in), optional}]{hour,  }\item[{integer, intent(in), optional}]{min,  }\item[{real(dp), intent(in), optional}]{sec,  }\item[{character($\ast$), intent(in), optional}]{zone,  }\item[{integer, intent(in), optional}]{caltype,  }\item[{real(dp), intent(in), optional}]{day\+\_\+seconds,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 678 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
678   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
679   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
680   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}
681   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}), \textcolor{keywordtype}{intent(out)}:: time
682   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: year, mon, day, hour, \hyperlink{interfacedc__date__generic_1_1min}{min}
683   \textcolor{keywordtype}{real(DP)},\textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sec, day\_seconds
684   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: zone
685   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: caltype
686   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
687 \textcolor{keywordflow}{continue}
688   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}( time, &
689     & year, mon, day, hour, \hyperlink{interfacedc__date__generic_1_1min}{min}, sec, &
690     & zone, caltype, day\_seconds = day\_seconds, err = err )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_ab0042be762fa4fff994e94e4833d4afa}\label{dcdatetimecreate_8f90_ab0042be762fa4fff994e94e4833d4afa}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdatetimecreated@{dcdatetimecreated}}
\index{dcdatetimecreated@{dcdatetimecreated}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdatetimecreated()}{dcdatetimecreated()}}
{\footnotesize\ttfamily subroutine dcdatetimecreated (\begin{DoxyParamCaption}\item[{type(dc\+\_\+datetime), intent(out)}]{time,  }\item[{real(dp), intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 614 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
614   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
615   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
616   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}
617   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, \textcolor{keyword}{assignment}(=)
618   \textcolor{keywordtype}{implicit none}
619   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}), \textcolor{keywordtype}{intent(out)}:: time
620   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec
621 \textcolor{keywordflow}{continue}
622   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}(time, sec = sec)
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a6e7763f111d9bc60caef743aabea4e0c}\label{dcdatetimecreate_8f90_a6e7763f111d9bc60caef743aabea4e0c}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdatetimecreatei@{dcdatetimecreatei}}
\index{dcdatetimecreatei@{dcdatetimecreatei}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdatetimecreatei()}{dcdatetimecreatei()}}
{\footnotesize\ttfamily subroutine dcdatetimecreatei (\begin{DoxyParamCaption}\item[{type(dc\+\_\+datetime), intent(out)}]{time,  }\item[{integer, intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 580 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
580   \textcolor{comment}{!}
581   \textcolor{comment}{! dc\_date\_types#DC\_DATETIME 型変数の生成を行います.}
582   \textcolor{comment}{! 引数 sec には秒数を与えてください. 年月日, 時分を使って}
583   \textcolor{comment}{! 指定を行いたい場合は Create を利用してください.}
584   \textcolor{comment}{!}
585   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
586   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
587   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}
588   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, \textcolor{keyword}{assignment}(=)
589   \textcolor{keywordtype}{implicit none}
590   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}), \textcolor{keywordtype}{intent(out)}:: time
591   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: sec
592 \textcolor{keywordflow}{continue}
593   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}(time, sec = \textcolor{keywordtype}{real(sec, DP)} )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a08ea8e2b03ef2fd6514af22e10747c32}\label{dcdatetimecreate_8f90_a08ea8e2b03ef2fd6514af22e10747c32}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdatetimecreater@{dcdatetimecreater}}
\index{dcdatetimecreater@{dcdatetimecreater}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdatetimecreater()}{dcdatetimecreater()}}
{\footnotesize\ttfamily subroutine dcdatetimecreater (\begin{DoxyParamCaption}\item[{type(dc\+\_\+datetime), intent(out)}]{time,  }\item[{real, intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 597 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
597   \textcolor{comment}{!}
598   \textcolor{comment}{! dc\_date\_types#DC\_DATETIME 型変数の生成を行います.}
599   \textcolor{comment}{! 引数 sec には秒数を与えてください. 年月日, 時分を使って}
600   \textcolor{comment}{! 指定を行いたい場合は Create を利用してください.}
601   \textcolor{comment}{!}
602   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
603   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
604   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}
605   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, \textcolor{keyword}{assignment}(=)
606   \textcolor{keywordtype}{implicit none}
607   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}), \textcolor{keywordtype}{intent(out)}:: time
608   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: sec
609 \textcolor{keywordflow}{continue}
610   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}(time, sec = \textcolor{keywordtype}{real(sec, DP)} )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_ad6f53f75c7dc472fc2d3d385eb05be42}\label{dcdatetimecreate_8f90_ad6f53f75c7dc472fc2d3d385eb05be42}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreate1@{dcdifftimecreate1}}
\index{dcdifftimecreate1@{dcdifftimecreate1}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreate1()}{dcdifftimecreate1()}}
{\footnotesize\ttfamily subroutine dcdifftimecreate1 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{integer, intent(in), optional}]{year,  }\item[{integer, intent(in), optional}]{mon,  }\item[{integer, intent(in), optional}]{day,  }\item[{integer, intent(in), optional}]{hour,  }\item[{integer, intent(in), optional}]{min,  }\item[{real(dp), intent(in), optional}]{sec,  }\item[{real(dp), intent(in), optional}]{day\+\_\+seconds,  }\item[{real(dp), intent(in), optional}]{nondim,  }\item[{type(dc\+\_\+scaled\+\_\+sec), intent(in), optional}]{sclyear,  }\item[{type(dc\+\_\+scaled\+\_\+sec), intent(in), optional}]{sclmon,  }\item[{type(dc\+\_\+scaled\+\_\+sec), intent(in), optional}]{sclday,  }\item[{type(dc\+\_\+scaled\+\_\+sec), intent(in), optional}]{sclsec }\end{DoxyParamCaption})}



Definition at line 314 of file dcdatetimecreate.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+date\+\_\+types\+::day\+\_\+seconds, dc\+\_\+date\+\_\+internal\+::dcdate\+\_\+normalize(), dc\+\_\+scaledsec\+::dcscaledsecputline(), dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+date\+\_\+types\+::hour\+\_\+seconds, dc\+\_\+date\+\_\+types\+::min\+\_\+seconds, dc\+\_\+types\+::string, and dc\+\_\+date\+\_\+types\+::year\+\_\+months.


\begin{DoxyCode}
314   \textcolor{comment}{!}
315   \textcolor{comment}{! dc\_date\_types#DC\_DIFFTIME 型変数の生成を行います.}
316   \textcolor{comment}{! 引数 year, mon, day, hour, min, sec, nondim を与えない場合,}
317   \textcolor{comment}{! 0 が与えられたことになります.}
318   \textcolor{comment}{!}
319   \textcolor{comment}{! 引数 *day\_seconds* には 1 日何秒かを設定します. この引数を}
320   \textcolor{comment}{! 指定しない場合, dc\_date\_types#day\_seconds の値が用いられます.}
321   \textcolor{comment}{! dc\_date\_types#day\_seconds は SetSecOfDay で変更可能です.}
322   \textcolor{comment}{!}
323   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__internal}{dc\_date\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__date__internal_ac3f0935623089b447b453928ff99b788}{dcdate\_normalize}
324   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1validcaltype}{validcaltype}
325   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, &
326     & day\_seconds\_default => \hyperlink{namespacedc__date__types_a4a0b5df0058a97b5f9e071ecb0fb7aa7}{day\_seconds}, &
327     & \hyperlink{namespacedc__date__types_ab8d0e537d5aeeaaeb9c0023a54deeee4}{min\_seconds}, \hyperlink{namespacedc__date__types_a22b42c8ad86c45a1343d4c285277067d}{hour\_seconds}, \hyperlink{namespacedc__date__types_a94f04fc15c5b633e99505d4b1741e6bf}{year\_months}
328   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
329   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{interfacedc__trace_1_1debug}{debug}
330   \textcolor{keywordtype}{use }\hyperlink{namespacedc__present}{dc\_present}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__present_1_1present__select}{present\_select}
331   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, &
332     & \textcolor{keyword}{assignment}(=), \hyperlink{namespacedc__scaledsec_ab5dc51f7cad44a7944e7ea3953a18b25}{dcscaledsecputline}, &
333     & \textcolor{keyword}{operator}(==), \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \textcolor{keyword}{operator}(>=), \textcolor{keyword}{operator}(<=), &
334     & \textcolor{keyword}{operator}(+), \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(*), \textcolor{keyword}{operator}(/), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}, &
335     & \hyperlink{interfacedc__scaledsec_1_1abs}{abs}, \hyperlink{interfacedc__scaledsec_1_1int}{int}, \hyperlink{interfacedc__scaledsec_1_1sign}{sign}, \hyperlink{interfacedc__scaledsec_1_1floor}{floor}
336   \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
337   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{,      only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
338   \textcolor{keywordtype}{implicit none}
339   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)} :: diff
340   \textcolor{keywordtype}{integer},  \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: year \textcolor{comment}{! 年. Year}
341   \textcolor{keywordtype}{integer},  \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: mon  \textcolor{comment}{! 月. Month}
342   \textcolor{keywordtype}{integer},  \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: day  \textcolor{comment}{! 日. Day}
343   \textcolor{keywordtype}{integer},  \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: hour \textcolor{comment}{! 時. Hour}
344   \textcolor{keywordtype}{integer},  \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{interfacedc__date__generic_1_1min}{min}  \textcolor{comment}{! 分. Minute}
345   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sec  \textcolor{comment}{! 秒. Second}
346   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{namespacedc__date__types_a4a0b5df0058a97b5f9e071ecb0fb7aa7}{day\_seconds}  \textcolor{comment}{! 1 日の秒数}
347   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: nondim  \textcolor{comment}{! 無次元時間. Nondimensional time}
348   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sclyear \textcolor{comment}{! 年 (DC\_SCALED\_SEC 型)}
349   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sclmon  \textcolor{comment}{! 月 (DC\_SCALED\_SEC 型)}
350   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sclday  \textcolor{comment}{! 日 (DC\_SCALED\_SEC 型)}
351   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sclsec  \textcolor{comment}{! 秒 (DC\_SCALED\_SEC 型)}
352 
353   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: iyear, imon, iday, ihour, imin, isec
354   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: year\_default = 0, mon\_default = 0
355   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: day\_default = 0, hour\_default = 0, min\_default = 0
356   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: sec\_default = 0
357   \textcolor{keywordtype}{real(DP)}:: essec, esds
358   \textcolor{keywordtype}{integer} :: esmon, esday
359   \textcolor{keywordtype}{character(STRING)}:: endsub\_msb
360   \textcolor{keywordtype}{logical}:: dbg\_mode
361   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter} :: subname = \textcolor{stringliteral}{'DCDiffTimeCreate1'}
362 \textcolor{keywordflow}{continue}
363   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname)
364 
365   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(nondim) ) \textcolor{keywordflow}{then}
366     diff % nondim\_flag = .true.
367     diff % mon = 0
368     diff % day = 0
369     diff % sec = nondim
370     \textcolor{keywordflow}{goto} 999
371   \textcolor{keywordflow}{else}
372     diff % nondim\_flag = .false.
373 \textcolor{keywordflow}{  end if}
374 
375   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclyear) ) \textcolor{keywordflow}{then}
376     iyear = sclyear
377   \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(year) ) \textcolor{keywordflow}{then}
378     iyear = year
379   \textcolor{keywordflow}{else}
380     iyear = year\_default
381 \textcolor{keywordflow}{  end if}
382 
383   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclmon) ) \textcolor{keywordflow}{then}
384     imon = sclmon
385   \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(mon) ) \textcolor{keywordflow}{then}
386     imon = mon
387   \textcolor{keywordflow}{else}
388     imon = mon\_default
389 \textcolor{keywordflow}{  end if}
390   
391   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclday) ) \textcolor{keywordflow}{then}
392     iday = sclday
393   \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(day) ) \textcolor{keywordflow}{then}
394     iday = day
395   \textcolor{keywordflow}{else}
396     iday = day\_default
397 \textcolor{keywordflow}{  end if}
398 
399   ihour = \hyperlink{interfacedc__present_1_1present__select}{present\_select}(.false., hour\_default, hour)
400   imin  = \hyperlink{interfacedc__present_1_1present__select}{present\_select}(.false., min\_default, \hyperlink{interfacedc__date__generic_1_1min}{min})
401 
402   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(sclsec) ) \textcolor{keywordflow}{then}
403     isec = sclsec
404   \textcolor{keywordflow}{elseif}( \textcolor{keyword}{present}(sec) ) \textcolor{keywordflow}{then}
405     isec = sec
406   \textcolor{keywordflow}{else}
407     isec = sec\_default
408 \textcolor{keywordflow}{  end if}
409 
410   diff % mon = iyear * \hyperlink{namespacedc__date__types_a94f04fc15c5b633e99505d4b1741e6bf}{year\_months} + imon
411   diff % day = iday
412   diff % sec =   ihour * \hyperlink{namespacedc__date__types_a22b42c8ad86c45a1343d4c285277067d}{hour\_seconds} &
413     &          + imin  * \hyperlink{namespacedc__date__types_ab8d0e537d5aeeaaeb9c0023a54deeee4}{min\_seconds} &
414     &          + isec
415 
416   \textcolor{keywordflow}{if}( \textcolor{keyword}{present}(\hyperlink{namespacedc__date__types_a4a0b5df0058a97b5f9e071ecb0fb7aa7}{day\_seconds}) ) \textcolor{keywordflow}{then}
417     diff % day\_seconds = \hyperlink{namespacedc__date__types_a4a0b5df0058a97b5f9e071ecb0fb7aa7}{day\_seconds}
418   \textcolor{keywordflow}{else}
419     diff % day\_seconds = day\_seconds\_default
420 \textcolor{keywordflow}{  end if}
421 
422   \textcolor{keyword}{call }\hyperlink{namespacedc__date__internal_ac3f0935623089b447b453928ff99b788}{dcdate\_normalize}(diff % day, diff % sec, diff % day\_seconds, diff % nondim\_flag)
423 
424 999 \textcolor{keywordflow}{continue}
425   \textcolor{keyword}{call }\hyperlink{interfacedc__trace_1_1debug}{debug}( dbg\_mode )
426   \textcolor{keywordflow}{if} ( dbg\_mode ) \textcolor{keywordflow}{then}
427     esmon = diff % mon ; esday = diff % day
428     essec = diff % sec ; esds = diff % day\_seconds
429 \textcolor{keyword}{    end}sub\_msb = &
430       & \hyperlink{interfacedc__string_1_1cprintf}{cprintf}( \textcolor{stringliteral}{'mon=%d, day=%d, sec=%f, day\_seconds=%f, nondim\_flag=%b'}, &
431       &          i = (/ esmon, esday /), d = (/ essec, esds /), &
432       &          l = (/ diff % nondim\_flag /) )
433   \textcolor{keywordflow}{else}
434 \textcolor{keyword}{    end}sub\_msb = \textcolor{stringliteral}{''}
435 \textcolor{keywordflow}{  end if}
436   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{'diff (%c)'}, c1 = trim(endsub\_msb) )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dcdatetimecreate_8f90_ad6f53f75c7dc472fc2d3d385eb05be42_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a6176a6b32e692aed56ead29d83ac1d95}\label{dcdatetimecreate_8f90_a6176a6b32e692aed56ead29d83ac1d95}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreate1\+\_\+bc@{dcdifftimecreate1\+\_\+bc}}
\index{dcdifftimecreate1\+\_\+bc@{dcdifftimecreate1\+\_\+bc}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreate1\+\_\+bc()}{dcdifftimecreate1\_bc()}}
{\footnotesize\ttfamily subroutine dcdifftimecreate1\+\_\+bc (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{integer, intent(in), optional}]{year,  }\item[{integer, intent(in), optional}]{mon,  }\item[{integer, intent(in), optional}]{day,  }\item[{integer, intent(in), optional}]{hour,  }\item[{integer, intent(in), optional}]{min,  }\item[{real(dp), intent(in), optional}]{sec,  }\item[{real(dp), intent(in), optional}]{day\+\_\+seconds }\end{DoxyParamCaption})}



Definition at line 695 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
695   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
696   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
697   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}
698   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)} :: diff
699   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: year, mon, day, hour, \hyperlink{interfacedc__date__generic_1_1min}{min}
700   \textcolor{keywordtype}{real(DP)},\textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: sec, day\_seconds
701 \textcolor{keywordflow}{continue}
702   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}( diff, &
703     & year, mon, day, hour, \hyperlink{interfacedc__date__generic_1_1min}{min}, sec, day\_seconds )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_acd8f5d65bfc9414373abf2c786feec9c}\label{dcdatetimecreate_8f90_acd8f5d65bfc9414373abf2c786feec9c}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreate2\+\_\+bc@{dcdifftimecreate2\+\_\+bc}}
\index{dcdifftimecreate2\+\_\+bc@{dcdifftimecreate2\+\_\+bc}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreate2\+\_\+bc()}{dcdifftimecreate2\_bc()}}
{\footnotesize\ttfamily subroutine dcdifftimecreate2\+\_\+bc (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{real(dp), intent(in)}]{value,  }\item[{character($\ast$), intent(in)}]{unit,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 707 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
707   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
708   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
709   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}
710   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)} :: diff
711   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)} :: value
712   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: unit
713   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
714 \textcolor{keywordflow}{continue}
715   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}( diff, \textcolor{keywordtype}{value}, unit, err = err )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a4306947e2dacc1d9c8664763015f719d}\label{dcdatetimecreate_8f90_a4306947e2dacc1d9c8664763015f719d}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreate2d@{dcdifftimecreate2d}}
\index{dcdifftimecreate2d@{dcdifftimecreate2d}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreate2d()}{dcdifftimecreate2d()}}
{\footnotesize\ttfamily subroutine dcdifftimecreate2d (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{real(dp), intent(in)}]{value,  }\item[{character($\ast$), intent(in)}]{unit,  }\item[{integer, intent(in), optional}]{unit\+\_\+symbol,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 441 of file dcdatetimecreate.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+date\+\_\+types\+::cyclic\+\_\+mdays, dc\+\_\+date\+\_\+types\+::day\+\_\+seconds, dc\+\_\+error\+::dc\+\_\+ebadunit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+scaledsec\+::dcscaledsecputline(), dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+date\+\_\+types\+::hour\+\_\+seconds, dc\+\_\+date\+\_\+types\+::min\+\_\+seconds, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+day, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+err, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+hour, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+min, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+month, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+nondim, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+sec, dc\+\_\+date\+\_\+types\+::unit\+\_\+symbol\+\_\+year, and dc\+\_\+date\+\_\+types\+::year\+\_\+months.


\begin{DoxyCode}
441   \textcolor{comment}{!}
442   \textcolor{comment}{! dc\_date\_types#DC\_DIFFTIME 型変数の生成を行います.}
443   \textcolor{comment}{! 引数 *value* に数値を, *unit* に単位を表す文字列を, }
444   \textcolor{comment}{! または *unit\_symbol* に単位を表すシンボルを与えてください.}
445   \textcolor{comment}{! }
446   \textcolor{comment}{! unit に指定できるのは以下の文字列です. (大文字小文字は区別しません).}
447   \textcolor{comment}{!}
448   \textcolor{comment}{! 年         :: dc\_date\_types#UNIT\_YEAR}
449   \textcolor{comment}{! 月         :: dc\_date\_types#UNIT\_MONTH}
450   \textcolor{comment}{! 日         :: dc\_date\_types#UNIT\_DAY}
451   \textcolor{comment}{! 時         :: dc\_date\_types#UNIT\_HOUR}
452   \textcolor{comment}{! 分         :: dc\_date\_types#UNIT\_MIN}
453   \textcolor{comment}{! 秒         :: dc\_date\_types#UNIT\_SEC}
454   \textcolor{comment}{! 無次元時間 :: dc\_date\_types#UNIT\_NONDIM}
455   \textcolor{comment}{!}
456   \textcolor{comment}{! これらに該当しない文字列を *unit* に与えた場合, エラーを発生させます.}
457   \textcolor{comment}{!}
458   \textcolor{comment}{! unit\_symbol に指定できるのは以下のシンボルです.}
459   \textcolor{comment}{!}
460   \textcolor{comment}{! 年         :: dc\_date\_types#UNIT\_SYMBOL\_YEAR}
461   \textcolor{comment}{! 月         :: dc\_date\_types#UNIT\_SYMBOL\_MONTH}
462   \textcolor{comment}{! 日         :: dc\_date\_types#UNIT\_SYMBOL\_DAY}
463   \textcolor{comment}{! 時         :: dc\_date\_types#UNIT\_SYMBOL\_HOUR}
464   \textcolor{comment}{! 分         :: dc\_date\_types#UNIT\_SYMBOL\_MIN}
465   \textcolor{comment}{! 秒         :: dc\_date\_types#UNIT\_SYMBOL\_SEC}
466   \textcolor{comment}{! 無次元時間 :: dc\_date\_types#UNIT\_SYMBOL\_NONDIM}
467   \textcolor{comment}{!}
468   \textcolor{comment}{! これらに該当しないシンボルを *unit\_symbol* に与えた場合, }
469   \textcolor{comment}{! エラーを発生させます. }
470   \textcolor{comment}{!}
471   \textcolor{comment}{! 引数 *err* を与えている場合には *err* に .true. が返り,}
472   \textcolor{comment}{! プログラムは続行します.}
473   \textcolor{comment}{!}
474   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
475   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
476   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
477   \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1strieq}{strieq}
478   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}, 
      \hyperlink{interfacedc__date__generic_1_1parsetimeunits}{parsetimeunits}
479   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, &
480     & \hyperlink{namespacedc__date__types_af2214286fd54dcc9bc46201851b71794}{unit\_symbol\_year}, \hyperlink{namespacedc__date__types_a2854b3d01fa0384ce83a7eb5a46c0b63}{unit\_symbol\_month}, 
      \hyperlink{namespacedc__date__types_adc87b2279e8fefa8078ad877ad14194e}{unit\_symbol\_day}, &
481     & \hyperlink{namespacedc__date__types_a10df725fcb094ad0a2f868a93b6ce34c}{unit\_symbol\_hour}, \hyperlink{namespacedc__date__types_a129f0ebca6e22dfe96af2934e39eaae3}{unit\_symbol\_min}, 
      \hyperlink{namespacedc__date__types_a5dbd685bd8334def6bf91a9f86e6a2a3}{unit\_symbol\_sec}, \hyperlink{namespacedc__date__types_a641f4a9cbf26e15fc8e026c9bdea5222}{unit\_symbol\_nondim}, &
482     & \hyperlink{namespacedc__date__types_a079bd1036fe904752c0423b145cdff22}{unit\_symbol\_err}, &
483     & \hyperlink{namespacedc__date__types_ab8d0e537d5aeeaaeb9c0023a54deeee4}{min\_seconds}, \hyperlink{namespacedc__date__types_a22b42c8ad86c45a1343d4c285277067d}{hour\_seconds}, \hyperlink{namespacedc__date__types_a4a0b5df0058a97b5f9e071ecb0fb7aa7}{day\_seconds}, 
      \hyperlink{namespacedc__date__types_a1b048467a83d24231df41029f3d8f30e}{cyclic\_mdays}, \hyperlink{namespacedc__date__types_a94f04fc15c5b633e99505d4b1741e6bf}{year\_months}
484   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, &
485     & \textcolor{keyword}{assignment}(=), \hyperlink{namespacedc__scaledsec_ab5dc51f7cad44a7944e7ea3953a18b25}{dcscaledsecputline}, &
486     & \textcolor{keyword}{operator}(==), \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \textcolor{keyword}{operator}(>=), \textcolor{keyword}{operator}(<=), &
487     & \textcolor{keyword}{operator}(+), \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(*), \textcolor{keyword}{operator}(/), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}, &
488     & \hyperlink{interfacedc__scaledsec_1_1abs}{abs}, \hyperlink{interfacedc__scaledsec_1_1int}{int}, \hyperlink{interfacedc__scaledsec_1_1sign}{sign}, \hyperlink{interfacedc__scaledsec_1_1floor}{floor}
489   \textcolor{keywordtype}{implicit none}
490   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)} :: diff
491   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)} :: value
492   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: unit
493   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: unit\_symbol
494   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
495 
496   \textcolor{keywordtype}{real(DP)}:: essec
497   \textcolor{keywordtype}{integer} :: esmon, esday
498   \textcolor{keywordtype}{integer} :: stat, val\_int
499   \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: val\_scl, val\_dec
500   \textcolor{keywordtype}{character(STRING)} :: cause\_c
501   \textcolor{keywordtype}{integer}:: symbol
502 
503   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter} :: subname = \textcolor{stringliteral}{'DCDiffTimeCreate2'}
504 \textcolor{keywordflow}{continue}
505   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'value=%f'}, d=(/\textcolor{keywordtype}{value}/))
506   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
507   cause\_c = \textcolor{stringliteral}{''}
508   symbol = \hyperlink{namespacedc__date__types_a079bd1036fe904752c0423b145cdff22}{unit\_symbol\_err}
509   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(unit\_symbol) ) \textcolor{keywordflow}{then}
510     symbol = unit\_symbol
511   \textcolor{keywordflow}{else}
512     symbol = \hyperlink{interfacedc__date__generic_1_1parsetimeunits}{parsetimeunits}(unit)
513 \textcolor{keywordflow}{  end if}
514 
515   \textcolor{keywordflow}{if} ( symbol == \hyperlink{namespacedc__date__types_a5dbd685bd8334def6bf91a9f86e6a2a3}{unit\_symbol\_sec} ) \textcolor{keywordflow}{then}
516     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, sec=\textcolor{keywordtype}{value})
517     \textcolor{keywordflow}{goto} 999
518   \textcolor{keywordflow}{elseif} ( symbol == \hyperlink{namespacedc__date__types_a641f4a9cbf26e15fc8e026c9bdea5222}{unit\_symbol\_nondim} ) \textcolor{keywordflow}{then}
519     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, nondim=\textcolor{keywordtype}{value})
520     \textcolor{keywordflow}{goto} 999
521 \textcolor{keywordflow}{  end if}
522 
523   val\_int = \hyperlink{interfacedc__scaledsec_1_1int}{int}(\textcolor{keywordtype}{value})
524   val\_scl = \hyperlink{interfacedc__scaledsec_1_1int}{int}(\textcolor{keywordtype}{value})
525   val\_dec = \textcolor{keywordtype}{value} - \hyperlink{interfacedc__scaledsec_1_1int}{int}(\textcolor{keywordtype}{value})
526 
527   \textcolor{keywordflow}{if} ( symbol == \hyperlink{namespacedc__date__types_a129f0ebca6e22dfe96af2934e39eaae3}{unit\_symbol\_min} ) \textcolor{keywordflow}{then}
528     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, \hyperlink{interfacedc__date__generic_1_1min}{min} = val\_int, sclsec = val\_dec * 
      \hyperlink{namespacedc__date__types_ab8d0e537d5aeeaaeb9c0023a54deeee4}{min\_seconds})
529   \textcolor{keywordflow}{elseif} ( symbol == \hyperlink{namespacedc__date__types_a10df725fcb094ad0a2f868a93b6ce34c}{unit\_symbol\_hour} ) \textcolor{keywordflow}{then}
530     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, hour = val\_int, sclsec = val\_dec * 
      \hyperlink{namespacedc__date__types_a22b42c8ad86c45a1343d4c285277067d}{hour\_seconds})
531   \textcolor{keywordflow}{elseif} ( symbol == \hyperlink{namespacedc__date__types_adc87b2279e8fefa8078ad877ad14194e}{unit\_symbol\_day} ) \textcolor{keywordflow}{then}
532     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, sclday = val\_scl, sclsec = val\_dec * 
      \hyperlink{namespacedc__date__types_a4a0b5df0058a97b5f9e071ecb0fb7aa7}{day\_seconds})
533   \textcolor{keywordflow}{elseif} ( symbol == \hyperlink{namespacedc__date__types_a2854b3d01fa0384ce83a7eb5a46c0b63}{unit\_symbol\_month} ) \textcolor{keywordflow}{then}
534     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, sclmon = val\_scl, &
535       & sclsec = \hyperlink{interfacedc__scaledsec_1_1int}{int}(val\_dec * \hyperlink{namespacedc__date__types_a1b048467a83d24231df41029f3d8f30e}{cyclic\_mdays}) * \hyperlink{namespacedc__date__types_a4a0b5df0058a97b5f9e071ecb0fb7aa7}{day\_seconds})
536   \textcolor{keywordflow}{elseif} ( symbol == \hyperlink{namespacedc__date__types_af2214286fd54dcc9bc46201851b71794}{unit\_symbol\_year} ) \textcolor{keywordflow}{then}
537     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, sclyear = val\_scl, &
538       & sclsec = \hyperlink{interfacedc__scaledsec_1_1int}{int}(val\_dec * \hyperlink{namespacedc__date__types_a1b048467a83d24231df41029f3d8f30e}{cyclic\_mdays} * \hyperlink{namespacedc__date__types_a94f04fc15c5b633e99505d4b1741e6bf}{year\_months}) * 
      \hyperlink{namespacedc__date__types_a4a0b5df0058a97b5f9e071ecb0fb7aa7}{day\_seconds})
539   \textcolor{keywordflow}{else}
540     stat = \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}
541     cause\_c = unit
542 \textcolor{keywordflow}{  end if}
543 
544 999 \textcolor{keywordflow}{continue}
545   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
546   esmon = diff % mon ; esday = diff % day ; essec = diff % sec
547   \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{'diff (mon=%d, day=%d, sec=%f)'}, &
548     & i=(/esmon, esday/), d=(/essec/))
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dcdatetimecreate_8f90_a4306947e2dacc1d9c8664763015f719d_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dcdatetimecreate_8f90_abbc27202aac4dd490d5e8816d0299385}\label{dcdatetimecreate_8f90_abbc27202aac4dd490d5e8816d0299385}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreate2i@{dcdifftimecreate2i}}
\index{dcdifftimecreate2i@{dcdifftimecreate2i}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreate2i()}{dcdifftimecreate2i()}}
{\footnotesize\ttfamily subroutine dcdifftimecreate2i (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{integer, intent(in)}]{value,  }\item[{character($\ast$), intent(in)}]{unit,  }\item[{integer, intent(in), optional}]{unit\+\_\+symbol,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 566 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
566   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
567   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}
568   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
569   \textcolor{keywordtype}{implicit none}
570   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)} :: diff
571   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: value
572   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: unit
573   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: unit\_symbol
574   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
575 \textcolor{keywordflow}{continue}
576   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, \textcolor{keywordtype}{real( value, DP )}, unit, unit\_symbol, err)
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a1c05f9be8f46ccbc67b7448bc19f77af}\label{dcdatetimecreate_8f90_a1c05f9be8f46ccbc67b7448bc19f77af}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreate2r@{dcdifftimecreate2r}}
\index{dcdifftimecreate2r@{dcdifftimecreate2r}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreate2r()}{dcdifftimecreate2r()}}
{\footnotesize\ttfamily subroutine dcdifftimecreate2r (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{real, intent(in)}]{value,  }\item[{character($\ast$), intent(in)}]{unit,  }\item[{integer, intent(in), optional}]{unit\+\_\+symbol,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 552 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
552   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
553   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}
554   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
555   \textcolor{keywordtype}{implicit none}
556   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)} :: diff
557   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)} :: value
558   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: unit
559   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: unit\_symbol
560   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional} :: err
561 \textcolor{keywordflow}{continue}
562   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, \textcolor{keywordtype}{real( value, DP )}, unit, unit\_symbol, err)
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a18a1770dd8c6953daa1feff6c0e1ef38}\label{dcdatetimecreate_8f90_a18a1770dd8c6953daa1feff6c0e1ef38}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreated@{dcdifftimecreated}}
\index{dcdifftimecreated@{dcdifftimecreated}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreated()}{dcdifftimecreated()}}
{\footnotesize\ttfamily subroutine dcdifftimecreated (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{real(dp), intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 660 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
660   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
661   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
662   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}
663   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, \textcolor{keyword}{assignment}(=)
664   \textcolor{keywordtype}{implicit none}
665   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)}:: diff
666   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec
667 \textcolor{keywordflow}{continue}
668   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, sec = sec)
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a41e55ed814e431bc152237ba8b17f420}\label{dcdatetimecreate_8f90_a41e55ed814e431bc152237ba8b17f420}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreatei@{dcdifftimecreatei}}
\index{dcdifftimecreatei@{dcdifftimecreatei}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreatei()}{dcdifftimecreatei()}}
{\footnotesize\ttfamily subroutine dcdifftimecreatei (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{integer, intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 626 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
626   \textcolor{comment}{!}
627   \textcolor{comment}{! dc\_date\_types#DC\_DIFFTIME 型変数の生成を行います.}
628   \textcolor{comment}{! 引数 sec には秒数を与えてください. 年月日, 時分を使って}
629   \textcolor{comment}{! 指定を行いたい場合は Create を利用してください.}
630   \textcolor{comment}{!}
631   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
632   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
633   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}
634   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, \textcolor{keyword}{assignment}(=)
635   \textcolor{keywordtype}{implicit none}
636   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)}:: diff
637   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: sec
638 \textcolor{keywordflow}{continue}
639   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, sec = \textcolor{keywordtype}{real(sec, DP)} )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_a569becca14dca236805d1e614b839356}\label{dcdatetimecreate_8f90_a569becca14dca236805d1e614b839356}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!dcdifftimecreater@{dcdifftimecreater}}
\index{dcdifftimecreater@{dcdifftimecreater}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{dcdifftimecreater()}{dcdifftimecreater()}}
{\footnotesize\ttfamily subroutine dcdifftimecreater (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(out)}]{diff,  }\item[{real, intent(in)}]{sec }\end{DoxyParamCaption})}



Definition at line 643 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.


\begin{DoxyCode}
643   \textcolor{comment}{!}
644   \textcolor{comment}{! dc\_date\_types#DC\_DIFFTIME 型変数の生成を行います.}
645   \textcolor{comment}{! 引数 sec には秒数を与えてください. 年月日, 時分を使って}
646   \textcolor{comment}{! 指定を行いたい場合は Create を利用してください.}
647   \textcolor{comment}{!}
648   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
649   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
650   \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}
651   \textcolor{keywordtype}{use }\hyperlink{namespacedc__scaledsec}{dc\_scaledsec}\textcolor{keywordtype}{, only}: \hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}, \textcolor{keyword}{assignment}(=)
652   \textcolor{keywordtype}{implicit none}
653   \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(out)}:: diff
654   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: sec
655 \textcolor{keywordflow}{continue}
656   \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}(diff, sec = \textcolor{keywordtype}{real(sec, DP)} )
\end{DoxyCode}
\mbox{\Hypertarget{dcdatetimecreate_8f90_ad22ad4d11e3e4c440d970551b06f7390}\label{dcdatetimecreate_8f90_ad22ad4d11e3e4c440d970551b06f7390}} 
\index{dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}!get\+\_\+current\+\_\+time@{get\+\_\+current\+\_\+time}}
\index{get\+\_\+current\+\_\+time@{get\+\_\+current\+\_\+time}!dcdatetimecreate.\+f90@{dcdatetimecreate.\+f90}}
\subsubsection{\texorpdfstring{get\+\_\+current\+\_\+time()}{get\_current\_time()}}
{\footnotesize\ttfamily subroutine dcdatetimecreate1\+::get\+\_\+current\+\_\+time (\begin{DoxyParamCaption}\item[{integer, intent(out)}]{jyear,  }\item[{integer, intent(out)}]{jmon,  }\item[{integer, intent(out)}]{jday,  }\item[{real(dp), intent(out)}]{jsec,  }\item[{character($\ast$), intent(out)}]{jzone }\end{DoxyParamCaption})}



Definition at line 280 of file dcdatetimecreate.\+f90.



References dc\+\_\+types\+::dp.



Referenced by dcdatetimecreate1().


\begin{DoxyCode}
280       \textcolor{comment}{!}
281       \textcolor{comment}{! date\_and\_time 組み込みサブルーチンを用いて, 現在}
282       \textcolor{comment}{! 時刻と UTC からの時差を返します.}
283       \textcolor{comment}{!}
284       \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
285       \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1stod}{stod}
286       \textcolor{keywordtype}{implicit none}
287       \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)} :: jyear, jmon, jday
288       \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(out)} :: jsec
289       \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)} :: jzone
290 
291       \textcolor{keywordtype}{integer} :: date\_time\_values(1:8)
292       \textcolor{keywordtype}{character(5)}  :: zone\_raw
293     \textcolor{keywordflow}{continue}
294 
295       \textcolor{keyword}{call }date\_and\_time(zone=zone\_raw, values=date\_time\_values)
296 
297       jzone = zone\_raw(1:3) // \textcolor{stringliteral}{":"} // zone\_raw(4:5)
298 
299       jyear = date\_time\_values(1)
300       jmon  = date\_time\_values(2)
301       jday  = date\_time\_values(3)
302       jsec  = \textcolor{keywordtype}{real(date\_time\_values(5), DP)} * hour\_seconds &
303         &     + real(date\_time\_values(6), DP) * MIN\_SECONDS &
304         &     + real(date\_time\_values(7), DP)
305 
\end{DoxyCode}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=302pt]{dcdatetimecreate_8f90_ad22ad4d11e3e4c440d970551b06f7390_icgraph}
\end{center}
\end{figure}
