\hypertarget{historyautoput_8f90}{}\section{gtool/gtool\+\_\+historyauto/historyautoput.f90 File Reference}
\label{historyautoput_8f90}\index{gtool/gtool\+\_\+historyauto/historyautoput.\+f90@{gtool/gtool\+\_\+historyauto/historyautoput.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{historyautoput_8f90_a6ca526e84a9304cef7f29d5a2a102bc6}{historyautoputdouble0} (time, varname, value, err)
\item 
subroutine \hyperlink{historyautoput_8f90_ae71ee34b590ce08e68214c0218351744}{historyautoputdouble1} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a8bf7d655d5dbd66e85cd417bcca759be}{historyautoputdouble2} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_ae9bb1748387bd8c63ec57f59a958d11b}{historyautoputdouble3} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a3c49865072fd0238ab94f5937bb34ba1}{historyautoputdouble4} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a3f3a22f9c8ab605f0324ad5441e27735}{historyautoputdouble5} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a7cd6c0733616994e6af9eccf718d4ca4}{historyautoputdouble6} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a4731766cf9e51d5dfe5b5f039a197284}{historyautoputdouble7} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_aabbb6234ff1743866ef75f493e2c2da6}{historyautoputreal0} (time, varname, value, err)
\item 
subroutine \hyperlink{historyautoput_8f90_abae3dd75159a122c0fb260997cfce991}{historyautoputreal1} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a4f870f56a424e6132399d7c3b2404f6e}{historyautoputreal2} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a1bd703580c0481ff9a2d0a2589f97d79}{historyautoputreal3} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a7af56d3a6950be00440df401f19a02c1}{historyautoputreal4} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_ae00f103ebcaf1dabe78534593981757e}{historyautoputreal5} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a26e4ce95f5039a5c9da88dce187b4c9e}{historyautoputreal6} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a9d37c6618e5f0d50b5d4552aef4dd9f5}{historyautoputreal7} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a845ed32e338aa09b97f6c1f18fff208b}{historyautoputint0} (time, varname, value, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a0a949973301b4429e8f7bbfc1bdb060e}{historyautoputint1} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a2909430bd62ab62314aac79b44b5d97d}{historyautoputint2} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a79d5337c45e17e44280817c1faef4aa1}{historyautoputint3} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a64d669349a1d49636cc89e44a7f7c3d0}{historyautoputint4} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a6ed09634c98c9b4d746c2c0ab363dbad}{historyautoputint5} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a1e12174c9e21d2d51f16d1d8c0293633}{historyautoputint6} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a4a613764d786ad25fe770d07addd2b08}{historyautoputint7} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a1ee862fac0290821bd7a0370722f7497}{historyautoputold1double0} (time, varname, value, err)
\item 
subroutine \hyperlink{historyautoput_8f90_ad437098082ca17279e227281e3ef2022}{historyautoputold1double1} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a04d76f0d98ffb5b94fa217dfd50e87d4}{historyautoputold1double2} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a4c3d9cee366182f90984fca9e376fcf9}{historyautoputold1double3} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a4818c20a43435bdcae425314a50f2b66}{historyautoputold1double4} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_add4f7a88e2be7918841d3db000ed1d5c}{historyautoputold1double5} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a7d8aa4601e44c3e150b7a03703201726}{historyautoputold1double6} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a10053370cf0cb237cb9df4dc86811a98}{historyautoputold1double7} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a484ba22990f64ee2fccaf1769b68eef7}{historyautoputold1real0} (time, varname, value, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a985b24d40a111bc1c48de166995b0a80}{historyautoputold1real1} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a4a15e9342cdb899a57f50feb40b0b91c}{historyautoputold1real2} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a1f82fecad2f460579a54249a33be6edf}{historyautoputold1real3} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_adbbb69ea824040208cd91d651b96836e}{historyautoputold1real4} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a0ae20c7ca0d4a9b943814f9bc699100b}{historyautoputold1real5} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a54c9cf4e170b576633f29942fbd2ae36}{historyautoputold1real6} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a226ac696d1f32290b4944891d0f07add}{historyautoputold1real7} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_abe3eeca8fc32b5f6927ae29ad586b1b8}{historyautoputold1int0} (time, varname, value, err)
\item 
subroutine \hyperlink{historyautoput_8f90_ac01ab8b5c12801a71a5dbbff48bfbecd}{historyautoputold1int1} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a020e89bab179e21ba927bd94d40fb034}{historyautoputold1int2} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a322d9cf46a6ea2c0001941e76737260a}{historyautoputold1int3} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a10339f0134876f97571124338093f22d}{historyautoputold1int4} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a344c4bd693d9389d0bd8ca0ade118ce1}{historyautoputold1int5} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_a3c0e175ec349fe4bf1845769c73755cc}{historyautoputold1int6} (time, varname, array, err)
\item 
subroutine \hyperlink{historyautoput_8f90_aed4d1654848b0ca7e7ade1437378b2d8}{historyautoputold1int7} (time, varname, array, err)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{historyautoput_8f90_a6ca526e84a9304cef7f29d5a2a102bc6}\label{historyautoput_8f90_a6ca526e84a9304cef7f29d5a2a102bc6}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputdouble0@{historyautoputdouble0}}
\index{historyautoputdouble0@{historyautoputdouble0}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputdouble0()}{historyautoputdouble0()}}
{\footnotesize\ttfamily subroutine historyautoputdouble0 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), intent(in), target}]{value,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 32 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
32     \textcolor{comment}{!}
33                                             \textcolor{comment}{!}
34     \textcolor{comment}{! データの出力を行います.}
35     \textcolor{comment}{! このサブルーチンを用いる前に, "HistoryAutoCreate"}
36     \textcolor{comment}{! による初期設定が必要です.}
37     \textcolor{comment}{!}
38     \textcolor{comment}{! *varname* は HistoryAutoAddVariable で指定されている必要があります. }
39     \textcolor{comment}{!}
40     \textcolor{comment}{! *HistoryAutoPut* は複数のサブルーチンの総称名です. *array* には}
41     \textcolor{comment}{! 0 〜 7 次元のデータを与えることが可能です. }
42     \textcolor{comment}{! (以下の同名のサブルーチンを参照ください).}
43     \textcolor{comment}{! また, 整数, 単精度実数, 倍精度実数を与えることが可能です. }
44     \textcolor{comment}{! ただし, 0 次元のデータを与える際の引数キーワードは}
45     \textcolor{comment}{! *value* を用いてください.}
46     \textcolor{comment}{!}
47     \textcolor{comment}{! Output data. }
48     \textcolor{comment}{! Initialization by "HistoryAutoCreate" is needed }
49     \textcolor{comment}{! before use of this subroutine. }
50     \textcolor{comment}{! }
51     \textcolor{comment}{! "varname" must be specified by "HistoryAutoAddVariable". }
52     \textcolor{comment}{!}
53     \textcolor{comment}{! "HistoryAutoPut" is a generic name of multiple subroutines. }
54     \textcolor{comment}{! Then 0 -- 7 dimensional data can be given to "array". }
55     \textcolor{comment}{! (See bellow subroutines with the same name). }
56     \textcolor{comment}{! And, integer, sinble or double precision can be given. }
57     \textcolor{comment}{! However, if 0 dimensional data is given, use "value" as a }
58     \textcolor{comment}{! keyword argument. }
59     \textcolor{comment}{!}
60     \textcolor{comment}{!}
61     \textcolor{comment}{! * 時間平均について}
62     \textcolor{comment}{!}
63     \textcolor{comment}{!   時間平均については HistoryAutoAddVariable を参照ください。}
64     \textcolor{comment}{!}
65     \textcolor{comment}{! * About time average}
66     \textcolor{comment}{!}
67     \textcolor{comment}{!   See "HistoryAutoAddVariable" for details of time average}
68     \textcolor{comment}{! }
69     \textcolor{comment}{!}
70                     
71     \textcolor{comment}{!}
72 
73     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
74       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
75       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
76       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
77       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
78       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
79       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
80       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
81       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
82     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
83       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
84     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
85     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
86       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
87     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
88       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
89       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
90     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
91     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
92     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
93     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
94       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
95     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
96     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
97       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
98       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
99     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
100     \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}
101     \textcolor{keywordtype}{implicit none}
102     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
103                                                                       \textcolor{comment}{! データの時刻. }
104                               \textcolor{comment}{! Time of data}
105                     
106     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
107                                                                       \textcolor{comment}{! 変数の名前. }
108                               \textcolor{comment}{!}
109                               \textcolor{comment}{! ただし, ここで指定するものは, }
110                               \textcolor{comment}{! HistoryAutoAddVariable の}
111                               \textcolor{comment}{! *varname* で既に指定されてい}
112                               \textcolor{comment}{! なければなりません. }
113                               \textcolor{comment}{!}
114                               \textcolor{comment}{! Name of a variable. }
115                               \textcolor{comment}{!}
116                               \textcolor{comment}{! This must be specified  }
117                               \textcolor{comment}{! *varname* in "HistoryAutoAddVariable". }
118                     
119     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: value
120                                                                       \textcolor{comment}{! 出力データ. }
121                               \textcolor{comment}{!}
122                               \textcolor{comment}{! データ型は整数, 単精度実数型, }
123                               \textcolor{comment}{! 倍精度実数型のどれでもかまいません. }
124                               \textcolor{comment}{! ただし, ファイルへ出力される際には, }
125                               \textcolor{comment}{! HistoryAutoAddVariable の *xtypes* で指定した}
126                               \textcolor{comment}{! データ型へ変換されます. }
127                               \textcolor{comment}{! }
128                               \textcolor{comment}{! Output data. }
129                               \textcolor{comment}{!}
130                               \textcolor{comment}{! Integer, single or double precision are }
131                               \textcolor{comment}{! acceptable as data type. }
132                               \textcolor{comment}{! Note that when this is output to a file, }
133                               \textcolor{comment}{! data type is converted into "xtype" }
134                               \textcolor{comment}{! specified in "HistoryAutoAddVariable"}
135                               \textcolor{comment}{! }
136                     
137     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
138                                                                       \textcolor{comment}{! 例外処理用フラグ. }
139                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
140                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
141                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
142                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
143                               \textcolor{comment}{! *err* に .true. が代入されます. }
144                               \textcolor{comment}{!}
145                               \textcolor{comment}{! Exception handling flag. }
146                               \textcolor{comment}{! By default, when error occur in }
147                               \textcolor{comment}{! this procedure, the program aborts. }
148                               \textcolor{comment}{! If this *err* argument is given, }
149                               \textcolor{comment}{! .true. is substituted to *err* and }
150                               \textcolor{comment}{! the program does not abort. }
151                     
152 
153     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
154                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
155                               \textcolor{comment}{! Derived type for "gtool\_history" module}
156 
157                                         
158     \textcolor{keywordtype}{real(DP)}:: settime
159     \textcolor{keywordtype}{integer}:: stat, i
160     \textcolor{keywordtype}{integer}:: vnum
161     \textcolor{keywordtype}{character(STRING)}:: cause\_c
162     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
163     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutDouble0"}
164   \textcolor{keywordflow}{continue}
165     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
166     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
167     cause\_c = \textcolor{stringliteral}{""}
168 
169     \textcolor{comment}{! 初期設定チェック}
170     \textcolor{comment}{! Check initialization}
171     \textcolor{comment}{!}
172     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
173       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
174       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
175       \textcolor{keywordflow}{goto} 999
176 \textcolor{keywordflow}{    end if}
177 
178     \textcolor{comment}{! 時刻に関するエラー処理}
179     \textcolor{comment}{! Error handling for time}
180     \textcolor{comment}{!}
181     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
182       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
183       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
184         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
185         & c1 = trim( cause\_c ), c2 = trim( varname ) )
186       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
187       cause\_c = \textcolor{stringliteral}{'time'}
188       \textcolor{keywordflow}{goto} 999
189 \textcolor{keywordflow}{    end if}
190 
191     \textcolor{comment}{! 変数 ID のサーチ}
192     \textcolor{comment}{! Search variable ID}
193     \textcolor{comment}{!}
194     varsearch: \textcolor{keywordflow}{do}
195       \textcolor{keywordflow}{do} i = svnum, numvars
196         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
197           vnum = i
198           \textcolor{keywordflow}{exit} varsearch
199 \textcolor{keywordflow}{        end if}
200 \textcolor{keywordflow}{      end do}
201       \textcolor{keywordflow}{do} i = 1, svnum - 1
202         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
203           vnum = i
204           \textcolor{keywordflow}{exit} varsearch
205 \textcolor{keywordflow}{        end if}
206 \textcolor{keywordflow}{      end do}
207 
208       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
209       cause\_c = varname
210       \textcolor{keywordflow}{goto} 999
211 \textcolor{keywordflow}{    end do} varsearch
212 
213     svnum = vnum
214 
215     \textcolor{comment}{! 定義モードからデータモードへ}
216     \textcolor{comment}{! Transit from define mode to data mode}
217     \textcolor{comment}{!}
218     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
219       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
220 \textcolor{keywordflow}{    end if}
221 
222     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
223     \textcolor{comment}{! Check output timing and create files}
224     \textcolor{comment}{!}
225     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
226       &        time = time, &    \textcolor{comment}{! (in)}
227       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
228 
229     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
230     \textcolor{comment}{! Open, close, reopen files}
231     \textcolor{comment}{!}
232     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
233       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
234       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
235         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
236       histaddvar\_vars(vnum) = .true.
237       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
238         prev\_outtime\_vars(vnum) = time
239       \textcolor{keywordflow}{else}
240         flag\_output\_prev\_vars(vnum) = .true.
241         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
242           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
243         \textcolor{keywordflow}{else}
244           prev\_outtime\_vars(vnum) = time
245 \textcolor{keywordflow}{        end if}
246 \textcolor{keywordflow}{      end if}
247 \textcolor{keywordflow}{    end if}
248 
249     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
250       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
251         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
252 \textcolor{keywordflow}{      end if}
253 \textcolor{keywordflow}{    end if}
254 
255     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
256       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
257         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
258 \textcolor{keywordflow}{      end if}
259       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
260         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
261       newfile\_createtime\_vars(vnum) = time
262       prev\_outtime\_vars(vnum) = time
263 \textcolor{keywordflow}{    end if}
264 
265     \textcolor{comment}{! 出力が有効かどうかを確認する}
266     \textcolor{comment}{! Confirm whether the output is effective}
267     \textcolor{comment}{!}
268     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
269       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
270 
271       \textcolor{keywordflow}{goto} 999
272 \textcolor{keywordflow}{    end if}
273 
274     \textcolor{comment}{! GT\_HISTORY 変数の取得}
275     \textcolor{comment}{! Get "GT\_HISTORY" variable}
276     \textcolor{comment}{!}
277     gthist => gthst\_history\_vars(vnum) % gthist
278 
279 
280     \textcolor{comment}{! 空間切り出し}
281     \textcolor{comment}{! Slice of spaces}
282     \textcolor{comment}{!}
283                         \textcolor{comment}{! array only}
284                     
285 
286 
287     \textcolor{comment}{! 空間平均}
288     \textcolor{comment}{! Spatial average}
289     \textcolor{comment}{!}
290                         \textcolor{comment}{! array only}
291                     
292 
293     \textcolor{comment}{! 単位に応じて時刻を変換}
294     \textcolor{comment}{! Convert time according to units}
295     \textcolor{comment}{!}
296     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
297       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
298 
299       settime = &
300         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
301 \textcolor{keywordflow}{    end if}
302 
303     \textcolor{comment}{! 時刻設定}
304     \textcolor{comment}{! Set time}
305     \textcolor{comment}{!}
306     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
307       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
308         & history = gthist, &   \textcolor{comment}{! (in) optional}
309         & timed = settime )     \textcolor{comment}{! (in) optional}
310 \textcolor{keywordflow}{    end if}
311 
312     \textcolor{comment}{! 出力}
313     \textcolor{comment}{! OutPut}
314     \textcolor{comment}{!}
315     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
316       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
317         & varname, &              \textcolor{comment}{! (in)}
318                               & (/\textcolor{keywordtype}{value}/), &            \textcolor{comment}{! (in)}
319                       
320         & timed = settime, &      \textcolor{comment}{! (in) optional}
321         & time\_average\_store = &
322         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
323         & history = gthist )                  \textcolor{comment}{! (inout) optional}
324     \textcolor{keywordflow}{else}
325       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
326         & varname, &              \textcolor{comment}{! (in)}
327                               & (/\textcolor{keywordtype}{value}/), &            \textcolor{comment}{! (in)}
328                       
329         & history = gthist )      \textcolor{comment}{! (inout) optional}
330 \textcolor{keywordflow}{    end if}
331 
332     \textcolor{comment}{! 最後に出力した時刻を保存}
333     \textcolor{comment}{! Save last time of output}
334     \textcolor{comment}{!}
335     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
336       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
337         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
338 
339         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
340           prev\_outtime\_vars(vnum) = time
341         \textcolor{keywordflow}{else}
342           prev\_outtime\_vars(vnum) = &
343             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
344 \textcolor{keywordflow}{        end if}
345 \textcolor{keywordflow}{      end if}
346 \textcolor{keywordflow}{    end if}
347 
348     \textcolor{comment}{! 結合解除}
349     \textcolor{comment}{! Release associations}
350     \textcolor{comment}{!}
351     \textcolor{keyword}{nullify}( gthist )
352                                         
353 
354 999 \textcolor{keywordflow}{continue}
355     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
356     \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]{historyautoput_8f90_a6ca526e84a9304cef7f29d5a2a102bc6_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_ae71ee34b590ce08e68214c0218351744}\label{historyautoput_8f90_ae71ee34b590ce08e68214c0218351744}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputdouble1@{historyautoputdouble1}}
\index{historyautoputdouble1@{historyautoputdouble1}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputdouble1()}{historyautoputdouble1()}}
{\footnotesize\ttfamily subroutine historyautoputdouble1 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 364 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
364     \textcolor{comment}{!}
365                     
366     \textcolor{comment}{!}
367 
368     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
369       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
370       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
371       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
372       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
373       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
374       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
375       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
376       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
377     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
378       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
379     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
380     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
381       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
382     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
383       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
384       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
385     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
386     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
387     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
388     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
389       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
390     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
391     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
392       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
393       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
394     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
395     \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}
396     \textcolor{keywordtype}{implicit none}
397     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
398                     
399     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
400                     
401     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:)
402                     
403     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
404                     
405 
406     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
407                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
408                               \textcolor{comment}{! Derived type for "gtool\_history" module}
409 
410                         \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_slice(:) =>null()
411     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
412     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_avr(:) =>null()
413                     
414     \textcolor{keywordtype}{real(DP)}:: settime
415     \textcolor{keywordtype}{integer}:: stat, i
416     \textcolor{keywordtype}{integer}:: vnum
417     \textcolor{keywordtype}{character(STRING)}:: cause\_c
418     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
419     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutDouble1"}
420   \textcolor{keywordflow}{continue}
421     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
422     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
423     cause\_c = \textcolor{stringliteral}{""}
424 
425     \textcolor{comment}{! 初期設定チェック}
426     \textcolor{comment}{! Check initialization}
427     \textcolor{comment}{!}
428     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
429       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
430       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
431       \textcolor{keywordflow}{goto} 999
432 \textcolor{keywordflow}{    end if}
433 
434     \textcolor{comment}{! 時刻に関するエラー処理}
435     \textcolor{comment}{! Error handling for time}
436     \textcolor{comment}{!}
437     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
438       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
439       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
440         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
441         & c1 = trim( cause\_c ), c2 = trim( varname ) )
442       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
443       cause\_c = \textcolor{stringliteral}{'time'}
444       \textcolor{keywordflow}{goto} 999
445 \textcolor{keywordflow}{    end if}
446 
447     \textcolor{comment}{! 変数 ID のサーチ}
448     \textcolor{comment}{! Search variable ID}
449     \textcolor{comment}{!}
450     varsearch: \textcolor{keywordflow}{do}
451       \textcolor{keywordflow}{do} i = svnum, numvars
452         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
453           vnum = i
454           \textcolor{keywordflow}{exit} varsearch
455 \textcolor{keywordflow}{        end if}
456 \textcolor{keywordflow}{      end do}
457       \textcolor{keywordflow}{do} i = 1, svnum - 1
458         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
459           vnum = i
460           \textcolor{keywordflow}{exit} varsearch
461 \textcolor{keywordflow}{        end if}
462 \textcolor{keywordflow}{      end do}
463 
464       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
465       cause\_c = varname
466       \textcolor{keywordflow}{goto} 999
467 \textcolor{keywordflow}{    end do} varsearch
468 
469     svnum = vnum
470 
471     \textcolor{comment}{! 定義モードからデータモードへ}
472     \textcolor{comment}{! Transit from define mode to data mode}
473     \textcolor{comment}{!}
474     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
475       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
476 \textcolor{keywordflow}{    end if}
477 
478     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
479     \textcolor{comment}{! Check output timing and create files}
480     \textcolor{comment}{!}
481     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
482       &        time = time, &    \textcolor{comment}{! (in)}
483       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
484 
485     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
486     \textcolor{comment}{! Open, close, reopen files}
487     \textcolor{comment}{!}
488     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
489       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
490       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
491         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
492       histaddvar\_vars(vnum) = .true.
493       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
494         prev\_outtime\_vars(vnum) = time
495       \textcolor{keywordflow}{else}
496         flag\_output\_prev\_vars(vnum) = .true.
497         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
498           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
499         \textcolor{keywordflow}{else}
500           prev\_outtime\_vars(vnum) = time
501 \textcolor{keywordflow}{        end if}
502 \textcolor{keywordflow}{      end if}
503 \textcolor{keywordflow}{    end if}
504 
505     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
506       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
507         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
508 \textcolor{keywordflow}{      end if}
509 \textcolor{keywordflow}{    end if}
510 
511     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
512       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
513         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
514 \textcolor{keywordflow}{      end if}
515       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
516         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
517       newfile\_createtime\_vars(vnum) = time
518       prev\_outtime\_vars(vnum) = time
519 \textcolor{keywordflow}{    end if}
520 
521     \textcolor{comment}{! 出力が有効かどうかを確認する}
522     \textcolor{comment}{! Confirm whether the output is effective}
523     \textcolor{comment}{!}
524     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
525       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
526 
527       \textcolor{keywordflow}{goto} 999
528 \textcolor{keywordflow}{    end if}
529 
530     \textcolor{comment}{! GT\_HISTORY 変数の取得}
531     \textcolor{comment}{! Get "GT\_HISTORY" variable}
532     \textcolor{comment}{!}
533     gthist => gthst\_history\_vars(vnum) % gthist
534 
535 
536     \textcolor{comment}{! 空間切り出し}
537     \textcolor{comment}{! Slice of spaces}
538     \textcolor{comment}{!}
539                         sv => slice\_vars(vnum)
540 
541                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
542                       
543 
544     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
545                       
546       & )
547                     
548 
549 
550     \textcolor{comment}{! 空間平均}
551     \textcolor{comment}{! Spatial average}
552     \textcolor{comment}{!}
553                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
554       array\_avr => array\_slice
555     \textcolor{keywordflow}{else}
556       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
557         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
558                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
559                       
560         & array\_avr )                       \textcolor{comment}{! (out)}
561 \textcolor{keywordflow}{    end if}
562 
563     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
564 
565                     
566 
567     \textcolor{comment}{! 単位に応じて時刻を変換}
568     \textcolor{comment}{! Convert time according to units}
569     \textcolor{comment}{!}
570     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
571       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
572 
573       settime = &
574         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
575 \textcolor{keywordflow}{    end if}
576 
577     \textcolor{comment}{! 時刻設定}
578     \textcolor{comment}{! Set time}
579     \textcolor{comment}{!}
580     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
581       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
582         & history = gthist, &   \textcolor{comment}{! (in) optional}
583         & timed = settime )     \textcolor{comment}{! (in) optional}
584 \textcolor{keywordflow}{    end if}
585 
586     \textcolor{comment}{! 出力}
587     \textcolor{comment}{! OutPut}
588     \textcolor{comment}{!}
589     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
590       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
591         & varname, &              \textcolor{comment}{! (in)}
592                               & array\_avr, &            \textcolor{comment}{! (in)}
593                       
594         & timed = settime, &      \textcolor{comment}{! (in) optional}
595         & time\_average\_store = &
596         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
597         & history = gthist )                  \textcolor{comment}{! (inout) optional}
598     \textcolor{keywordflow}{else}
599       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
600         & varname, &              \textcolor{comment}{! (in)}
601                               & array\_avr, &            \textcolor{comment}{! (in)}
602                       
603         & history = gthist )      \textcolor{comment}{! (inout) optional}
604 \textcolor{keywordflow}{    end if}
605 
606     \textcolor{comment}{! 最後に出力した時刻を保存}
607     \textcolor{comment}{! Save last time of output}
608     \textcolor{comment}{!}
609     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
610       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
611         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
612 
613         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
614           prev\_outtime\_vars(vnum) = time
615         \textcolor{keywordflow}{else}
616           prev\_outtime\_vars(vnum) = &
617             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
618 \textcolor{keywordflow}{        end if}
619 \textcolor{keywordflow}{      end if}
620 \textcolor{keywordflow}{    end if}
621 
622     \textcolor{comment}{! 結合解除}
623     \textcolor{comment}{! Release associations}
624     \textcolor{comment}{!}
625     \textcolor{keyword}{nullify}( gthist )
626                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
627                     
628 
629 999 \textcolor{keywordflow}{continue}
630     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
631     \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]{historyautoput_8f90_ae71ee34b590ce08e68214c0218351744_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a8bf7d655d5dbd66e85cd417bcca759be}\label{historyautoput_8f90_a8bf7d655d5dbd66e85cd417bcca759be}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputdouble2@{historyautoputdouble2}}
\index{historyautoputdouble2@{historyautoputdouble2}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputdouble2()}{historyautoputdouble2()}}
{\footnotesize\ttfamily subroutine historyautoputdouble2 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 639 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
639     \textcolor{comment}{!}
640                     
641     \textcolor{comment}{!}
642 
643     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
644       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
645       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
646       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
647       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
648       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
649       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
650       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
651       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
652     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
653       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
654     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
655     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
656       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
657     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
658       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
659       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
660     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
661     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
662     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
663     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
664       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
665     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
666     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
667       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
668       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
669     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
670     \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}
671     \textcolor{keywordtype}{implicit none}
672     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
673                     
674     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
675                     
676     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:)
677                     
678     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
679                     
680 
681     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
682                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
683                               \textcolor{comment}{! Derived type for "gtool\_history" module}
684 
685                         \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:) =>null()
686     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
687     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:) =>null()
688                     
689     \textcolor{keywordtype}{real(DP)}:: settime
690     \textcolor{keywordtype}{integer}:: stat, i
691     \textcolor{keywordtype}{integer}:: vnum
692     \textcolor{keywordtype}{character(STRING)}:: cause\_c
693     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
694     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutDouble2"}
695   \textcolor{keywordflow}{continue}
696     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
697     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
698     cause\_c = \textcolor{stringliteral}{""}
699 
700     \textcolor{comment}{! 初期設定チェック}
701     \textcolor{comment}{! Check initialization}
702     \textcolor{comment}{!}
703     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
704       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
705       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
706       \textcolor{keywordflow}{goto} 999
707 \textcolor{keywordflow}{    end if}
708 
709     \textcolor{comment}{! 時刻に関するエラー処理}
710     \textcolor{comment}{! Error handling for time}
711     \textcolor{comment}{!}
712     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
713       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
714       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
715         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
716         & c1 = trim( cause\_c ), c2 = trim( varname ) )
717       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
718       cause\_c = \textcolor{stringliteral}{'time'}
719       \textcolor{keywordflow}{goto} 999
720 \textcolor{keywordflow}{    end if}
721 
722     \textcolor{comment}{! 変数 ID のサーチ}
723     \textcolor{comment}{! Search variable ID}
724     \textcolor{comment}{!}
725     varsearch: \textcolor{keywordflow}{do}
726       \textcolor{keywordflow}{do} i = svnum, numvars
727         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
728           vnum = i
729           \textcolor{keywordflow}{exit} varsearch
730 \textcolor{keywordflow}{        end if}
731 \textcolor{keywordflow}{      end do}
732       \textcolor{keywordflow}{do} i = 1, svnum - 1
733         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
734           vnum = i
735           \textcolor{keywordflow}{exit} varsearch
736 \textcolor{keywordflow}{        end if}
737 \textcolor{keywordflow}{      end do}
738 
739       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
740       cause\_c = varname
741       \textcolor{keywordflow}{goto} 999
742 \textcolor{keywordflow}{    end do} varsearch
743 
744     svnum = vnum
745 
746     \textcolor{comment}{! 定義モードからデータモードへ}
747     \textcolor{comment}{! Transit from define mode to data mode}
748     \textcolor{comment}{!}
749     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
750       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
751 \textcolor{keywordflow}{    end if}
752 
753     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
754     \textcolor{comment}{! Check output timing and create files}
755     \textcolor{comment}{!}
756     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
757       &        time = time, &    \textcolor{comment}{! (in)}
758       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
759 
760     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
761     \textcolor{comment}{! Open, close, reopen files}
762     \textcolor{comment}{!}
763     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
764       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
765       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
766         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
767       histaddvar\_vars(vnum) = .true.
768       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
769         prev\_outtime\_vars(vnum) = time
770       \textcolor{keywordflow}{else}
771         flag\_output\_prev\_vars(vnum) = .true.
772         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
773           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
774         \textcolor{keywordflow}{else}
775           prev\_outtime\_vars(vnum) = time
776 \textcolor{keywordflow}{        end if}
777 \textcolor{keywordflow}{      end if}
778 \textcolor{keywordflow}{    end if}
779 
780     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
781       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
782         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
783 \textcolor{keywordflow}{      end if}
784 \textcolor{keywordflow}{    end if}
785 
786     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
787       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
788         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
789 \textcolor{keywordflow}{      end if}
790       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
791         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
792       newfile\_createtime\_vars(vnum) = time
793       prev\_outtime\_vars(vnum) = time
794 \textcolor{keywordflow}{    end if}
795 
796     \textcolor{comment}{! 出力が有効かどうかを確認する}
797     \textcolor{comment}{! Confirm whether the output is effective}
798     \textcolor{comment}{!}
799     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
800       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
801 
802       \textcolor{keywordflow}{goto} 999
803 \textcolor{keywordflow}{    end if}
804 
805     \textcolor{comment}{! GT\_HISTORY 変数の取得}
806     \textcolor{comment}{! Get "GT\_HISTORY" variable}
807     \textcolor{comment}{!}
808     gthist => gthst\_history\_vars(vnum) % gthist
809 
810 
811     \textcolor{comment}{! 空間切り出し}
812     \textcolor{comment}{! Slice of spaces}
813     \textcolor{comment}{!}
814                         sv => slice\_vars(vnum)
815 
816                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
817                       
818 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
819                       
820 
821     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
822                             & , sv%st(2):sv%ed(2):sv%sd(2) &
823                       
824       & )
825                     
826 
827 
828     \textcolor{comment}{! 空間平均}
829     \textcolor{comment}{! Spatial average}
830     \textcolor{comment}{!}
831                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
832       array\_avr => array\_slice
833     \textcolor{keywordflow}{else}
834       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
835         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
836                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
837                       
838         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
839                       
840         & array\_avr )                       \textcolor{comment}{! (out)}
841 \textcolor{keywordflow}{    end if}
842 
843     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
844 
845                     
846 
847     \textcolor{comment}{! 単位に応じて時刻を変換}
848     \textcolor{comment}{! Convert time according to units}
849     \textcolor{comment}{!}
850     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
851       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
852 
853       settime = &
854         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
855 \textcolor{keywordflow}{    end if}
856 
857     \textcolor{comment}{! 時刻設定}
858     \textcolor{comment}{! Set time}
859     \textcolor{comment}{!}
860     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
861       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
862         & history = gthist, &   \textcolor{comment}{! (in) optional}
863         & timed = settime )     \textcolor{comment}{! (in) optional}
864 \textcolor{keywordflow}{    end if}
865 
866     \textcolor{comment}{! 出力}
867     \textcolor{comment}{! OutPut}
868     \textcolor{comment}{!}
869     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
870       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
871         & varname, &              \textcolor{comment}{! (in)}
872                               & array\_avr, &            \textcolor{comment}{! (in)}
873                       
874         & timed = settime, &      \textcolor{comment}{! (in) optional}
875         & time\_average\_store = &
876         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
877         & history = gthist )                  \textcolor{comment}{! (inout) optional}
878     \textcolor{keywordflow}{else}
879       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
880         & varname, &              \textcolor{comment}{! (in)}
881                               & array\_avr, &            \textcolor{comment}{! (in)}
882                       
883         & history = gthist )      \textcolor{comment}{! (inout) optional}
884 \textcolor{keywordflow}{    end if}
885 
886     \textcolor{comment}{! 最後に出力した時刻を保存}
887     \textcolor{comment}{! Save last time of output}
888     \textcolor{comment}{!}
889     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
890       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
891         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
892 
893         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
894           prev\_outtime\_vars(vnum) = time
895         \textcolor{keywordflow}{else}
896           prev\_outtime\_vars(vnum) = &
897             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
898 \textcolor{keywordflow}{        end if}
899 \textcolor{keywordflow}{      end if}
900 \textcolor{keywordflow}{    end if}
901 
902     \textcolor{comment}{! 結合解除}
903     \textcolor{comment}{! Release associations}
904     \textcolor{comment}{!}
905     \textcolor{keyword}{nullify}( gthist )
906                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
907                     
908 
909 999 \textcolor{keywordflow}{continue}
910     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
911     \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]{historyautoput_8f90_a8bf7d655d5dbd66e85cd417bcca759be_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_ae9bb1748387bd8c63ec57f59a958d11b}\label{historyautoput_8f90_ae9bb1748387bd8c63ec57f59a958d11b}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputdouble3@{historyautoputdouble3}}
\index{historyautoputdouble3@{historyautoputdouble3}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputdouble3()}{historyautoputdouble3()}}
{\footnotesize\ttfamily subroutine historyautoputdouble3 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 919 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
919     \textcolor{comment}{!}
920                     
921     \textcolor{comment}{!}
922 
923     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
924       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
925       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
926       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
927       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
928       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
929       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
930       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
931       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
932     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
933       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
934     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
935     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
936       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
937     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
938       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
939       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
940     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
941     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
942     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
943     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
944       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
945     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
946     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
947       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
948       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
949     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
950     \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}
951     \textcolor{keywordtype}{implicit none}
952     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
953                     
954     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
955                     
956     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:)
957                     
958     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
959                     
960 
961     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
962                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
963                               \textcolor{comment}{! Derived type for "gtool\_history" module}
964 
965                         \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:) =>null()
966     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
967     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:) =>null()
968                     
969     \textcolor{keywordtype}{real(DP)}:: settime
970     \textcolor{keywordtype}{integer}:: stat, i
971     \textcolor{keywordtype}{integer}:: vnum
972     \textcolor{keywordtype}{character(STRING)}:: cause\_c
973     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
974     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutDouble3"}
975   \textcolor{keywordflow}{continue}
976     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
977     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
978     cause\_c = \textcolor{stringliteral}{""}
979 
980     \textcolor{comment}{! 初期設定チェック}
981     \textcolor{comment}{! Check initialization}
982     \textcolor{comment}{!}
983     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
984       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
985       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
986       \textcolor{keywordflow}{goto} 999
987 \textcolor{keywordflow}{    end if}
988 
989     \textcolor{comment}{! 時刻に関するエラー処理}
990     \textcolor{comment}{! Error handling for time}
991     \textcolor{comment}{!}
992     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
993       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
994       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
995         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
996         & c1 = trim( cause\_c ), c2 = trim( varname ) )
997       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
998       cause\_c = \textcolor{stringliteral}{'time'}
999       \textcolor{keywordflow}{goto} 999
1000 \textcolor{keywordflow}{    end if}
1001 
1002     \textcolor{comment}{! 変数 ID のサーチ}
1003     \textcolor{comment}{! Search variable ID}
1004     \textcolor{comment}{!}
1005     varsearch: \textcolor{keywordflow}{do}
1006       \textcolor{keywordflow}{do} i = svnum, numvars
1007         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
1008           vnum = i
1009           \textcolor{keywordflow}{exit} varsearch
1010 \textcolor{keywordflow}{        end if}
1011 \textcolor{keywordflow}{      end do}
1012       \textcolor{keywordflow}{do} i = 1, svnum - 1
1013         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
1014           vnum = i
1015           \textcolor{keywordflow}{exit} varsearch
1016 \textcolor{keywordflow}{        end if}
1017 \textcolor{keywordflow}{      end do}
1018 
1019       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
1020       cause\_c = varname
1021       \textcolor{keywordflow}{goto} 999
1022 \textcolor{keywordflow}{    end do} varsearch
1023 
1024     svnum = vnum
1025 
1026     \textcolor{comment}{! 定義モードからデータモードへ}
1027     \textcolor{comment}{! Transit from define mode to data mode}
1028     \textcolor{comment}{!}
1029     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
1030       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
1031 \textcolor{keywordflow}{    end if}
1032 
1033     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
1034     \textcolor{comment}{! Check output timing and create files}
1035     \textcolor{comment}{!}
1036     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
1037       &        time = time, &    \textcolor{comment}{! (in)}
1038       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
1039 
1040     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
1041     \textcolor{comment}{! Open, close, reopen files}
1042     \textcolor{comment}{!}
1043     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
1044       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
1045       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
1046         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
1047       histaddvar\_vars(vnum) = .true.
1048       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
1049         prev\_outtime\_vars(vnum) = time
1050       \textcolor{keywordflow}{else}
1051         flag\_output\_prev\_vars(vnum) = .true.
1052         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
1053           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
1054         \textcolor{keywordflow}{else}
1055           prev\_outtime\_vars(vnum) = time
1056 \textcolor{keywordflow}{        end if}
1057 \textcolor{keywordflow}{      end if}
1058 \textcolor{keywordflow}{    end if}
1059 
1060     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1061       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
1062         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
1063 \textcolor{keywordflow}{      end if}
1064 \textcolor{keywordflow}{    end if}
1065 
1066     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1067       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
1068         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
1069 \textcolor{keywordflow}{      end if}
1070       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
1071         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
1072       newfile\_createtime\_vars(vnum) = time
1073       prev\_outtime\_vars(vnum) = time
1074 \textcolor{keywordflow}{    end if}
1075 
1076     \textcolor{comment}{! 出力が有効かどうかを確認する}
1077     \textcolor{comment}{! Confirm whether the output is effective}
1078     \textcolor{comment}{!}
1079     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
1080       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1081 
1082       \textcolor{keywordflow}{goto} 999
1083 \textcolor{keywordflow}{    end if}
1084 
1085     \textcolor{comment}{! GT\_HISTORY 変数の取得}
1086     \textcolor{comment}{! Get "GT\_HISTORY" variable}
1087     \textcolor{comment}{!}
1088     gthist => gthst\_history\_vars(vnum) % gthist
1089 
1090 
1091     \textcolor{comment}{! 空間切り出し}
1092     \textcolor{comment}{! Slice of spaces}
1093     \textcolor{comment}{!}
1094                         sv => slice\_vars(vnum)
1095 
1096                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
1097                       
1098 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
1099                       
1100 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
1101                       
1102 
1103     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
1104                             & , sv%st(2):sv%ed(2):sv%sd(2) &
1105                       
1106       & , sv%st(3):sv%ed(3):sv%sd(3) &
1107                       
1108       & )
1109                     
1110 
1111 
1112     \textcolor{comment}{! 空間平均}
1113     \textcolor{comment}{! Spatial average}
1114     \textcolor{comment}{!}
1115                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
1116       array\_avr => array\_slice
1117     \textcolor{keywordflow}{else}
1118       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
1119         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
1120                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
1121                       
1122         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
1123                       
1124         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
1125                       
1126         & array\_avr )                       \textcolor{comment}{! (out)}
1127 \textcolor{keywordflow}{    end if}
1128 
1129     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
1130 
1131                     
1132 
1133     \textcolor{comment}{! 単位に応じて時刻を変換}
1134     \textcolor{comment}{! Convert time according to units}
1135     \textcolor{comment}{!}
1136     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
1137       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1138 
1139       settime = &
1140         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
1141 \textcolor{keywordflow}{    end if}
1142 
1143     \textcolor{comment}{! 時刻設定}
1144     \textcolor{comment}{! Set time}
1145     \textcolor{comment}{!}
1146     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1147       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
1148         & history = gthist, &   \textcolor{comment}{! (in) optional}
1149         & timed = settime )     \textcolor{comment}{! (in) optional}
1150 \textcolor{keywordflow}{    end if}
1151 
1152     \textcolor{comment}{! 出力}
1153     \textcolor{comment}{! OutPut}
1154     \textcolor{comment}{!}
1155     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1156       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
1157         & varname, &              \textcolor{comment}{! (in)}
1158                               & array\_avr, &            \textcolor{comment}{! (in)}
1159                       
1160         & timed = settime, &      \textcolor{comment}{! (in) optional}
1161         & time\_average\_store = &
1162         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
1163         & history = gthist )                  \textcolor{comment}{! (inout) optional}
1164     \textcolor{keywordflow}{else}
1165       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
1166         & varname, &              \textcolor{comment}{! (in)}
1167                               & array\_avr, &            \textcolor{comment}{! (in)}
1168                       
1169         & history = gthist )      \textcolor{comment}{! (inout) optional}
1170 \textcolor{keywordflow}{    end if}
1171 
1172     \textcolor{comment}{! 最後に出力した時刻を保存}
1173     \textcolor{comment}{! Save last time of output}
1174     \textcolor{comment}{!}
1175     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1176       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
1177         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1178 
1179         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
1180           prev\_outtime\_vars(vnum) = time
1181         \textcolor{keywordflow}{else}
1182           prev\_outtime\_vars(vnum) = &
1183             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
1184 \textcolor{keywordflow}{        end if}
1185 \textcolor{keywordflow}{      end if}
1186 \textcolor{keywordflow}{    end if}
1187 
1188     \textcolor{comment}{! 結合解除}
1189     \textcolor{comment}{! Release associations}
1190     \textcolor{comment}{!}
1191     \textcolor{keyword}{nullify}( gthist )
1192                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
1193                     
1194 
1195 999 \textcolor{keywordflow}{continue}
1196     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
1197     \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]{historyautoput_8f90_ae9bb1748387bd8c63ec57f59a958d11b_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a3c49865072fd0238ab94f5937bb34ba1}\label{historyautoput_8f90_a3c49865072fd0238ab94f5937bb34ba1}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputdouble4@{historyautoputdouble4}}
\index{historyautoputdouble4@{historyautoputdouble4}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputdouble4()}{historyautoputdouble4()}}
{\footnotesize\ttfamily subroutine historyautoputdouble4 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 1205 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
1205     \textcolor{comment}{!}
1206                     
1207     \textcolor{comment}{!}
1208 
1209     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
1210       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
1211       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
1212       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
1213       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
1214       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
1215       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
1216       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
1217       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
1218     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
1219       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
1220     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
1221     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
1222       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
1223     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
1224       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
1225       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
1226     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
1227     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
1228     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
1229     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
1230       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
1231     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
1232     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
1233       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
1234       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
1235     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
1236     \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}
1237     \textcolor{keywordtype}{implicit none}
1238     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
1239                     
1240     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
1241                     
1242     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:)
1243                     
1244     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
1245                     
1246 
1247     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
1248                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
1249                               \textcolor{comment}{! Derived type for "gtool\_history" module}
1250 
1251                         \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:) =>null()
1252     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
1253     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:) =>null()
1254                     
1255     \textcolor{keywordtype}{real(DP)}:: settime
1256     \textcolor{keywordtype}{integer}:: stat, i
1257     \textcolor{keywordtype}{integer}:: vnum
1258     \textcolor{keywordtype}{character(STRING)}:: cause\_c
1259     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
1260     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutDouble4"}
1261   \textcolor{keywordflow}{continue}
1262     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
1263     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
1264     cause\_c = \textcolor{stringliteral}{""}
1265 
1266     \textcolor{comment}{! 初期設定チェック}
1267     \textcolor{comment}{! Check initialization}
1268     \textcolor{comment}{!}
1269     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
1270       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
1271       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
1272       \textcolor{keywordflow}{goto} 999
1273 \textcolor{keywordflow}{    end if}
1274 
1275     \textcolor{comment}{! 時刻に関するエラー処理}
1276     \textcolor{comment}{! Error handling for time}
1277     \textcolor{comment}{!}
1278     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
1279       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
1280       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
1281         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
1282         & c1 = trim( cause\_c ), c2 = trim( varname ) )
1283       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
1284       cause\_c = \textcolor{stringliteral}{'time'}
1285       \textcolor{keywordflow}{goto} 999
1286 \textcolor{keywordflow}{    end if}
1287 
1288     \textcolor{comment}{! 変数 ID のサーチ}
1289     \textcolor{comment}{! Search variable ID}
1290     \textcolor{comment}{!}
1291     varsearch: \textcolor{keywordflow}{do}
1292       \textcolor{keywordflow}{do} i = svnum, numvars
1293         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
1294           vnum = i
1295           \textcolor{keywordflow}{exit} varsearch
1296 \textcolor{keywordflow}{        end if}
1297 \textcolor{keywordflow}{      end do}
1298       \textcolor{keywordflow}{do} i = 1, svnum - 1
1299         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
1300           vnum = i
1301           \textcolor{keywordflow}{exit} varsearch
1302 \textcolor{keywordflow}{        end if}
1303 \textcolor{keywordflow}{      end do}
1304 
1305       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
1306       cause\_c = varname
1307       \textcolor{keywordflow}{goto} 999
1308 \textcolor{keywordflow}{    end do} varsearch
1309 
1310     svnum = vnum
1311 
1312     \textcolor{comment}{! 定義モードからデータモードへ}
1313     \textcolor{comment}{! Transit from define mode to data mode}
1314     \textcolor{comment}{!}
1315     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
1316       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
1317 \textcolor{keywordflow}{    end if}
1318 
1319     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
1320     \textcolor{comment}{! Check output timing and create files}
1321     \textcolor{comment}{!}
1322     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
1323       &        time = time, &    \textcolor{comment}{! (in)}
1324       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
1325 
1326     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
1327     \textcolor{comment}{! Open, close, reopen files}
1328     \textcolor{comment}{!}
1329     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
1330       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
1331       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
1332         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
1333       histaddvar\_vars(vnum) = .true.
1334       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
1335         prev\_outtime\_vars(vnum) = time
1336       \textcolor{keywordflow}{else}
1337         flag\_output\_prev\_vars(vnum) = .true.
1338         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
1339           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
1340         \textcolor{keywordflow}{else}
1341           prev\_outtime\_vars(vnum) = time
1342 \textcolor{keywordflow}{        end if}
1343 \textcolor{keywordflow}{      end if}
1344 \textcolor{keywordflow}{    end if}
1345 
1346     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1347       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
1348         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
1349 \textcolor{keywordflow}{      end if}
1350 \textcolor{keywordflow}{    end if}
1351 
1352     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1353       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
1354         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
1355 \textcolor{keywordflow}{      end if}
1356       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
1357         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
1358       newfile\_createtime\_vars(vnum) = time
1359       prev\_outtime\_vars(vnum) = time
1360 \textcolor{keywordflow}{    end if}
1361 
1362     \textcolor{comment}{! 出力が有効かどうかを確認する}
1363     \textcolor{comment}{! Confirm whether the output is effective}
1364     \textcolor{comment}{!}
1365     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
1366       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1367 
1368       \textcolor{keywordflow}{goto} 999
1369 \textcolor{keywordflow}{    end if}
1370 
1371     \textcolor{comment}{! GT\_HISTORY 変数の取得}
1372     \textcolor{comment}{! Get "GT\_HISTORY" variable}
1373     \textcolor{comment}{!}
1374     gthist => gthst\_history\_vars(vnum) % gthist
1375 
1376 
1377     \textcolor{comment}{! 空間切り出し}
1378     \textcolor{comment}{! Slice of spaces}
1379     \textcolor{comment}{!}
1380                         sv => slice\_vars(vnum)
1381 
1382                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
1383                       
1384 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
1385                       
1386 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
1387                       
1388 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
1389                       
1390 
1391     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
1392                             & , sv%st(2):sv%ed(2):sv%sd(2) &
1393                       
1394       & , sv%st(3):sv%ed(3):sv%sd(3) &
1395                       
1396       & , sv%st(4):sv%ed(4):sv%sd(4) &
1397                       
1398       & )
1399                     
1400 
1401 
1402     \textcolor{comment}{! 空間平均}
1403     \textcolor{comment}{! Spatial average}
1404     \textcolor{comment}{!}
1405                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
1406       array\_avr => array\_slice
1407     \textcolor{keywordflow}{else}
1408       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
1409         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
1410                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
1411                       
1412         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
1413                       
1414         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
1415                       
1416         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
1417                       
1418         & array\_avr )                       \textcolor{comment}{! (out)}
1419 \textcolor{keywordflow}{    end if}
1420 
1421     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
1422 
1423                     
1424 
1425     \textcolor{comment}{! 単位に応じて時刻を変換}
1426     \textcolor{comment}{! Convert time according to units}
1427     \textcolor{comment}{!}
1428     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
1429       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1430 
1431       settime = &
1432         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
1433 \textcolor{keywordflow}{    end if}
1434 
1435     \textcolor{comment}{! 時刻設定}
1436     \textcolor{comment}{! Set time}
1437     \textcolor{comment}{!}
1438     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1439       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
1440         & history = gthist, &   \textcolor{comment}{! (in) optional}
1441         & timed = settime )     \textcolor{comment}{! (in) optional}
1442 \textcolor{keywordflow}{    end if}
1443 
1444     \textcolor{comment}{! 出力}
1445     \textcolor{comment}{! OutPut}
1446     \textcolor{comment}{!}
1447     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1448       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
1449         & varname, &              \textcolor{comment}{! (in)}
1450                               & array\_avr, &            \textcolor{comment}{! (in)}
1451                       
1452         & timed = settime, &      \textcolor{comment}{! (in) optional}
1453         & time\_average\_store = &
1454         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
1455         & history = gthist )                  \textcolor{comment}{! (inout) optional}
1456     \textcolor{keywordflow}{else}
1457       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
1458         & varname, &              \textcolor{comment}{! (in)}
1459                               & array\_avr, &            \textcolor{comment}{! (in)}
1460                       
1461         & history = gthist )      \textcolor{comment}{! (inout) optional}
1462 \textcolor{keywordflow}{    end if}
1463 
1464     \textcolor{comment}{! 最後に出力した時刻を保存}
1465     \textcolor{comment}{! Save last time of output}
1466     \textcolor{comment}{!}
1467     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1468       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
1469         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1470 
1471         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
1472           prev\_outtime\_vars(vnum) = time
1473         \textcolor{keywordflow}{else}
1474           prev\_outtime\_vars(vnum) = &
1475             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
1476 \textcolor{keywordflow}{        end if}
1477 \textcolor{keywordflow}{      end if}
1478 \textcolor{keywordflow}{    end if}
1479 
1480     \textcolor{comment}{! 結合解除}
1481     \textcolor{comment}{! Release associations}
1482     \textcolor{comment}{!}
1483     \textcolor{keyword}{nullify}( gthist )
1484                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
1485                     
1486 
1487 999 \textcolor{keywordflow}{continue}
1488     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
1489     \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]{historyautoput_8f90_a3c49865072fd0238ab94f5937bb34ba1_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a3f3a22f9c8ab605f0324ad5441e27735}\label{historyautoput_8f90_a3f3a22f9c8ab605f0324ad5441e27735}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputdouble5@{historyautoputdouble5}}
\index{historyautoputdouble5@{historyautoputdouble5}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputdouble5()}{historyautoputdouble5()}}
{\footnotesize\ttfamily subroutine historyautoputdouble5 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 1497 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
1497     \textcolor{comment}{!}
1498                     
1499     \textcolor{comment}{!}
1500 
1501     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
1502       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
1503       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
1504       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
1505       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
1506       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
1507       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
1508       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
1509       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
1510     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
1511       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
1512     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
1513     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
1514       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
1515     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
1516       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
1517       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
1518     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
1519     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
1520     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
1521     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
1522       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
1523     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
1524     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
1525       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
1526       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
1527     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
1528     \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}
1529     \textcolor{keywordtype}{implicit none}
1530     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
1531                     
1532     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
1533                     
1534     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:)
1535                     
1536     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
1537                     
1538 
1539     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
1540                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
1541                               \textcolor{comment}{! Derived type for "gtool\_history" module}
1542 
1543                         \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:) =>null()
1544     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
1545     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:) =>null()
1546                     
1547     \textcolor{keywordtype}{real(DP)}:: settime
1548     \textcolor{keywordtype}{integer}:: stat, i
1549     \textcolor{keywordtype}{integer}:: vnum
1550     \textcolor{keywordtype}{character(STRING)}:: cause\_c
1551     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
1552     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutDouble5"}
1553   \textcolor{keywordflow}{continue}
1554     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
1555     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
1556     cause\_c = \textcolor{stringliteral}{""}
1557 
1558     \textcolor{comment}{! 初期設定チェック}
1559     \textcolor{comment}{! Check initialization}
1560     \textcolor{comment}{!}
1561     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
1562       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
1563       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
1564       \textcolor{keywordflow}{goto} 999
1565 \textcolor{keywordflow}{    end if}
1566 
1567     \textcolor{comment}{! 時刻に関するエラー処理}
1568     \textcolor{comment}{! Error handling for time}
1569     \textcolor{comment}{!}
1570     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
1571       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
1572       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
1573         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
1574         & c1 = trim( cause\_c ), c2 = trim( varname ) )
1575       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
1576       cause\_c = \textcolor{stringliteral}{'time'}
1577       \textcolor{keywordflow}{goto} 999
1578 \textcolor{keywordflow}{    end if}
1579 
1580     \textcolor{comment}{! 変数 ID のサーチ}
1581     \textcolor{comment}{! Search variable ID}
1582     \textcolor{comment}{!}
1583     varsearch: \textcolor{keywordflow}{do}
1584       \textcolor{keywordflow}{do} i = svnum, numvars
1585         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
1586           vnum = i
1587           \textcolor{keywordflow}{exit} varsearch
1588 \textcolor{keywordflow}{        end if}
1589 \textcolor{keywordflow}{      end do}
1590       \textcolor{keywordflow}{do} i = 1, svnum - 1
1591         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
1592           vnum = i
1593           \textcolor{keywordflow}{exit} varsearch
1594 \textcolor{keywordflow}{        end if}
1595 \textcolor{keywordflow}{      end do}
1596 
1597       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
1598       cause\_c = varname
1599       \textcolor{keywordflow}{goto} 999
1600 \textcolor{keywordflow}{    end do} varsearch
1601 
1602     svnum = vnum
1603 
1604     \textcolor{comment}{! 定義モードからデータモードへ}
1605     \textcolor{comment}{! Transit from define mode to data mode}
1606     \textcolor{comment}{!}
1607     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
1608       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
1609 \textcolor{keywordflow}{    end if}
1610 
1611     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
1612     \textcolor{comment}{! Check output timing and create files}
1613     \textcolor{comment}{!}
1614     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
1615       &        time = time, &    \textcolor{comment}{! (in)}
1616       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
1617 
1618     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
1619     \textcolor{comment}{! Open, close, reopen files}
1620     \textcolor{comment}{!}
1621     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
1622       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
1623       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
1624         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
1625       histaddvar\_vars(vnum) = .true.
1626       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
1627         prev\_outtime\_vars(vnum) = time
1628       \textcolor{keywordflow}{else}
1629         flag\_output\_prev\_vars(vnum) = .true.
1630         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
1631           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
1632         \textcolor{keywordflow}{else}
1633           prev\_outtime\_vars(vnum) = time
1634 \textcolor{keywordflow}{        end if}
1635 \textcolor{keywordflow}{      end if}
1636 \textcolor{keywordflow}{    end if}
1637 
1638     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1639       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
1640         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
1641 \textcolor{keywordflow}{      end if}
1642 \textcolor{keywordflow}{    end if}
1643 
1644     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1645       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
1646         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
1647 \textcolor{keywordflow}{      end if}
1648       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
1649         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
1650       newfile\_createtime\_vars(vnum) = time
1651       prev\_outtime\_vars(vnum) = time
1652 \textcolor{keywordflow}{    end if}
1653 
1654     \textcolor{comment}{! 出力が有効かどうかを確認する}
1655     \textcolor{comment}{! Confirm whether the output is effective}
1656     \textcolor{comment}{!}
1657     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
1658       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1659 
1660       \textcolor{keywordflow}{goto} 999
1661 \textcolor{keywordflow}{    end if}
1662 
1663     \textcolor{comment}{! GT\_HISTORY 変数の取得}
1664     \textcolor{comment}{! Get "GT\_HISTORY" variable}
1665     \textcolor{comment}{!}
1666     gthist => gthst\_history\_vars(vnum) % gthist
1667 
1668 
1669     \textcolor{comment}{! 空間切り出し}
1670     \textcolor{comment}{! Slice of spaces}
1671     \textcolor{comment}{!}
1672                         sv => slice\_vars(vnum)
1673 
1674                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
1675                       
1676 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
1677                       
1678 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
1679                       
1680 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
1681                       
1682 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
1683                       
1684 
1685     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
1686                             & , sv%st(2):sv%ed(2):sv%sd(2) &
1687                       
1688       & , sv%st(3):sv%ed(3):sv%sd(3) &
1689                       
1690       & , sv%st(4):sv%ed(4):sv%sd(4) &
1691                       
1692       & , sv%st(5):sv%ed(5):sv%sd(5) &
1693                       
1694       & )
1695                     
1696 
1697 
1698     \textcolor{comment}{! 空間平均}
1699     \textcolor{comment}{! Spatial average}
1700     \textcolor{comment}{!}
1701                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
1702       array\_avr => array\_slice
1703     \textcolor{keywordflow}{else}
1704       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
1705         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
1706                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
1707                       
1708         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
1709                       
1710         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
1711                       
1712         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
1713                       
1714         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
1715                       
1716         & array\_avr )                       \textcolor{comment}{! (out)}
1717 \textcolor{keywordflow}{    end if}
1718 
1719     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
1720 
1721                     
1722 
1723     \textcolor{comment}{! 単位に応じて時刻を変換}
1724     \textcolor{comment}{! Convert time according to units}
1725     \textcolor{comment}{!}
1726     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
1727       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1728 
1729       settime = &
1730         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
1731 \textcolor{keywordflow}{    end if}
1732 
1733     \textcolor{comment}{! 時刻設定}
1734     \textcolor{comment}{! Set time}
1735     \textcolor{comment}{!}
1736     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1737       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
1738         & history = gthist, &   \textcolor{comment}{! (in) optional}
1739         & timed = settime )     \textcolor{comment}{! (in) optional}
1740 \textcolor{keywordflow}{    end if}
1741 
1742     \textcolor{comment}{! 出力}
1743     \textcolor{comment}{! OutPut}
1744     \textcolor{comment}{!}
1745     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1746       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
1747         & varname, &              \textcolor{comment}{! (in)}
1748                               & array\_avr, &            \textcolor{comment}{! (in)}
1749                       
1750         & timed = settime, &      \textcolor{comment}{! (in) optional}
1751         & time\_average\_store = &
1752         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
1753         & history = gthist )                  \textcolor{comment}{! (inout) optional}
1754     \textcolor{keywordflow}{else}
1755       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
1756         & varname, &              \textcolor{comment}{! (in)}
1757                               & array\_avr, &            \textcolor{comment}{! (in)}
1758                       
1759         & history = gthist )      \textcolor{comment}{! (inout) optional}
1760 \textcolor{keywordflow}{    end if}
1761 
1762     \textcolor{comment}{! 最後に出力した時刻を保存}
1763     \textcolor{comment}{! Save last time of output}
1764     \textcolor{comment}{!}
1765     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1766       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
1767         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1768 
1769         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
1770           prev\_outtime\_vars(vnum) = time
1771         \textcolor{keywordflow}{else}
1772           prev\_outtime\_vars(vnum) = &
1773             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
1774 \textcolor{keywordflow}{        end if}
1775 \textcolor{keywordflow}{      end if}
1776 \textcolor{keywordflow}{    end if}
1777 
1778     \textcolor{comment}{! 結合解除}
1779     \textcolor{comment}{! Release associations}
1780     \textcolor{comment}{!}
1781     \textcolor{keyword}{nullify}( gthist )
1782                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
1783                     
1784 
1785 999 \textcolor{keywordflow}{continue}
1786     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
1787     \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]{historyautoput_8f90_a3f3a22f9c8ab605f0324ad5441e27735_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a7cd6c0733616994e6af9eccf718d4ca4}\label{historyautoput_8f90_a7cd6c0733616994e6af9eccf718d4ca4}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputdouble6@{historyautoputdouble6}}
\index{historyautoputdouble6@{historyautoputdouble6}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputdouble6()}{historyautoputdouble6()}}
{\footnotesize\ttfamily subroutine historyautoputdouble6 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 1795 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
1795     \textcolor{comment}{!}
1796                     
1797     \textcolor{comment}{!}
1798 
1799     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
1800       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
1801       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
1802       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
1803       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
1804       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
1805       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
1806       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
1807       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
1808     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
1809       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
1810     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
1811     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
1812       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
1813     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
1814       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
1815       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
1816     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
1817     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
1818     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
1819     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
1820       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
1821     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
1822     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
1823       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
1824       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
1825     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
1826     \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}
1827     \textcolor{keywordtype}{implicit none}
1828     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
1829                     
1830     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
1831                     
1832     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:)
1833                     
1834     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
1835                     
1836 
1837     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
1838                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
1839                               \textcolor{comment}{! Derived type for "gtool\_history" module}
1840 
1841                         \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:,:) =>null()
1842     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
1843     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:,:) =>null()
1844                     
1845     \textcolor{keywordtype}{real(DP)}:: settime
1846     \textcolor{keywordtype}{integer}:: stat, i
1847     \textcolor{keywordtype}{integer}:: vnum
1848     \textcolor{keywordtype}{character(STRING)}:: cause\_c
1849     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
1850     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutDouble6"}
1851   \textcolor{keywordflow}{continue}
1852     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
1853     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
1854     cause\_c = \textcolor{stringliteral}{""}
1855 
1856     \textcolor{comment}{! 初期設定チェック}
1857     \textcolor{comment}{! Check initialization}
1858     \textcolor{comment}{!}
1859     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
1860       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
1861       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
1862       \textcolor{keywordflow}{goto} 999
1863 \textcolor{keywordflow}{    end if}
1864 
1865     \textcolor{comment}{! 時刻に関するエラー処理}
1866     \textcolor{comment}{! Error handling for time}
1867     \textcolor{comment}{!}
1868     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
1869       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
1870       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
1871         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
1872         & c1 = trim( cause\_c ), c2 = trim( varname ) )
1873       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
1874       cause\_c = \textcolor{stringliteral}{'time'}
1875       \textcolor{keywordflow}{goto} 999
1876 \textcolor{keywordflow}{    end if}
1877 
1878     \textcolor{comment}{! 変数 ID のサーチ}
1879     \textcolor{comment}{! Search variable ID}
1880     \textcolor{comment}{!}
1881     varsearch: \textcolor{keywordflow}{do}
1882       \textcolor{keywordflow}{do} i = svnum, numvars
1883         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
1884           vnum = i
1885           \textcolor{keywordflow}{exit} varsearch
1886 \textcolor{keywordflow}{        end if}
1887 \textcolor{keywordflow}{      end do}
1888       \textcolor{keywordflow}{do} i = 1, svnum - 1
1889         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
1890           vnum = i
1891           \textcolor{keywordflow}{exit} varsearch
1892 \textcolor{keywordflow}{        end if}
1893 \textcolor{keywordflow}{      end do}
1894 
1895       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
1896       cause\_c = varname
1897       \textcolor{keywordflow}{goto} 999
1898 \textcolor{keywordflow}{    end do} varsearch
1899 
1900     svnum = vnum
1901 
1902     \textcolor{comment}{! 定義モードからデータモードへ}
1903     \textcolor{comment}{! Transit from define mode to data mode}
1904     \textcolor{comment}{!}
1905     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
1906       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
1907 \textcolor{keywordflow}{    end if}
1908 
1909     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
1910     \textcolor{comment}{! Check output timing and create files}
1911     \textcolor{comment}{!}
1912     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
1913       &        time = time, &    \textcolor{comment}{! (in)}
1914       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
1915 
1916     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
1917     \textcolor{comment}{! Open, close, reopen files}
1918     \textcolor{comment}{!}
1919     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
1920       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
1921       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
1922         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
1923       histaddvar\_vars(vnum) = .true.
1924       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
1925         prev\_outtime\_vars(vnum) = time
1926       \textcolor{keywordflow}{else}
1927         flag\_output\_prev\_vars(vnum) = .true.
1928         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
1929           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
1930         \textcolor{keywordflow}{else}
1931           prev\_outtime\_vars(vnum) = time
1932 \textcolor{keywordflow}{        end if}
1933 \textcolor{keywordflow}{      end if}
1934 \textcolor{keywordflow}{    end if}
1935 
1936     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1937       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
1938         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
1939 \textcolor{keywordflow}{      end if}
1940 \textcolor{keywordflow}{    end if}
1941 
1942     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1943       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
1944         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
1945 \textcolor{keywordflow}{      end if}
1946       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
1947         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
1948       newfile\_createtime\_vars(vnum) = time
1949       prev\_outtime\_vars(vnum) = time
1950 \textcolor{keywordflow}{    end if}
1951 
1952     \textcolor{comment}{! 出力が有効かどうかを確認する}
1953     \textcolor{comment}{! Confirm whether the output is effective}
1954     \textcolor{comment}{!}
1955     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
1956       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
1957 
1958       \textcolor{keywordflow}{goto} 999
1959 \textcolor{keywordflow}{    end if}
1960 
1961     \textcolor{comment}{! GT\_HISTORY 変数の取得}
1962     \textcolor{comment}{! Get "GT\_HISTORY" variable}
1963     \textcolor{comment}{!}
1964     gthist => gthst\_history\_vars(vnum) % gthist
1965 
1966 
1967     \textcolor{comment}{! 空間切り出し}
1968     \textcolor{comment}{! Slice of spaces}
1969     \textcolor{comment}{!}
1970                         sv => slice\_vars(vnum)
1971 
1972                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
1973                       
1974 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
1975                       
1976 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
1977                       
1978 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
1979                       
1980 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
1981                       
1982 \textcolor{comment}{!!$        write(*,*) '  sv%st(6), sv%ed(6), sv%sd(6)=', sv%st(6), sv%ed(6), sv%sd(6)}
1983                       
1984 
1985     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
1986                             & , sv%st(2):sv%ed(2):sv%sd(2) &
1987                       
1988       & , sv%st(3):sv%ed(3):sv%sd(3) &
1989                       
1990       & , sv%st(4):sv%ed(4):sv%sd(4) &
1991                       
1992       & , sv%st(5):sv%ed(5):sv%sd(5) &
1993                       
1994       & , sv%st(6):sv%ed(6):sv%sd(6) &
1995                       
1996       & )
1997                     
1998 
1999 
2000     \textcolor{comment}{! 空間平均}
2001     \textcolor{comment}{! Spatial average}
2002     \textcolor{comment}{!}
2003                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
2004       array\_avr => array\_slice
2005     \textcolor{keywordflow}{else}
2006       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
2007         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
2008                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
2009                       
2010         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
2011                       
2012         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
2013                       
2014         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
2015                       
2016         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
2017                       
2018         & weight\_vars(vnum) % wgt6( sv%st(6):sv%ed(6):sv%sd(6) ) , &   \textcolor{comment}{! (in)}
2019                       
2020         & array\_avr )                       \textcolor{comment}{! (out)}
2021 \textcolor{keywordflow}{    end if}
2022 
2023     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
2024 
2025                     
2026 
2027     \textcolor{comment}{! 単位に応じて時刻を変換}
2028     \textcolor{comment}{! Convert time according to units}
2029     \textcolor{comment}{!}
2030     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
2031       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2032 
2033       settime = &
2034         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
2035 \textcolor{keywordflow}{    end if}
2036 
2037     \textcolor{comment}{! 時刻設定}
2038     \textcolor{comment}{! Set time}
2039     \textcolor{comment}{!}
2040     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2041       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
2042         & history = gthist, &   \textcolor{comment}{! (in) optional}
2043         & timed = settime )     \textcolor{comment}{! (in) optional}
2044 \textcolor{keywordflow}{    end if}
2045 
2046     \textcolor{comment}{! 出力}
2047     \textcolor{comment}{! OutPut}
2048     \textcolor{comment}{!}
2049     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2050       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
2051         & varname, &              \textcolor{comment}{! (in)}
2052                               & array\_avr, &            \textcolor{comment}{! (in)}
2053                       
2054         & timed = settime, &      \textcolor{comment}{! (in) optional}
2055         & time\_average\_store = &
2056         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
2057         & history = gthist )                  \textcolor{comment}{! (inout) optional}
2058     \textcolor{keywordflow}{else}
2059       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
2060         & varname, &              \textcolor{comment}{! (in)}
2061                               & array\_avr, &            \textcolor{comment}{! (in)}
2062                       
2063         & history = gthist )      \textcolor{comment}{! (inout) optional}
2064 \textcolor{keywordflow}{    end if}
2065 
2066     \textcolor{comment}{! 最後に出力した時刻を保存}
2067     \textcolor{comment}{! Save last time of output}
2068     \textcolor{comment}{!}
2069     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2070       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
2071         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2072 
2073         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
2074           prev\_outtime\_vars(vnum) = time
2075         \textcolor{keywordflow}{else}
2076           prev\_outtime\_vars(vnum) = &
2077             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
2078 \textcolor{keywordflow}{        end if}
2079 \textcolor{keywordflow}{      end if}
2080 \textcolor{keywordflow}{    end if}
2081 
2082     \textcolor{comment}{! 結合解除}
2083     \textcolor{comment}{! Release associations}
2084     \textcolor{comment}{!}
2085     \textcolor{keyword}{nullify}( gthist )
2086                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
2087                     
2088 
2089 999 \textcolor{keywordflow}{continue}
2090     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
2091     \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]{historyautoput_8f90_a7cd6c0733616994e6af9eccf718d4ca4_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a4731766cf9e51d5dfe5b5f039a197284}\label{historyautoput_8f90_a4731766cf9e51d5dfe5b5f039a197284}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputdouble7@{historyautoputdouble7}}
\index{historyautoputdouble7@{historyautoputdouble7}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputdouble7()}{historyautoputdouble7()}}
{\footnotesize\ttfamily subroutine historyautoputdouble7 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 2099 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
2099     \textcolor{comment}{!}
2100                     
2101     \textcolor{comment}{!}
2102 
2103     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
2104       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
2105       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
2106       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
2107       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
2108       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
2109       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
2110       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
2111       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
2112     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
2113       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
2114     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
2115     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
2116       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
2117     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
2118       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
2119       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
2120     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
2121     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
2122     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
2123     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
2124       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
2125     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
2126     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
2127       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
2128       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
2129     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
2130     \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}
2131     \textcolor{keywordtype}{implicit none}
2132     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
2133                     
2134     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
2135                     
2136     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:,:)
2137                     
2138     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
2139                     
2140 
2141     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
2142                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
2143                               \textcolor{comment}{! Derived type for "gtool\_history" module}
2144 
2145                         \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:,:,:) =>null()
2146     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
2147     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:,:,:) =>null()
2148                     
2149     \textcolor{keywordtype}{real(DP)}:: settime
2150     \textcolor{keywordtype}{integer}:: stat, i
2151     \textcolor{keywordtype}{integer}:: vnum
2152     \textcolor{keywordtype}{character(STRING)}:: cause\_c
2153     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
2154     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutDouble7"}
2155   \textcolor{keywordflow}{continue}
2156     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
2157     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
2158     cause\_c = \textcolor{stringliteral}{""}
2159 
2160     \textcolor{comment}{! 初期設定チェック}
2161     \textcolor{comment}{! Check initialization}
2162     \textcolor{comment}{!}
2163     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
2164       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
2165       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
2166       \textcolor{keywordflow}{goto} 999
2167 \textcolor{keywordflow}{    end if}
2168 
2169     \textcolor{comment}{! 時刻に関するエラー処理}
2170     \textcolor{comment}{! Error handling for time}
2171     \textcolor{comment}{!}
2172     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
2173       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
2174       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
2175         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
2176         & c1 = trim( cause\_c ), c2 = trim( varname ) )
2177       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
2178       cause\_c = \textcolor{stringliteral}{'time'}
2179       \textcolor{keywordflow}{goto} 999
2180 \textcolor{keywordflow}{    end if}
2181 
2182     \textcolor{comment}{! 変数 ID のサーチ}
2183     \textcolor{comment}{! Search variable ID}
2184     \textcolor{comment}{!}
2185     varsearch: \textcolor{keywordflow}{do}
2186       \textcolor{keywordflow}{do} i = svnum, numvars
2187         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
2188           vnum = i
2189           \textcolor{keywordflow}{exit} varsearch
2190 \textcolor{keywordflow}{        end if}
2191 \textcolor{keywordflow}{      end do}
2192       \textcolor{keywordflow}{do} i = 1, svnum - 1
2193         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
2194           vnum = i
2195           \textcolor{keywordflow}{exit} varsearch
2196 \textcolor{keywordflow}{        end if}
2197 \textcolor{keywordflow}{      end do}
2198 
2199       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
2200       cause\_c = varname
2201       \textcolor{keywordflow}{goto} 999
2202 \textcolor{keywordflow}{    end do} varsearch
2203 
2204     svnum = vnum
2205 
2206     \textcolor{comment}{! 定義モードからデータモードへ}
2207     \textcolor{comment}{! Transit from define mode to data mode}
2208     \textcolor{comment}{!}
2209     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
2210       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
2211 \textcolor{keywordflow}{    end if}
2212 
2213     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
2214     \textcolor{comment}{! Check output timing and create files}
2215     \textcolor{comment}{!}
2216     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
2217       &        time = time, &    \textcolor{comment}{! (in)}
2218       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
2219 
2220     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
2221     \textcolor{comment}{! Open, close, reopen files}
2222     \textcolor{comment}{!}
2223     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
2224       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
2225       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
2226         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
2227       histaddvar\_vars(vnum) = .true.
2228       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
2229         prev\_outtime\_vars(vnum) = time
2230       \textcolor{keywordflow}{else}
2231         flag\_output\_prev\_vars(vnum) = .true.
2232         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
2233           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
2234         \textcolor{keywordflow}{else}
2235           prev\_outtime\_vars(vnum) = time
2236 \textcolor{keywordflow}{        end if}
2237 \textcolor{keywordflow}{      end if}
2238 \textcolor{keywordflow}{    end if}
2239 
2240     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2241       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
2242         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
2243 \textcolor{keywordflow}{      end if}
2244 \textcolor{keywordflow}{    end if}
2245 
2246     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2247       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
2248         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
2249 \textcolor{keywordflow}{      end if}
2250       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
2251         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
2252       newfile\_createtime\_vars(vnum) = time
2253       prev\_outtime\_vars(vnum) = time
2254 \textcolor{keywordflow}{    end if}
2255 
2256     \textcolor{comment}{! 出力が有効かどうかを確認する}
2257     \textcolor{comment}{! Confirm whether the output is effective}
2258     \textcolor{comment}{!}
2259     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
2260       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2261 
2262       \textcolor{keywordflow}{goto} 999
2263 \textcolor{keywordflow}{    end if}
2264 
2265     \textcolor{comment}{! GT\_HISTORY 変数の取得}
2266     \textcolor{comment}{! Get "GT\_HISTORY" variable}
2267     \textcolor{comment}{!}
2268     gthist => gthst\_history\_vars(vnum) % gthist
2269 
2270 
2271     \textcolor{comment}{! 空間切り出し}
2272     \textcolor{comment}{! Slice of spaces}
2273     \textcolor{comment}{!}
2274                         sv => slice\_vars(vnum)
2275 
2276                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
2277                       
2278 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
2279                       
2280 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
2281                       
2282 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
2283                       
2284 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
2285                       
2286 \textcolor{comment}{!!$        write(*,*) '  sv%st(6), sv%ed(6), sv%sd(6)=', sv%st(6), sv%ed(6), sv%sd(6)}
2287                       
2288 \textcolor{comment}{!!$        write(*,*) '  sv%st(7), sv%ed(7), sv%sd(7)=', sv%st(7), sv%ed(7), sv%sd(7)}
2289                       
2290 
2291     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
2292                             & , sv%st(2):sv%ed(2):sv%sd(2) &
2293                       
2294       & , sv%st(3):sv%ed(3):sv%sd(3) &
2295                       
2296       & , sv%st(4):sv%ed(4):sv%sd(4) &
2297                       
2298       & , sv%st(5):sv%ed(5):sv%sd(5) &
2299                       
2300       & , sv%st(6):sv%ed(6):sv%sd(6) &
2301                       
2302       & , sv%st(7):sv%ed(7):sv%sd(7) &
2303                       
2304       & )
2305                     
2306 
2307 
2308     \textcolor{comment}{! 空間平均}
2309     \textcolor{comment}{! Spatial average}
2310     \textcolor{comment}{!}
2311                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
2312       array\_avr => array\_slice
2313     \textcolor{keywordflow}{else}
2314       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
2315         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
2316                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
2317                       
2318         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
2319                       
2320         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
2321                       
2322         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
2323                       
2324         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
2325                       
2326         & weight\_vars(vnum) % wgt6( sv%st(6):sv%ed(6):sv%sd(6) ) , &   \textcolor{comment}{! (in)}
2327                       
2328         & weight\_vars(vnum) % wgt7( sv%st(7):sv%ed(7):sv%sd(7) ) , &   \textcolor{comment}{! (in)}
2329                       
2330         & array\_avr )                       \textcolor{comment}{! (out)}
2331 \textcolor{keywordflow}{    end if}
2332 
2333     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
2334 
2335                     
2336 
2337     \textcolor{comment}{! 単位に応じて時刻を変換}
2338     \textcolor{comment}{! Convert time according to units}
2339     \textcolor{comment}{!}
2340     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
2341       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2342 
2343       settime = &
2344         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
2345 \textcolor{keywordflow}{    end if}
2346 
2347     \textcolor{comment}{! 時刻設定}
2348     \textcolor{comment}{! Set time}
2349     \textcolor{comment}{!}
2350     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2351       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
2352         & history = gthist, &   \textcolor{comment}{! (in) optional}
2353         & timed = settime )     \textcolor{comment}{! (in) optional}
2354 \textcolor{keywordflow}{    end if}
2355 
2356     \textcolor{comment}{! 出力}
2357     \textcolor{comment}{! OutPut}
2358     \textcolor{comment}{!}
2359     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2360       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
2361         & varname, &              \textcolor{comment}{! (in)}
2362                               & array\_avr, &            \textcolor{comment}{! (in)}
2363                       
2364         & timed = settime, &      \textcolor{comment}{! (in) optional}
2365         & time\_average\_store = &
2366         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
2367         & history = gthist )                  \textcolor{comment}{! (inout) optional}
2368     \textcolor{keywordflow}{else}
2369       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
2370         & varname, &              \textcolor{comment}{! (in)}
2371                               & array\_avr, &            \textcolor{comment}{! (in)}
2372                       
2373         & history = gthist )      \textcolor{comment}{! (inout) optional}
2374 \textcolor{keywordflow}{    end if}
2375 
2376     \textcolor{comment}{! 最後に出力した時刻を保存}
2377     \textcolor{comment}{! Save last time of output}
2378     \textcolor{comment}{!}
2379     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2380       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
2381         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2382 
2383         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
2384           prev\_outtime\_vars(vnum) = time
2385         \textcolor{keywordflow}{else}
2386           prev\_outtime\_vars(vnum) = &
2387             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
2388 \textcolor{keywordflow}{        end if}
2389 \textcolor{keywordflow}{      end if}
2390 \textcolor{keywordflow}{    end if}
2391 
2392     \textcolor{comment}{! 結合解除}
2393     \textcolor{comment}{! Release associations}
2394     \textcolor{comment}{!}
2395     \textcolor{keyword}{nullify}( gthist )
2396                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
2397                     
2398 
2399 999 \textcolor{keywordflow}{continue}
2400     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
2401     \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]{historyautoput_8f90_a4731766cf9e51d5dfe5b5f039a197284_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a845ed32e338aa09b97f6c1f18fff208b}\label{historyautoput_8f90_a845ed32e338aa09b97f6c1f18fff208b}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputint0@{historyautoputint0}}
\index{historyautoputint0@{historyautoputint0}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputint0()}{historyautoputint0()}}
{\footnotesize\ttfamily subroutine historyautoputint0 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, intent(in), target}]{value,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 4707 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
4707     \textcolor{comment}{!}
4708                                         
4709     \textcolor{comment}{!}
4710 
4711     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
4712       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
4713       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
4714       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
4715       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
4716       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
4717       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
4718       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
4719       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
4720     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
4721       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
4722     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
4723     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
4724       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
4725     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
4726       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
4727       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
4728     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
4729     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
4730     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
4731     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
4732       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
4733     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
4734     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
4735       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
4736       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
4737     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
4738     \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}
4739     \textcolor{keywordtype}{implicit none}
4740     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
4741                                         
4742     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
4743                                         
4744     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: value
4745                                         
4746     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
4747                                         
4748 
4749     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
4750                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
4751                               \textcolor{comment}{! Derived type for "gtool\_history" module}
4752 
4753                                         
4754     \textcolor{keywordtype}{real(DP)}:: settime
4755     \textcolor{keywordtype}{integer}:: stat, i
4756     \textcolor{keywordtype}{integer}:: vnum
4757     \textcolor{keywordtype}{character(STRING)}:: cause\_c
4758     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
4759     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutInt0"}
4760   \textcolor{keywordflow}{continue}
4761     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
4762     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
4763     cause\_c = \textcolor{stringliteral}{""}
4764 
4765     \textcolor{comment}{! 初期設定チェック}
4766     \textcolor{comment}{! Check initialization}
4767     \textcolor{comment}{!}
4768     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
4769       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
4770       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
4771       \textcolor{keywordflow}{goto} 999
4772 \textcolor{keywordflow}{    end if}
4773 
4774     \textcolor{comment}{! 時刻に関するエラー処理}
4775     \textcolor{comment}{! Error handling for time}
4776     \textcolor{comment}{!}
4777     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
4778       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
4779       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
4780         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
4781         & c1 = trim( cause\_c ), c2 = trim( varname ) )
4782       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
4783       cause\_c = \textcolor{stringliteral}{'time'}
4784       \textcolor{keywordflow}{goto} 999
4785 \textcolor{keywordflow}{    end if}
4786 
4787     \textcolor{comment}{! 変数 ID のサーチ}
4788     \textcolor{comment}{! Search variable ID}
4789     \textcolor{comment}{!}
4790     varsearch: \textcolor{keywordflow}{do}
4791       \textcolor{keywordflow}{do} i = svnum, numvars
4792         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
4793           vnum = i
4794           \textcolor{keywordflow}{exit} varsearch
4795 \textcolor{keywordflow}{        end if}
4796 \textcolor{keywordflow}{      end do}
4797       \textcolor{keywordflow}{do} i = 1, svnum - 1
4798         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
4799           vnum = i
4800           \textcolor{keywordflow}{exit} varsearch
4801 \textcolor{keywordflow}{        end if}
4802 \textcolor{keywordflow}{      end do}
4803 
4804       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
4805       cause\_c = varname
4806       \textcolor{keywordflow}{goto} 999
4807 \textcolor{keywordflow}{    end do} varsearch
4808 
4809     svnum = vnum
4810 
4811     \textcolor{comment}{! 定義モードからデータモードへ}
4812     \textcolor{comment}{! Transit from define mode to data mode}
4813     \textcolor{comment}{!}
4814     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
4815       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
4816 \textcolor{keywordflow}{    end if}
4817 
4818     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
4819     \textcolor{comment}{! Check output timing and create files}
4820     \textcolor{comment}{!}
4821     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
4822       &        time = time, &    \textcolor{comment}{! (in)}
4823       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
4824 
4825     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
4826     \textcolor{comment}{! Open, close, reopen files}
4827     \textcolor{comment}{!}
4828     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
4829       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
4830       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
4831         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
4832       histaddvar\_vars(vnum) = .true.
4833       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
4834         prev\_outtime\_vars(vnum) = time
4835       \textcolor{keywordflow}{else}
4836         flag\_output\_prev\_vars(vnum) = .true.
4837         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
4838           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
4839         \textcolor{keywordflow}{else}
4840           prev\_outtime\_vars(vnum) = time
4841 \textcolor{keywordflow}{        end if}
4842 \textcolor{keywordflow}{      end if}
4843 \textcolor{keywordflow}{    end if}
4844 
4845     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4846       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
4847         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
4848 \textcolor{keywordflow}{      end if}
4849 \textcolor{keywordflow}{    end if}
4850 
4851     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4852       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
4853         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
4854 \textcolor{keywordflow}{      end if}
4855       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
4856         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
4857       newfile\_createtime\_vars(vnum) = time
4858       prev\_outtime\_vars(vnum) = time
4859 \textcolor{keywordflow}{    end if}
4860 
4861     \textcolor{comment}{! 出力が有効かどうかを確認する}
4862     \textcolor{comment}{! Confirm whether the output is effective}
4863     \textcolor{comment}{!}
4864     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
4865       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4866 
4867       \textcolor{keywordflow}{goto} 999
4868 \textcolor{keywordflow}{    end if}
4869 
4870     \textcolor{comment}{! GT\_HISTORY 変数の取得}
4871     \textcolor{comment}{! Get "GT\_HISTORY" variable}
4872     \textcolor{comment}{!}
4873     gthist => gthst\_history\_vars(vnum) % gthist
4874 
4875 
4876     \textcolor{comment}{! 空間切り出し}
4877     \textcolor{comment}{! Slice of spaces}
4878     \textcolor{comment}{!}
4879                         \textcolor{comment}{! array only}
4880                     
4881 
4882 
4883     \textcolor{comment}{! 空間平均}
4884     \textcolor{comment}{! Spatial average}
4885     \textcolor{comment}{!}
4886                         \textcolor{comment}{! array only}
4887                     
4888 
4889     \textcolor{comment}{! 単位に応じて時刻を変換}
4890     \textcolor{comment}{! Convert time according to units}
4891     \textcolor{comment}{!}
4892     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
4893       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4894 
4895       settime = &
4896         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
4897 \textcolor{keywordflow}{    end if}
4898 
4899     \textcolor{comment}{! 時刻設定}
4900     \textcolor{comment}{! Set time}
4901     \textcolor{comment}{!}
4902     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4903       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
4904         & history = gthist, &   \textcolor{comment}{! (in) optional}
4905         & timed = settime )     \textcolor{comment}{! (in) optional}
4906 \textcolor{keywordflow}{    end if}
4907 
4908     \textcolor{comment}{! 出力}
4909     \textcolor{comment}{! OutPut}
4910     \textcolor{comment}{!}
4911     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4912       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
4913         & varname, &              \textcolor{comment}{! (in)}
4914                               & (/\textcolor{keywordtype}{value}/), &            \textcolor{comment}{! (in)}
4915                       
4916         & timed = settime, &      \textcolor{comment}{! (in) optional}
4917         & time\_average\_store = &
4918         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
4919         & history = gthist )                  \textcolor{comment}{! (inout) optional}
4920     \textcolor{keywordflow}{else}
4921       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
4922         & varname, &              \textcolor{comment}{! (in)}
4923                               & (/\textcolor{keywordtype}{value}/), &            \textcolor{comment}{! (in)}
4924                       
4925         & history = gthist )      \textcolor{comment}{! (inout) optional}
4926 \textcolor{keywordflow}{    end if}
4927 
4928     \textcolor{comment}{! 最後に出力した時刻を保存}
4929     \textcolor{comment}{! Save last time of output}
4930     \textcolor{comment}{!}
4931     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4932       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
4933         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4934 
4935         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
4936           prev\_outtime\_vars(vnum) = time
4937         \textcolor{keywordflow}{else}
4938           prev\_outtime\_vars(vnum) = &
4939             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
4940 \textcolor{keywordflow}{        end if}
4941 \textcolor{keywordflow}{      end if}
4942 \textcolor{keywordflow}{    end if}
4943 
4944     \textcolor{comment}{! 結合解除}
4945     \textcolor{comment}{! Release associations}
4946     \textcolor{comment}{!}
4947     \textcolor{keyword}{nullify}( gthist )
4948                                         
4949 
4950 999 \textcolor{keywordflow}{continue}
4951     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
4952     \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]{historyautoput_8f90_a845ed32e338aa09b97f6c1f18fff208b_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a0a949973301b4429e8f7bbfc1bdb060e}\label{historyautoput_8f90_a0a949973301b4429e8f7bbfc1bdb060e}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputint1@{historyautoputint1}}
\index{historyautoputint1@{historyautoputint1}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputint1()}{historyautoputint1()}}
{\footnotesize\ttfamily subroutine historyautoputint1 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 4960 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
4960     \textcolor{comment}{!}
4961                     
4962     \textcolor{comment}{!}
4963 
4964     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
4965       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
4966       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
4967       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
4968       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
4969       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
4970       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
4971       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
4972       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
4973     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
4974       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
4975     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
4976     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
4977       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
4978     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
4979       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
4980       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
4981     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
4982     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
4983     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
4984     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
4985       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
4986     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
4987     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
4988       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
4989       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
4990     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
4991     \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}
4992     \textcolor{keywordtype}{implicit none}
4993     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
4994                     
4995     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
4996                     
4997     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:)
4998                     
4999     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
5000                     
5001 
5002     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
5003                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
5004                               \textcolor{comment}{! Derived type for "gtool\_history" module}
5005 
5006                         \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_slice(:) =>null()
5007     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
5008     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_avr(:) =>null()
5009                     
5010     \textcolor{keywordtype}{real(DP)}:: settime
5011     \textcolor{keywordtype}{integer}:: stat, i
5012     \textcolor{keywordtype}{integer}:: vnum
5013     \textcolor{keywordtype}{character(STRING)}:: cause\_c
5014     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
5015     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutInt1"}
5016   \textcolor{keywordflow}{continue}
5017     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
5018     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
5019     cause\_c = \textcolor{stringliteral}{""}
5020 
5021     \textcolor{comment}{! 初期設定チェック}
5022     \textcolor{comment}{! Check initialization}
5023     \textcolor{comment}{!}
5024     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
5025       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
5026       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
5027       \textcolor{keywordflow}{goto} 999
5028 \textcolor{keywordflow}{    end if}
5029 
5030     \textcolor{comment}{! 時刻に関するエラー処理}
5031     \textcolor{comment}{! Error handling for time}
5032     \textcolor{comment}{!}
5033     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
5034       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
5035       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
5036         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
5037         & c1 = trim( cause\_c ), c2 = trim( varname ) )
5038       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
5039       cause\_c = \textcolor{stringliteral}{'time'}
5040       \textcolor{keywordflow}{goto} 999
5041 \textcolor{keywordflow}{    end if}
5042 
5043     \textcolor{comment}{! 変数 ID のサーチ}
5044     \textcolor{comment}{! Search variable ID}
5045     \textcolor{comment}{!}
5046     varsearch: \textcolor{keywordflow}{do}
5047       \textcolor{keywordflow}{do} i = svnum, numvars
5048         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
5049           vnum = i
5050           \textcolor{keywordflow}{exit} varsearch
5051 \textcolor{keywordflow}{        end if}
5052 \textcolor{keywordflow}{      end do}
5053       \textcolor{keywordflow}{do} i = 1, svnum - 1
5054         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
5055           vnum = i
5056           \textcolor{keywordflow}{exit} varsearch
5057 \textcolor{keywordflow}{        end if}
5058 \textcolor{keywordflow}{      end do}
5059 
5060       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
5061       cause\_c = varname
5062       \textcolor{keywordflow}{goto} 999
5063 \textcolor{keywordflow}{    end do} varsearch
5064 
5065     svnum = vnum
5066 
5067     \textcolor{comment}{! 定義モードからデータモードへ}
5068     \textcolor{comment}{! Transit from define mode to data mode}
5069     \textcolor{comment}{!}
5070     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
5071       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
5072 \textcolor{keywordflow}{    end if}
5073 
5074     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
5075     \textcolor{comment}{! Check output timing and create files}
5076     \textcolor{comment}{!}
5077     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
5078       &        time = time, &    \textcolor{comment}{! (in)}
5079       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
5080 
5081     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
5082     \textcolor{comment}{! Open, close, reopen files}
5083     \textcolor{comment}{!}
5084     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
5085       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
5086       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
5087         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
5088       histaddvar\_vars(vnum) = .true.
5089       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
5090         prev\_outtime\_vars(vnum) = time
5091       \textcolor{keywordflow}{else}
5092         flag\_output\_prev\_vars(vnum) = .true.
5093         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
5094           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
5095         \textcolor{keywordflow}{else}
5096           prev\_outtime\_vars(vnum) = time
5097 \textcolor{keywordflow}{        end if}
5098 \textcolor{keywordflow}{      end if}
5099 \textcolor{keywordflow}{    end if}
5100 
5101     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5102       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
5103         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
5104 \textcolor{keywordflow}{      end if}
5105 \textcolor{keywordflow}{    end if}
5106 
5107     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5108       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
5109         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
5110 \textcolor{keywordflow}{      end if}
5111       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
5112         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
5113       newfile\_createtime\_vars(vnum) = time
5114       prev\_outtime\_vars(vnum) = time
5115 \textcolor{keywordflow}{    end if}
5116 
5117     \textcolor{comment}{! 出力が有効かどうかを確認する}
5118     \textcolor{comment}{! Confirm whether the output is effective}
5119     \textcolor{comment}{!}
5120     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
5121       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5122 
5123       \textcolor{keywordflow}{goto} 999
5124 \textcolor{keywordflow}{    end if}
5125 
5126     \textcolor{comment}{! GT\_HISTORY 変数の取得}
5127     \textcolor{comment}{! Get "GT\_HISTORY" variable}
5128     \textcolor{comment}{!}
5129     gthist => gthst\_history\_vars(vnum) % gthist
5130 
5131 
5132     \textcolor{comment}{! 空間切り出し}
5133     \textcolor{comment}{! Slice of spaces}
5134     \textcolor{comment}{!}
5135                         sv => slice\_vars(vnum)
5136 
5137                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
5138                       
5139 
5140     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
5141                       
5142       & )
5143                     
5144 
5145 
5146     \textcolor{comment}{! 空間平均}
5147     \textcolor{comment}{! Spatial average}
5148     \textcolor{comment}{!}
5149                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
5150       array\_avr => array\_slice
5151     \textcolor{keywordflow}{else}
5152       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
5153         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
5154                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
5155                       
5156         & array\_avr )                       \textcolor{comment}{! (out)}
5157 \textcolor{keywordflow}{    end if}
5158 
5159     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
5160 
5161                     
5162 
5163     \textcolor{comment}{! 単位に応じて時刻を変換}
5164     \textcolor{comment}{! Convert time according to units}
5165     \textcolor{comment}{!}
5166     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
5167       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5168 
5169       settime = &
5170         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
5171 \textcolor{keywordflow}{    end if}
5172 
5173     \textcolor{comment}{! 時刻設定}
5174     \textcolor{comment}{! Set time}
5175     \textcolor{comment}{!}
5176     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5177       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
5178         & history = gthist, &   \textcolor{comment}{! (in) optional}
5179         & timed = settime )     \textcolor{comment}{! (in) optional}
5180 \textcolor{keywordflow}{    end if}
5181 
5182     \textcolor{comment}{! 出力}
5183     \textcolor{comment}{! OutPut}
5184     \textcolor{comment}{!}
5185     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5186       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
5187         & varname, &              \textcolor{comment}{! (in)}
5188                               & array\_avr, &            \textcolor{comment}{! (in)}
5189                       
5190         & timed = settime, &      \textcolor{comment}{! (in) optional}
5191         & time\_average\_store = &
5192         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
5193         & history = gthist )                  \textcolor{comment}{! (inout) optional}
5194     \textcolor{keywordflow}{else}
5195       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
5196         & varname, &              \textcolor{comment}{! (in)}
5197                               & array\_avr, &            \textcolor{comment}{! (in)}
5198                       
5199         & history = gthist )      \textcolor{comment}{! (inout) optional}
5200 \textcolor{keywordflow}{    end if}
5201 
5202     \textcolor{comment}{! 最後に出力した時刻を保存}
5203     \textcolor{comment}{! Save last time of output}
5204     \textcolor{comment}{!}
5205     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5206       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
5207         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5208 
5209         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
5210           prev\_outtime\_vars(vnum) = time
5211         \textcolor{keywordflow}{else}
5212           prev\_outtime\_vars(vnum) = &
5213             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
5214 \textcolor{keywordflow}{        end if}
5215 \textcolor{keywordflow}{      end if}
5216 \textcolor{keywordflow}{    end if}
5217 
5218     \textcolor{comment}{! 結合解除}
5219     \textcolor{comment}{! Release associations}
5220     \textcolor{comment}{!}
5221     \textcolor{keyword}{nullify}( gthist )
5222                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
5223                     
5224 
5225 999 \textcolor{keywordflow}{continue}
5226     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
5227     \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]{historyautoput_8f90_a0a949973301b4429e8f7bbfc1bdb060e_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a2909430bd62ab62314aac79b44b5d97d}\label{historyautoput_8f90_a2909430bd62ab62314aac79b44b5d97d}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputint2@{historyautoputint2}}
\index{historyautoputint2@{historyautoputint2}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputint2()}{historyautoputint2()}}
{\footnotesize\ttfamily subroutine historyautoputint2 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 5235 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
5235     \textcolor{comment}{!}
5236                     
5237     \textcolor{comment}{!}
5238 
5239     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
5240       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
5241       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
5242       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
5243       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
5244       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
5245       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
5246       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
5247       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
5248     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
5249       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
5250     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
5251     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
5252       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
5253     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
5254       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
5255       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
5256     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
5257     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
5258     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
5259     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
5260       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
5261     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
5262     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
5263       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
5264       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
5265     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
5266     \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}
5267     \textcolor{keywordtype}{implicit none}
5268     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
5269                     
5270     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
5271                     
5272     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:)
5273                     
5274     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
5275                     
5276 
5277     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
5278                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
5279                               \textcolor{comment}{! Derived type for "gtool\_history" module}
5280 
5281                         \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:) =>null()
5282     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
5283     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:) =>null()
5284                     
5285     \textcolor{keywordtype}{real(DP)}:: settime
5286     \textcolor{keywordtype}{integer}:: stat, i
5287     \textcolor{keywordtype}{integer}:: vnum
5288     \textcolor{keywordtype}{character(STRING)}:: cause\_c
5289     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
5290     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutInt2"}
5291   \textcolor{keywordflow}{continue}
5292     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
5293     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
5294     cause\_c = \textcolor{stringliteral}{""}
5295 
5296     \textcolor{comment}{! 初期設定チェック}
5297     \textcolor{comment}{! Check initialization}
5298     \textcolor{comment}{!}
5299     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
5300       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
5301       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
5302       \textcolor{keywordflow}{goto} 999
5303 \textcolor{keywordflow}{    end if}
5304 
5305     \textcolor{comment}{! 時刻に関するエラー処理}
5306     \textcolor{comment}{! Error handling for time}
5307     \textcolor{comment}{!}
5308     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
5309       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
5310       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
5311         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
5312         & c1 = trim( cause\_c ), c2 = trim( varname ) )
5313       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
5314       cause\_c = \textcolor{stringliteral}{'time'}
5315       \textcolor{keywordflow}{goto} 999
5316 \textcolor{keywordflow}{    end if}
5317 
5318     \textcolor{comment}{! 変数 ID のサーチ}
5319     \textcolor{comment}{! Search variable ID}
5320     \textcolor{comment}{!}
5321     varsearch: \textcolor{keywordflow}{do}
5322       \textcolor{keywordflow}{do} i = svnum, numvars
5323         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
5324           vnum = i
5325           \textcolor{keywordflow}{exit} varsearch
5326 \textcolor{keywordflow}{        end if}
5327 \textcolor{keywordflow}{      end do}
5328       \textcolor{keywordflow}{do} i = 1, svnum - 1
5329         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
5330           vnum = i
5331           \textcolor{keywordflow}{exit} varsearch
5332 \textcolor{keywordflow}{        end if}
5333 \textcolor{keywordflow}{      end do}
5334 
5335       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
5336       cause\_c = varname
5337       \textcolor{keywordflow}{goto} 999
5338 \textcolor{keywordflow}{    end do} varsearch
5339 
5340     svnum = vnum
5341 
5342     \textcolor{comment}{! 定義モードからデータモードへ}
5343     \textcolor{comment}{! Transit from define mode to data mode}
5344     \textcolor{comment}{!}
5345     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
5346       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
5347 \textcolor{keywordflow}{    end if}
5348 
5349     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
5350     \textcolor{comment}{! Check output timing and create files}
5351     \textcolor{comment}{!}
5352     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
5353       &        time = time, &    \textcolor{comment}{! (in)}
5354       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
5355 
5356     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
5357     \textcolor{comment}{! Open, close, reopen files}
5358     \textcolor{comment}{!}
5359     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
5360       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
5361       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
5362         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
5363       histaddvar\_vars(vnum) = .true.
5364       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
5365         prev\_outtime\_vars(vnum) = time
5366       \textcolor{keywordflow}{else}
5367         flag\_output\_prev\_vars(vnum) = .true.
5368         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
5369           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
5370         \textcolor{keywordflow}{else}
5371           prev\_outtime\_vars(vnum) = time
5372 \textcolor{keywordflow}{        end if}
5373 \textcolor{keywordflow}{      end if}
5374 \textcolor{keywordflow}{    end if}
5375 
5376     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5377       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
5378         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
5379 \textcolor{keywordflow}{      end if}
5380 \textcolor{keywordflow}{    end if}
5381 
5382     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5383       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
5384         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
5385 \textcolor{keywordflow}{      end if}
5386       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
5387         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
5388       newfile\_createtime\_vars(vnum) = time
5389       prev\_outtime\_vars(vnum) = time
5390 \textcolor{keywordflow}{    end if}
5391 
5392     \textcolor{comment}{! 出力が有効かどうかを確認する}
5393     \textcolor{comment}{! Confirm whether the output is effective}
5394     \textcolor{comment}{!}
5395     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
5396       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5397 
5398       \textcolor{keywordflow}{goto} 999
5399 \textcolor{keywordflow}{    end if}
5400 
5401     \textcolor{comment}{! GT\_HISTORY 変数の取得}
5402     \textcolor{comment}{! Get "GT\_HISTORY" variable}
5403     \textcolor{comment}{!}
5404     gthist => gthst\_history\_vars(vnum) % gthist
5405 
5406 
5407     \textcolor{comment}{! 空間切り出し}
5408     \textcolor{comment}{! Slice of spaces}
5409     \textcolor{comment}{!}
5410                         sv => slice\_vars(vnum)
5411 
5412                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
5413                       
5414 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
5415                       
5416 
5417     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
5418                             & , sv%st(2):sv%ed(2):sv%sd(2) &
5419                       
5420       & )
5421                     
5422 
5423 
5424     \textcolor{comment}{! 空間平均}
5425     \textcolor{comment}{! Spatial average}
5426     \textcolor{comment}{!}
5427                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
5428       array\_avr => array\_slice
5429     \textcolor{keywordflow}{else}
5430       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
5431         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
5432                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
5433                       
5434         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
5435                       
5436         & array\_avr )                       \textcolor{comment}{! (out)}
5437 \textcolor{keywordflow}{    end if}
5438 
5439     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
5440 
5441                     
5442 
5443     \textcolor{comment}{! 単位に応じて時刻を変換}
5444     \textcolor{comment}{! Convert time according to units}
5445     \textcolor{comment}{!}
5446     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
5447       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5448 
5449       settime = &
5450         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
5451 \textcolor{keywordflow}{    end if}
5452 
5453     \textcolor{comment}{! 時刻設定}
5454     \textcolor{comment}{! Set time}
5455     \textcolor{comment}{!}
5456     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5457       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
5458         & history = gthist, &   \textcolor{comment}{! (in) optional}
5459         & timed = settime )     \textcolor{comment}{! (in) optional}
5460 \textcolor{keywordflow}{    end if}
5461 
5462     \textcolor{comment}{! 出力}
5463     \textcolor{comment}{! OutPut}
5464     \textcolor{comment}{!}
5465     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5466       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
5467         & varname, &              \textcolor{comment}{! (in)}
5468                               & array\_avr, &            \textcolor{comment}{! (in)}
5469                       
5470         & timed = settime, &      \textcolor{comment}{! (in) optional}
5471         & time\_average\_store = &
5472         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
5473         & history = gthist )                  \textcolor{comment}{! (inout) optional}
5474     \textcolor{keywordflow}{else}
5475       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
5476         & varname, &              \textcolor{comment}{! (in)}
5477                               & array\_avr, &            \textcolor{comment}{! (in)}
5478                       
5479         & history = gthist )      \textcolor{comment}{! (inout) optional}
5480 \textcolor{keywordflow}{    end if}
5481 
5482     \textcolor{comment}{! 最後に出力した時刻を保存}
5483     \textcolor{comment}{! Save last time of output}
5484     \textcolor{comment}{!}
5485     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5486       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
5487         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5488 
5489         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
5490           prev\_outtime\_vars(vnum) = time
5491         \textcolor{keywordflow}{else}
5492           prev\_outtime\_vars(vnum) = &
5493             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
5494 \textcolor{keywordflow}{        end if}
5495 \textcolor{keywordflow}{      end if}
5496 \textcolor{keywordflow}{    end if}
5497 
5498     \textcolor{comment}{! 結合解除}
5499     \textcolor{comment}{! Release associations}
5500     \textcolor{comment}{!}
5501     \textcolor{keyword}{nullify}( gthist )
5502                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
5503                     
5504 
5505 999 \textcolor{keywordflow}{continue}
5506     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
5507     \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]{historyautoput_8f90_a2909430bd62ab62314aac79b44b5d97d_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a79d5337c45e17e44280817c1faef4aa1}\label{historyautoput_8f90_a79d5337c45e17e44280817c1faef4aa1}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputint3@{historyautoputint3}}
\index{historyautoputint3@{historyautoputint3}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputint3()}{historyautoputint3()}}
{\footnotesize\ttfamily subroutine historyautoputint3 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 5515 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
5515     \textcolor{comment}{!}
5516                     
5517     \textcolor{comment}{!}
5518 
5519     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
5520       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
5521       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
5522       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
5523       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
5524       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
5525       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
5526       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
5527       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
5528     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
5529       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
5530     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
5531     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
5532       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
5533     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
5534       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
5535       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
5536     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
5537     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
5538     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
5539     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
5540       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
5541     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
5542     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
5543       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
5544       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
5545     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
5546     \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}
5547     \textcolor{keywordtype}{implicit none}
5548     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
5549                     
5550     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
5551                     
5552     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:)
5553                     
5554     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
5555                     
5556 
5557     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
5558                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
5559                               \textcolor{comment}{! Derived type for "gtool\_history" module}
5560 
5561                         \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:) =>null()
5562     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
5563     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:) =>null()
5564                     
5565     \textcolor{keywordtype}{real(DP)}:: settime
5566     \textcolor{keywordtype}{integer}:: stat, i
5567     \textcolor{keywordtype}{integer}:: vnum
5568     \textcolor{keywordtype}{character(STRING)}:: cause\_c
5569     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
5570     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutInt3"}
5571   \textcolor{keywordflow}{continue}
5572     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
5573     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
5574     cause\_c = \textcolor{stringliteral}{""}
5575 
5576     \textcolor{comment}{! 初期設定チェック}
5577     \textcolor{comment}{! Check initialization}
5578     \textcolor{comment}{!}
5579     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
5580       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
5581       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
5582       \textcolor{keywordflow}{goto} 999
5583 \textcolor{keywordflow}{    end if}
5584 
5585     \textcolor{comment}{! 時刻に関するエラー処理}
5586     \textcolor{comment}{! Error handling for time}
5587     \textcolor{comment}{!}
5588     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
5589       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
5590       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
5591         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
5592         & c1 = trim( cause\_c ), c2 = trim( varname ) )
5593       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
5594       cause\_c = \textcolor{stringliteral}{'time'}
5595       \textcolor{keywordflow}{goto} 999
5596 \textcolor{keywordflow}{    end if}
5597 
5598     \textcolor{comment}{! 変数 ID のサーチ}
5599     \textcolor{comment}{! Search variable ID}
5600     \textcolor{comment}{!}
5601     varsearch: \textcolor{keywordflow}{do}
5602       \textcolor{keywordflow}{do} i = svnum, numvars
5603         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
5604           vnum = i
5605           \textcolor{keywordflow}{exit} varsearch
5606 \textcolor{keywordflow}{        end if}
5607 \textcolor{keywordflow}{      end do}
5608       \textcolor{keywordflow}{do} i = 1, svnum - 1
5609         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
5610           vnum = i
5611           \textcolor{keywordflow}{exit} varsearch
5612 \textcolor{keywordflow}{        end if}
5613 \textcolor{keywordflow}{      end do}
5614 
5615       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
5616       cause\_c = varname
5617       \textcolor{keywordflow}{goto} 999
5618 \textcolor{keywordflow}{    end do} varsearch
5619 
5620     svnum = vnum
5621 
5622     \textcolor{comment}{! 定義モードからデータモードへ}
5623     \textcolor{comment}{! Transit from define mode to data mode}
5624     \textcolor{comment}{!}
5625     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
5626       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
5627 \textcolor{keywordflow}{    end if}
5628 
5629     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
5630     \textcolor{comment}{! Check output timing and create files}
5631     \textcolor{comment}{!}
5632     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
5633       &        time = time, &    \textcolor{comment}{! (in)}
5634       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
5635 
5636     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
5637     \textcolor{comment}{! Open, close, reopen files}
5638     \textcolor{comment}{!}
5639     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
5640       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
5641       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
5642         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
5643       histaddvar\_vars(vnum) = .true.
5644       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
5645         prev\_outtime\_vars(vnum) = time
5646       \textcolor{keywordflow}{else}
5647         flag\_output\_prev\_vars(vnum) = .true.
5648         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
5649           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
5650         \textcolor{keywordflow}{else}
5651           prev\_outtime\_vars(vnum) = time
5652 \textcolor{keywordflow}{        end if}
5653 \textcolor{keywordflow}{      end if}
5654 \textcolor{keywordflow}{    end if}
5655 
5656     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5657       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
5658         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
5659 \textcolor{keywordflow}{      end if}
5660 \textcolor{keywordflow}{    end if}
5661 
5662     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5663       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
5664         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
5665 \textcolor{keywordflow}{      end if}
5666       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
5667         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
5668       newfile\_createtime\_vars(vnum) = time
5669       prev\_outtime\_vars(vnum) = time
5670 \textcolor{keywordflow}{    end if}
5671 
5672     \textcolor{comment}{! 出力が有効かどうかを確認する}
5673     \textcolor{comment}{! Confirm whether the output is effective}
5674     \textcolor{comment}{!}
5675     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
5676       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5677 
5678       \textcolor{keywordflow}{goto} 999
5679 \textcolor{keywordflow}{    end if}
5680 
5681     \textcolor{comment}{! GT\_HISTORY 変数の取得}
5682     \textcolor{comment}{! Get "GT\_HISTORY" variable}
5683     \textcolor{comment}{!}
5684     gthist => gthst\_history\_vars(vnum) % gthist
5685 
5686 
5687     \textcolor{comment}{! 空間切り出し}
5688     \textcolor{comment}{! Slice of spaces}
5689     \textcolor{comment}{!}
5690                         sv => slice\_vars(vnum)
5691 
5692                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
5693                       
5694 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
5695                       
5696 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
5697                       
5698 
5699     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
5700                             & , sv%st(2):sv%ed(2):sv%sd(2) &
5701                       
5702       & , sv%st(3):sv%ed(3):sv%sd(3) &
5703                       
5704       & )
5705                     
5706 
5707 
5708     \textcolor{comment}{! 空間平均}
5709     \textcolor{comment}{! Spatial average}
5710     \textcolor{comment}{!}
5711                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
5712       array\_avr => array\_slice
5713     \textcolor{keywordflow}{else}
5714       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
5715         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
5716                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
5717                       
5718         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
5719                       
5720         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
5721                       
5722         & array\_avr )                       \textcolor{comment}{! (out)}
5723 \textcolor{keywordflow}{    end if}
5724 
5725     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
5726 
5727                     
5728 
5729     \textcolor{comment}{! 単位に応じて時刻を変換}
5730     \textcolor{comment}{! Convert time according to units}
5731     \textcolor{comment}{!}
5732     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
5733       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5734 
5735       settime = &
5736         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
5737 \textcolor{keywordflow}{    end if}
5738 
5739     \textcolor{comment}{! 時刻設定}
5740     \textcolor{comment}{! Set time}
5741     \textcolor{comment}{!}
5742     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5743       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
5744         & history = gthist, &   \textcolor{comment}{! (in) optional}
5745         & timed = settime )     \textcolor{comment}{! (in) optional}
5746 \textcolor{keywordflow}{    end if}
5747 
5748     \textcolor{comment}{! 出力}
5749     \textcolor{comment}{! OutPut}
5750     \textcolor{comment}{!}
5751     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5752       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
5753         & varname, &              \textcolor{comment}{! (in)}
5754                               & array\_avr, &            \textcolor{comment}{! (in)}
5755                       
5756         & timed = settime, &      \textcolor{comment}{! (in) optional}
5757         & time\_average\_store = &
5758         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
5759         & history = gthist )                  \textcolor{comment}{! (inout) optional}
5760     \textcolor{keywordflow}{else}
5761       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
5762         & varname, &              \textcolor{comment}{! (in)}
5763                               & array\_avr, &            \textcolor{comment}{! (in)}
5764                       
5765         & history = gthist )      \textcolor{comment}{! (inout) optional}
5766 \textcolor{keywordflow}{    end if}
5767 
5768     \textcolor{comment}{! 最後に出力した時刻を保存}
5769     \textcolor{comment}{! Save last time of output}
5770     \textcolor{comment}{!}
5771     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5772       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
5773         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5774 
5775         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
5776           prev\_outtime\_vars(vnum) = time
5777         \textcolor{keywordflow}{else}
5778           prev\_outtime\_vars(vnum) = &
5779             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
5780 \textcolor{keywordflow}{        end if}
5781 \textcolor{keywordflow}{      end if}
5782 \textcolor{keywordflow}{    end if}
5783 
5784     \textcolor{comment}{! 結合解除}
5785     \textcolor{comment}{! Release associations}
5786     \textcolor{comment}{!}
5787     \textcolor{keyword}{nullify}( gthist )
5788                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
5789                     
5790 
5791 999 \textcolor{keywordflow}{continue}
5792     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
5793     \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]{historyautoput_8f90_a79d5337c45e17e44280817c1faef4aa1_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a64d669349a1d49636cc89e44a7f7c3d0}\label{historyautoput_8f90_a64d669349a1d49636cc89e44a7f7c3d0}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputint4@{historyautoputint4}}
\index{historyautoputint4@{historyautoputint4}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputint4()}{historyautoputint4()}}
{\footnotesize\ttfamily subroutine historyautoputint4 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 5801 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
5801     \textcolor{comment}{!}
5802                     
5803     \textcolor{comment}{!}
5804 
5805     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
5806       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
5807       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
5808       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
5809       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
5810       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
5811       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
5812       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
5813       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
5814     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
5815       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
5816     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
5817     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
5818       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
5819     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
5820       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
5821       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
5822     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
5823     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
5824     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
5825     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
5826       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
5827     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
5828     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
5829       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
5830       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
5831     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
5832     \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}
5833     \textcolor{keywordtype}{implicit none}
5834     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
5835                     
5836     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
5837                     
5838     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:)
5839                     
5840     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
5841                     
5842 
5843     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
5844                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
5845                               \textcolor{comment}{! Derived type for "gtool\_history" module}
5846 
5847                         \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:) =>null()
5848     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
5849     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:) =>null()
5850                     
5851     \textcolor{keywordtype}{real(DP)}:: settime
5852     \textcolor{keywordtype}{integer}:: stat, i
5853     \textcolor{keywordtype}{integer}:: vnum
5854     \textcolor{keywordtype}{character(STRING)}:: cause\_c
5855     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
5856     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutInt4"}
5857   \textcolor{keywordflow}{continue}
5858     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
5859     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
5860     cause\_c = \textcolor{stringliteral}{""}
5861 
5862     \textcolor{comment}{! 初期設定チェック}
5863     \textcolor{comment}{! Check initialization}
5864     \textcolor{comment}{!}
5865     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
5866       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
5867       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
5868       \textcolor{keywordflow}{goto} 999
5869 \textcolor{keywordflow}{    end if}
5870 
5871     \textcolor{comment}{! 時刻に関するエラー処理}
5872     \textcolor{comment}{! Error handling for time}
5873     \textcolor{comment}{!}
5874     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
5875       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
5876       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
5877         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
5878         & c1 = trim( cause\_c ), c2 = trim( varname ) )
5879       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
5880       cause\_c = \textcolor{stringliteral}{'time'}
5881       \textcolor{keywordflow}{goto} 999
5882 \textcolor{keywordflow}{    end if}
5883 
5884     \textcolor{comment}{! 変数 ID のサーチ}
5885     \textcolor{comment}{! Search variable ID}
5886     \textcolor{comment}{!}
5887     varsearch: \textcolor{keywordflow}{do}
5888       \textcolor{keywordflow}{do} i = svnum, numvars
5889         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
5890           vnum = i
5891           \textcolor{keywordflow}{exit} varsearch
5892 \textcolor{keywordflow}{        end if}
5893 \textcolor{keywordflow}{      end do}
5894       \textcolor{keywordflow}{do} i = 1, svnum - 1
5895         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
5896           vnum = i
5897           \textcolor{keywordflow}{exit} varsearch
5898 \textcolor{keywordflow}{        end if}
5899 \textcolor{keywordflow}{      end do}
5900 
5901       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
5902       cause\_c = varname
5903       \textcolor{keywordflow}{goto} 999
5904 \textcolor{keywordflow}{    end do} varsearch
5905 
5906     svnum = vnum
5907 
5908     \textcolor{comment}{! 定義モードからデータモードへ}
5909     \textcolor{comment}{! Transit from define mode to data mode}
5910     \textcolor{comment}{!}
5911     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
5912       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
5913 \textcolor{keywordflow}{    end if}
5914 
5915     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
5916     \textcolor{comment}{! Check output timing and create files}
5917     \textcolor{comment}{!}
5918     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
5919       &        time = time, &    \textcolor{comment}{! (in)}
5920       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
5921 
5922     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
5923     \textcolor{comment}{! Open, close, reopen files}
5924     \textcolor{comment}{!}
5925     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
5926       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
5927       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
5928         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
5929       histaddvar\_vars(vnum) = .true.
5930       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
5931         prev\_outtime\_vars(vnum) = time
5932       \textcolor{keywordflow}{else}
5933         flag\_output\_prev\_vars(vnum) = .true.
5934         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
5935           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
5936         \textcolor{keywordflow}{else}
5937           prev\_outtime\_vars(vnum) = time
5938 \textcolor{keywordflow}{        end if}
5939 \textcolor{keywordflow}{      end if}
5940 \textcolor{keywordflow}{    end if}
5941 
5942     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5943       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
5944         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
5945 \textcolor{keywordflow}{      end if}
5946 \textcolor{keywordflow}{    end if}
5947 
5948     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5949       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
5950         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
5951 \textcolor{keywordflow}{      end if}
5952       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
5953         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
5954       newfile\_createtime\_vars(vnum) = time
5955       prev\_outtime\_vars(vnum) = time
5956 \textcolor{keywordflow}{    end if}
5957 
5958     \textcolor{comment}{! 出力が有効かどうかを確認する}
5959     \textcolor{comment}{! Confirm whether the output is effective}
5960     \textcolor{comment}{!}
5961     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
5962       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
5963 
5964       \textcolor{keywordflow}{goto} 999
5965 \textcolor{keywordflow}{    end if}
5966 
5967     \textcolor{comment}{! GT\_HISTORY 変数の取得}
5968     \textcolor{comment}{! Get "GT\_HISTORY" variable}
5969     \textcolor{comment}{!}
5970     gthist => gthst\_history\_vars(vnum) % gthist
5971 
5972 
5973     \textcolor{comment}{! 空間切り出し}
5974     \textcolor{comment}{! Slice of spaces}
5975     \textcolor{comment}{!}
5976                         sv => slice\_vars(vnum)
5977 
5978                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
5979                       
5980 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
5981                       
5982 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
5983                       
5984 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
5985                       
5986 
5987     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
5988                             & , sv%st(2):sv%ed(2):sv%sd(2) &
5989                       
5990       & , sv%st(3):sv%ed(3):sv%sd(3) &
5991                       
5992       & , sv%st(4):sv%ed(4):sv%sd(4) &
5993                       
5994       & )
5995                     
5996 
5997 
5998     \textcolor{comment}{! 空間平均}
5999     \textcolor{comment}{! Spatial average}
6000     \textcolor{comment}{!}
6001                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
6002       array\_avr => array\_slice
6003     \textcolor{keywordflow}{else}
6004       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
6005         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
6006                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
6007                       
6008         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
6009                       
6010         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
6011                       
6012         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
6013                       
6014         & array\_avr )                       \textcolor{comment}{! (out)}
6015 \textcolor{keywordflow}{    end if}
6016 
6017     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
6018 
6019                     
6020 
6021     \textcolor{comment}{! 単位に応じて時刻を変換}
6022     \textcolor{comment}{! Convert time according to units}
6023     \textcolor{comment}{!}
6024     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
6025       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6026 
6027       settime = &
6028         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
6029 \textcolor{keywordflow}{    end if}
6030 
6031     \textcolor{comment}{! 時刻設定}
6032     \textcolor{comment}{! Set time}
6033     \textcolor{comment}{!}
6034     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6035       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
6036         & history = gthist, &   \textcolor{comment}{! (in) optional}
6037         & timed = settime )     \textcolor{comment}{! (in) optional}
6038 \textcolor{keywordflow}{    end if}
6039 
6040     \textcolor{comment}{! 出力}
6041     \textcolor{comment}{! OutPut}
6042     \textcolor{comment}{!}
6043     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6044       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
6045         & varname, &              \textcolor{comment}{! (in)}
6046                               & array\_avr, &            \textcolor{comment}{! (in)}
6047                       
6048         & timed = settime, &      \textcolor{comment}{! (in) optional}
6049         & time\_average\_store = &
6050         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
6051         & history = gthist )                  \textcolor{comment}{! (inout) optional}
6052     \textcolor{keywordflow}{else}
6053       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
6054         & varname, &              \textcolor{comment}{! (in)}
6055                               & array\_avr, &            \textcolor{comment}{! (in)}
6056                       
6057         & history = gthist )      \textcolor{comment}{! (inout) optional}
6058 \textcolor{keywordflow}{    end if}
6059 
6060     \textcolor{comment}{! 最後に出力した時刻を保存}
6061     \textcolor{comment}{! Save last time of output}
6062     \textcolor{comment}{!}
6063     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6064       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
6065         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6066 
6067         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
6068           prev\_outtime\_vars(vnum) = time
6069         \textcolor{keywordflow}{else}
6070           prev\_outtime\_vars(vnum) = &
6071             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
6072 \textcolor{keywordflow}{        end if}
6073 \textcolor{keywordflow}{      end if}
6074 \textcolor{keywordflow}{    end if}
6075 
6076     \textcolor{comment}{! 結合解除}
6077     \textcolor{comment}{! Release associations}
6078     \textcolor{comment}{!}
6079     \textcolor{keyword}{nullify}( gthist )
6080                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
6081                     
6082 
6083 999 \textcolor{keywordflow}{continue}
6084     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
6085     \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]{historyautoput_8f90_a64d669349a1d49636cc89e44a7f7c3d0_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a6ed09634c98c9b4d746c2c0ab363dbad}\label{historyautoput_8f90_a6ed09634c98c9b4d746c2c0ab363dbad}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputint5@{historyautoputint5}}
\index{historyautoputint5@{historyautoputint5}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputint5()}{historyautoputint5()}}
{\footnotesize\ttfamily subroutine historyautoputint5 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 6093 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
6093     \textcolor{comment}{!}
6094                     
6095     \textcolor{comment}{!}
6096 
6097     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
6098       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
6099       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
6100       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
6101       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
6102       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
6103       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
6104       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
6105       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
6106     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
6107       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
6108     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
6109     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
6110       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
6111     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
6112       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
6113       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
6114     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
6115     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
6116     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
6117     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
6118       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
6119     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
6120     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
6121       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
6122       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
6123     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
6124     \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}
6125     \textcolor{keywordtype}{implicit none}
6126     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
6127                     
6128     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
6129                     
6130     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:)
6131                     
6132     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
6133                     
6134 
6135     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
6136                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
6137                               \textcolor{comment}{! Derived type for "gtool\_history" module}
6138 
6139                         \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:) =>null()
6140     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
6141     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:) =>null()
6142                     
6143     \textcolor{keywordtype}{real(DP)}:: settime
6144     \textcolor{keywordtype}{integer}:: stat, i
6145     \textcolor{keywordtype}{integer}:: vnum
6146     \textcolor{keywordtype}{character(STRING)}:: cause\_c
6147     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
6148     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutInt5"}
6149   \textcolor{keywordflow}{continue}
6150     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
6151     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
6152     cause\_c = \textcolor{stringliteral}{""}
6153 
6154     \textcolor{comment}{! 初期設定チェック}
6155     \textcolor{comment}{! Check initialization}
6156     \textcolor{comment}{!}
6157     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
6158       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
6159       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
6160       \textcolor{keywordflow}{goto} 999
6161 \textcolor{keywordflow}{    end if}
6162 
6163     \textcolor{comment}{! 時刻に関するエラー処理}
6164     \textcolor{comment}{! Error handling for time}
6165     \textcolor{comment}{!}
6166     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
6167       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
6168       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
6169         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
6170         & c1 = trim( cause\_c ), c2 = trim( varname ) )
6171       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
6172       cause\_c = \textcolor{stringliteral}{'time'}
6173       \textcolor{keywordflow}{goto} 999
6174 \textcolor{keywordflow}{    end if}
6175 
6176     \textcolor{comment}{! 変数 ID のサーチ}
6177     \textcolor{comment}{! Search variable ID}
6178     \textcolor{comment}{!}
6179     varsearch: \textcolor{keywordflow}{do}
6180       \textcolor{keywordflow}{do} i = svnum, numvars
6181         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
6182           vnum = i
6183           \textcolor{keywordflow}{exit} varsearch
6184 \textcolor{keywordflow}{        end if}
6185 \textcolor{keywordflow}{      end do}
6186       \textcolor{keywordflow}{do} i = 1, svnum - 1
6187         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
6188           vnum = i
6189           \textcolor{keywordflow}{exit} varsearch
6190 \textcolor{keywordflow}{        end if}
6191 \textcolor{keywordflow}{      end do}
6192 
6193       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
6194       cause\_c = varname
6195       \textcolor{keywordflow}{goto} 999
6196 \textcolor{keywordflow}{    end do} varsearch
6197 
6198     svnum = vnum
6199 
6200     \textcolor{comment}{! 定義モードからデータモードへ}
6201     \textcolor{comment}{! Transit from define mode to data mode}
6202     \textcolor{comment}{!}
6203     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
6204       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
6205 \textcolor{keywordflow}{    end if}
6206 
6207     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
6208     \textcolor{comment}{! Check output timing and create files}
6209     \textcolor{comment}{!}
6210     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
6211       &        time = time, &    \textcolor{comment}{! (in)}
6212       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
6213 
6214     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
6215     \textcolor{comment}{! Open, close, reopen files}
6216     \textcolor{comment}{!}
6217     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
6218       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
6219       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
6220         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
6221       histaddvar\_vars(vnum) = .true.
6222       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
6223         prev\_outtime\_vars(vnum) = time
6224       \textcolor{keywordflow}{else}
6225         flag\_output\_prev\_vars(vnum) = .true.
6226         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
6227           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
6228         \textcolor{keywordflow}{else}
6229           prev\_outtime\_vars(vnum) = time
6230 \textcolor{keywordflow}{        end if}
6231 \textcolor{keywordflow}{      end if}
6232 \textcolor{keywordflow}{    end if}
6233 
6234     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6235       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
6236         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
6237 \textcolor{keywordflow}{      end if}
6238 \textcolor{keywordflow}{    end if}
6239 
6240     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6241       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
6242         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
6243 \textcolor{keywordflow}{      end if}
6244       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
6245         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
6246       newfile\_createtime\_vars(vnum) = time
6247       prev\_outtime\_vars(vnum) = time
6248 \textcolor{keywordflow}{    end if}
6249 
6250     \textcolor{comment}{! 出力が有効かどうかを確認する}
6251     \textcolor{comment}{! Confirm whether the output is effective}
6252     \textcolor{comment}{!}
6253     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
6254       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6255 
6256       \textcolor{keywordflow}{goto} 999
6257 \textcolor{keywordflow}{    end if}
6258 
6259     \textcolor{comment}{! GT\_HISTORY 変数の取得}
6260     \textcolor{comment}{! Get "GT\_HISTORY" variable}
6261     \textcolor{comment}{!}
6262     gthist => gthst\_history\_vars(vnum) % gthist
6263 
6264 
6265     \textcolor{comment}{! 空間切り出し}
6266     \textcolor{comment}{! Slice of spaces}
6267     \textcolor{comment}{!}
6268                         sv => slice\_vars(vnum)
6269 
6270                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
6271                       
6272 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
6273                       
6274 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
6275                       
6276 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
6277                       
6278 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
6279                       
6280 
6281     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
6282                             & , sv%st(2):sv%ed(2):sv%sd(2) &
6283                       
6284       & , sv%st(3):sv%ed(3):sv%sd(3) &
6285                       
6286       & , sv%st(4):sv%ed(4):sv%sd(4) &
6287                       
6288       & , sv%st(5):sv%ed(5):sv%sd(5) &
6289                       
6290       & )
6291                     
6292 
6293 
6294     \textcolor{comment}{! 空間平均}
6295     \textcolor{comment}{! Spatial average}
6296     \textcolor{comment}{!}
6297                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
6298       array\_avr => array\_slice
6299     \textcolor{keywordflow}{else}
6300       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
6301         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
6302                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
6303                       
6304         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
6305                       
6306         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
6307                       
6308         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
6309                       
6310         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
6311                       
6312         & array\_avr )                       \textcolor{comment}{! (out)}
6313 \textcolor{keywordflow}{    end if}
6314 
6315     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
6316 
6317                     
6318 
6319     \textcolor{comment}{! 単位に応じて時刻を変換}
6320     \textcolor{comment}{! Convert time according to units}
6321     \textcolor{comment}{!}
6322     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
6323       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6324 
6325       settime = &
6326         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
6327 \textcolor{keywordflow}{    end if}
6328 
6329     \textcolor{comment}{! 時刻設定}
6330     \textcolor{comment}{! Set time}
6331     \textcolor{comment}{!}
6332     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6333       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
6334         & history = gthist, &   \textcolor{comment}{! (in) optional}
6335         & timed = settime )     \textcolor{comment}{! (in) optional}
6336 \textcolor{keywordflow}{    end if}
6337 
6338     \textcolor{comment}{! 出力}
6339     \textcolor{comment}{! OutPut}
6340     \textcolor{comment}{!}
6341     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6342       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
6343         & varname, &              \textcolor{comment}{! (in)}
6344                               & array\_avr, &            \textcolor{comment}{! (in)}
6345                       
6346         & timed = settime, &      \textcolor{comment}{! (in) optional}
6347         & time\_average\_store = &
6348         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
6349         & history = gthist )                  \textcolor{comment}{! (inout) optional}
6350     \textcolor{keywordflow}{else}
6351       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
6352         & varname, &              \textcolor{comment}{! (in)}
6353                               & array\_avr, &            \textcolor{comment}{! (in)}
6354                       
6355         & history = gthist )      \textcolor{comment}{! (inout) optional}
6356 \textcolor{keywordflow}{    end if}
6357 
6358     \textcolor{comment}{! 最後に出力した時刻を保存}
6359     \textcolor{comment}{! Save last time of output}
6360     \textcolor{comment}{!}
6361     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6362       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
6363         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6364 
6365         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
6366           prev\_outtime\_vars(vnum) = time
6367         \textcolor{keywordflow}{else}
6368           prev\_outtime\_vars(vnum) = &
6369             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
6370 \textcolor{keywordflow}{        end if}
6371 \textcolor{keywordflow}{      end if}
6372 \textcolor{keywordflow}{    end if}
6373 
6374     \textcolor{comment}{! 結合解除}
6375     \textcolor{comment}{! Release associations}
6376     \textcolor{comment}{!}
6377     \textcolor{keyword}{nullify}( gthist )
6378                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
6379                     
6380 
6381 999 \textcolor{keywordflow}{continue}
6382     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
6383     \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]{historyautoput_8f90_a6ed09634c98c9b4d746c2c0ab363dbad_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a1e12174c9e21d2d51f16d1d8c0293633}\label{historyautoput_8f90_a1e12174c9e21d2d51f16d1d8c0293633}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputint6@{historyautoputint6}}
\index{historyautoputint6@{historyautoputint6}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputint6()}{historyautoputint6()}}
{\footnotesize\ttfamily subroutine historyautoputint6 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 6391 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
6391     \textcolor{comment}{!}
6392                     
6393     \textcolor{comment}{!}
6394 
6395     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
6396       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
6397       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
6398       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
6399       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
6400       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
6401       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
6402       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
6403       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
6404     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
6405       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
6406     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
6407     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
6408       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
6409     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
6410       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
6411       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
6412     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
6413     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
6414     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
6415     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
6416       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
6417     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
6418     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
6419       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
6420       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
6421     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
6422     \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}
6423     \textcolor{keywordtype}{implicit none}
6424     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
6425                     
6426     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
6427                     
6428     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:)
6429                     
6430     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
6431                     
6432 
6433     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
6434                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
6435                               \textcolor{comment}{! Derived type for "gtool\_history" module}
6436 
6437                         \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:,:) =>null()
6438     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
6439     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:,:) =>null()
6440                     
6441     \textcolor{keywordtype}{real(DP)}:: settime
6442     \textcolor{keywordtype}{integer}:: stat, i
6443     \textcolor{keywordtype}{integer}:: vnum
6444     \textcolor{keywordtype}{character(STRING)}:: cause\_c
6445     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
6446     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutInt6"}
6447   \textcolor{keywordflow}{continue}
6448     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
6449     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
6450     cause\_c = \textcolor{stringliteral}{""}
6451 
6452     \textcolor{comment}{! 初期設定チェック}
6453     \textcolor{comment}{! Check initialization}
6454     \textcolor{comment}{!}
6455     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
6456       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
6457       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
6458       \textcolor{keywordflow}{goto} 999
6459 \textcolor{keywordflow}{    end if}
6460 
6461     \textcolor{comment}{! 時刻に関するエラー処理}
6462     \textcolor{comment}{! Error handling for time}
6463     \textcolor{comment}{!}
6464     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
6465       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
6466       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
6467         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
6468         & c1 = trim( cause\_c ), c2 = trim( varname ) )
6469       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
6470       cause\_c = \textcolor{stringliteral}{'time'}
6471       \textcolor{keywordflow}{goto} 999
6472 \textcolor{keywordflow}{    end if}
6473 
6474     \textcolor{comment}{! 変数 ID のサーチ}
6475     \textcolor{comment}{! Search variable ID}
6476     \textcolor{comment}{!}
6477     varsearch: \textcolor{keywordflow}{do}
6478       \textcolor{keywordflow}{do} i = svnum, numvars
6479         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
6480           vnum = i
6481           \textcolor{keywordflow}{exit} varsearch
6482 \textcolor{keywordflow}{        end if}
6483 \textcolor{keywordflow}{      end do}
6484       \textcolor{keywordflow}{do} i = 1, svnum - 1
6485         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
6486           vnum = i
6487           \textcolor{keywordflow}{exit} varsearch
6488 \textcolor{keywordflow}{        end if}
6489 \textcolor{keywordflow}{      end do}
6490 
6491       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
6492       cause\_c = varname
6493       \textcolor{keywordflow}{goto} 999
6494 \textcolor{keywordflow}{    end do} varsearch
6495 
6496     svnum = vnum
6497 
6498     \textcolor{comment}{! 定義モードからデータモードへ}
6499     \textcolor{comment}{! Transit from define mode to data mode}
6500     \textcolor{comment}{!}
6501     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
6502       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
6503 \textcolor{keywordflow}{    end if}
6504 
6505     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
6506     \textcolor{comment}{! Check output timing and create files}
6507     \textcolor{comment}{!}
6508     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
6509       &        time = time, &    \textcolor{comment}{! (in)}
6510       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
6511 
6512     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
6513     \textcolor{comment}{! Open, close, reopen files}
6514     \textcolor{comment}{!}
6515     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
6516       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
6517       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
6518         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
6519       histaddvar\_vars(vnum) = .true.
6520       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
6521         prev\_outtime\_vars(vnum) = time
6522       \textcolor{keywordflow}{else}
6523         flag\_output\_prev\_vars(vnum) = .true.
6524         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
6525           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
6526         \textcolor{keywordflow}{else}
6527           prev\_outtime\_vars(vnum) = time
6528 \textcolor{keywordflow}{        end if}
6529 \textcolor{keywordflow}{      end if}
6530 \textcolor{keywordflow}{    end if}
6531 
6532     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6533       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
6534         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
6535 \textcolor{keywordflow}{      end if}
6536 \textcolor{keywordflow}{    end if}
6537 
6538     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6539       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
6540         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
6541 \textcolor{keywordflow}{      end if}
6542       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
6543         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
6544       newfile\_createtime\_vars(vnum) = time
6545       prev\_outtime\_vars(vnum) = time
6546 \textcolor{keywordflow}{    end if}
6547 
6548     \textcolor{comment}{! 出力が有効かどうかを確認する}
6549     \textcolor{comment}{! Confirm whether the output is effective}
6550     \textcolor{comment}{!}
6551     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
6552       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6553 
6554       \textcolor{keywordflow}{goto} 999
6555 \textcolor{keywordflow}{    end if}
6556 
6557     \textcolor{comment}{! GT\_HISTORY 変数の取得}
6558     \textcolor{comment}{! Get "GT\_HISTORY" variable}
6559     \textcolor{comment}{!}
6560     gthist => gthst\_history\_vars(vnum) % gthist
6561 
6562 
6563     \textcolor{comment}{! 空間切り出し}
6564     \textcolor{comment}{! Slice of spaces}
6565     \textcolor{comment}{!}
6566                         sv => slice\_vars(vnum)
6567 
6568                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
6569                       
6570 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
6571                       
6572 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
6573                       
6574 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
6575                       
6576 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
6577                       
6578 \textcolor{comment}{!!$        write(*,*) '  sv%st(6), sv%ed(6), sv%sd(6)=', sv%st(6), sv%ed(6), sv%sd(6)}
6579                       
6580 
6581     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
6582                             & , sv%st(2):sv%ed(2):sv%sd(2) &
6583                       
6584       & , sv%st(3):sv%ed(3):sv%sd(3) &
6585                       
6586       & , sv%st(4):sv%ed(4):sv%sd(4) &
6587                       
6588       & , sv%st(5):sv%ed(5):sv%sd(5) &
6589                       
6590       & , sv%st(6):sv%ed(6):sv%sd(6) &
6591                       
6592       & )
6593                     
6594 
6595 
6596     \textcolor{comment}{! 空間平均}
6597     \textcolor{comment}{! Spatial average}
6598     \textcolor{comment}{!}
6599                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
6600       array\_avr => array\_slice
6601     \textcolor{keywordflow}{else}
6602       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
6603         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
6604                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
6605                       
6606         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
6607                       
6608         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
6609                       
6610         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
6611                       
6612         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
6613                       
6614         & weight\_vars(vnum) % wgt6( sv%st(6):sv%ed(6):sv%sd(6) ) , &   \textcolor{comment}{! (in)}
6615                       
6616         & array\_avr )                       \textcolor{comment}{! (out)}
6617 \textcolor{keywordflow}{    end if}
6618 
6619     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
6620 
6621                     
6622 
6623     \textcolor{comment}{! 単位に応じて時刻を変換}
6624     \textcolor{comment}{! Convert time according to units}
6625     \textcolor{comment}{!}
6626     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
6627       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6628 
6629       settime = &
6630         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
6631 \textcolor{keywordflow}{    end if}
6632 
6633     \textcolor{comment}{! 時刻設定}
6634     \textcolor{comment}{! Set time}
6635     \textcolor{comment}{!}
6636     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6637       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
6638         & history = gthist, &   \textcolor{comment}{! (in) optional}
6639         & timed = settime )     \textcolor{comment}{! (in) optional}
6640 \textcolor{keywordflow}{    end if}
6641 
6642     \textcolor{comment}{! 出力}
6643     \textcolor{comment}{! OutPut}
6644     \textcolor{comment}{!}
6645     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6646       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
6647         & varname, &              \textcolor{comment}{! (in)}
6648                               & array\_avr, &            \textcolor{comment}{! (in)}
6649                       
6650         & timed = settime, &      \textcolor{comment}{! (in) optional}
6651         & time\_average\_store = &
6652         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
6653         & history = gthist )                  \textcolor{comment}{! (inout) optional}
6654     \textcolor{keywordflow}{else}
6655       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
6656         & varname, &              \textcolor{comment}{! (in)}
6657                               & array\_avr, &            \textcolor{comment}{! (in)}
6658                       
6659         & history = gthist )      \textcolor{comment}{! (inout) optional}
6660 \textcolor{keywordflow}{    end if}
6661 
6662     \textcolor{comment}{! 最後に出力した時刻を保存}
6663     \textcolor{comment}{! Save last time of output}
6664     \textcolor{comment}{!}
6665     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6666       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
6667         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6668 
6669         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
6670           prev\_outtime\_vars(vnum) = time
6671         \textcolor{keywordflow}{else}
6672           prev\_outtime\_vars(vnum) = &
6673             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
6674 \textcolor{keywordflow}{        end if}
6675 \textcolor{keywordflow}{      end if}
6676 \textcolor{keywordflow}{    end if}
6677 
6678     \textcolor{comment}{! 結合解除}
6679     \textcolor{comment}{! Release associations}
6680     \textcolor{comment}{!}
6681     \textcolor{keyword}{nullify}( gthist )
6682                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
6683                     
6684 
6685 999 \textcolor{keywordflow}{continue}
6686     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
6687     \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]{historyautoput_8f90_a1e12174c9e21d2d51f16d1d8c0293633_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a4a613764d786ad25fe770d07addd2b08}\label{historyautoput_8f90_a4a613764d786ad25fe770d07addd2b08}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputint7@{historyautoputint7}}
\index{historyautoputint7@{historyautoputint7}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputint7()}{historyautoputint7()}}
{\footnotesize\ttfamily subroutine historyautoputint7 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 6695 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
6695     \textcolor{comment}{!}
6696                     
6697     \textcolor{comment}{!}
6698 
6699     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
6700       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
6701       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
6702       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
6703       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
6704       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
6705       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
6706       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
6707       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
6708     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
6709       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
6710     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
6711     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
6712       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
6713     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
6714       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
6715       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
6716     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
6717     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
6718     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
6719     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
6720       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
6721     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
6722     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
6723       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
6724       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
6725     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
6726     \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}
6727     \textcolor{keywordtype}{implicit none}
6728     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
6729                     
6730     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
6731                     
6732     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:,:)
6733                     
6734     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
6735                     
6736 
6737     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
6738                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
6739                               \textcolor{comment}{! Derived type for "gtool\_history" module}
6740 
6741                         \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:,:,:) =>null()
6742     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
6743     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:,:,:) =>null()
6744                     
6745     \textcolor{keywordtype}{real(DP)}:: settime
6746     \textcolor{keywordtype}{integer}:: stat, i
6747     \textcolor{keywordtype}{integer}:: vnum
6748     \textcolor{keywordtype}{character(STRING)}:: cause\_c
6749     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
6750     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutInt7"}
6751   \textcolor{keywordflow}{continue}
6752     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
6753     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
6754     cause\_c = \textcolor{stringliteral}{""}
6755 
6756     \textcolor{comment}{! 初期設定チェック}
6757     \textcolor{comment}{! Check initialization}
6758     \textcolor{comment}{!}
6759     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
6760       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
6761       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
6762       \textcolor{keywordflow}{goto} 999
6763 \textcolor{keywordflow}{    end if}
6764 
6765     \textcolor{comment}{! 時刻に関するエラー処理}
6766     \textcolor{comment}{! Error handling for time}
6767     \textcolor{comment}{!}
6768     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
6769       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
6770       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
6771         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
6772         & c1 = trim( cause\_c ), c2 = trim( varname ) )
6773       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
6774       cause\_c = \textcolor{stringliteral}{'time'}
6775       \textcolor{keywordflow}{goto} 999
6776 \textcolor{keywordflow}{    end if}
6777 
6778     \textcolor{comment}{! 変数 ID のサーチ}
6779     \textcolor{comment}{! Search variable ID}
6780     \textcolor{comment}{!}
6781     varsearch: \textcolor{keywordflow}{do}
6782       \textcolor{keywordflow}{do} i = svnum, numvars
6783         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
6784           vnum = i
6785           \textcolor{keywordflow}{exit} varsearch
6786 \textcolor{keywordflow}{        end if}
6787 \textcolor{keywordflow}{      end do}
6788       \textcolor{keywordflow}{do} i = 1, svnum - 1
6789         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
6790           vnum = i
6791           \textcolor{keywordflow}{exit} varsearch
6792 \textcolor{keywordflow}{        end if}
6793 \textcolor{keywordflow}{      end do}
6794 
6795       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
6796       cause\_c = varname
6797       \textcolor{keywordflow}{goto} 999
6798 \textcolor{keywordflow}{    end do} varsearch
6799 
6800     svnum = vnum
6801 
6802     \textcolor{comment}{! 定義モードからデータモードへ}
6803     \textcolor{comment}{! Transit from define mode to data mode}
6804     \textcolor{comment}{!}
6805     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
6806       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
6807 \textcolor{keywordflow}{    end if}
6808 
6809     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
6810     \textcolor{comment}{! Check output timing and create files}
6811     \textcolor{comment}{!}
6812     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
6813       &        time = time, &    \textcolor{comment}{! (in)}
6814       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
6815 
6816     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
6817     \textcolor{comment}{! Open, close, reopen files}
6818     \textcolor{comment}{!}
6819     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
6820       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
6821       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
6822         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
6823       histaddvar\_vars(vnum) = .true.
6824       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
6825         prev\_outtime\_vars(vnum) = time
6826       \textcolor{keywordflow}{else}
6827         flag\_output\_prev\_vars(vnum) = .true.
6828         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
6829           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
6830         \textcolor{keywordflow}{else}
6831           prev\_outtime\_vars(vnum) = time
6832 \textcolor{keywordflow}{        end if}
6833 \textcolor{keywordflow}{      end if}
6834 \textcolor{keywordflow}{    end if}
6835 
6836     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6837       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
6838         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
6839 \textcolor{keywordflow}{      end if}
6840 \textcolor{keywordflow}{    end if}
6841 
6842     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6843       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
6844         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
6845 \textcolor{keywordflow}{      end if}
6846       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
6847         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
6848       newfile\_createtime\_vars(vnum) = time
6849       prev\_outtime\_vars(vnum) = time
6850 \textcolor{keywordflow}{    end if}
6851 
6852     \textcolor{comment}{! 出力が有効かどうかを確認する}
6853     \textcolor{comment}{! Confirm whether the output is effective}
6854     \textcolor{comment}{!}
6855     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
6856       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6857 
6858       \textcolor{keywordflow}{goto} 999
6859 \textcolor{keywordflow}{    end if}
6860 
6861     \textcolor{comment}{! GT\_HISTORY 変数の取得}
6862     \textcolor{comment}{! Get "GT\_HISTORY" variable}
6863     \textcolor{comment}{!}
6864     gthist => gthst\_history\_vars(vnum) % gthist
6865 
6866 
6867     \textcolor{comment}{! 空間切り出し}
6868     \textcolor{comment}{! Slice of spaces}
6869     \textcolor{comment}{!}
6870                         sv => slice\_vars(vnum)
6871 
6872                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
6873                       
6874 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
6875                       
6876 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
6877                       
6878 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
6879                       
6880 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
6881                       
6882 \textcolor{comment}{!!$        write(*,*) '  sv%st(6), sv%ed(6), sv%sd(6)=', sv%st(6), sv%ed(6), sv%sd(6)}
6883                       
6884 \textcolor{comment}{!!$        write(*,*) '  sv%st(7), sv%ed(7), sv%sd(7)=', sv%st(7), sv%ed(7), sv%sd(7)}
6885                       
6886 
6887     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
6888                             & , sv%st(2):sv%ed(2):sv%sd(2) &
6889                       
6890       & , sv%st(3):sv%ed(3):sv%sd(3) &
6891                       
6892       & , sv%st(4):sv%ed(4):sv%sd(4) &
6893                       
6894       & , sv%st(5):sv%ed(5):sv%sd(5) &
6895                       
6896       & , sv%st(6):sv%ed(6):sv%sd(6) &
6897                       
6898       & , sv%st(7):sv%ed(7):sv%sd(7) &
6899                       
6900       & )
6901                     
6902 
6903 
6904     \textcolor{comment}{! 空間平均}
6905     \textcolor{comment}{! Spatial average}
6906     \textcolor{comment}{!}
6907                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
6908       array\_avr => array\_slice
6909     \textcolor{keywordflow}{else}
6910       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
6911         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
6912                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
6913                       
6914         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
6915                       
6916         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
6917                       
6918         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
6919                       
6920         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
6921                       
6922         & weight\_vars(vnum) % wgt6( sv%st(6):sv%ed(6):sv%sd(6) ) , &   \textcolor{comment}{! (in)}
6923                       
6924         & weight\_vars(vnum) % wgt7( sv%st(7):sv%ed(7):sv%sd(7) ) , &   \textcolor{comment}{! (in)}
6925                       
6926         & array\_avr )                       \textcolor{comment}{! (out)}
6927 \textcolor{keywordflow}{    end if}
6928 
6929     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
6930 
6931                     
6932 
6933     \textcolor{comment}{! 単位に応じて時刻を変換}
6934     \textcolor{comment}{! Convert time according to units}
6935     \textcolor{comment}{!}
6936     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
6937       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6938 
6939       settime = &
6940         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
6941 \textcolor{keywordflow}{    end if}
6942 
6943     \textcolor{comment}{! 時刻設定}
6944     \textcolor{comment}{! Set time}
6945     \textcolor{comment}{!}
6946     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6947       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
6948         & history = gthist, &   \textcolor{comment}{! (in) optional}
6949         & timed = settime )     \textcolor{comment}{! (in) optional}
6950 \textcolor{keywordflow}{    end if}
6951 
6952     \textcolor{comment}{! 出力}
6953     \textcolor{comment}{! OutPut}
6954     \textcolor{comment}{!}
6955     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6956       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
6957         & varname, &              \textcolor{comment}{! (in)}
6958                               & array\_avr, &            \textcolor{comment}{! (in)}
6959                       
6960         & timed = settime, &      \textcolor{comment}{! (in) optional}
6961         & time\_average\_store = &
6962         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
6963         & history = gthist )                  \textcolor{comment}{! (inout) optional}
6964     \textcolor{keywordflow}{else}
6965       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
6966         & varname, &              \textcolor{comment}{! (in)}
6967                               & array\_avr, &            \textcolor{comment}{! (in)}
6968                       
6969         & history = gthist )      \textcolor{comment}{! (inout) optional}
6970 \textcolor{keywordflow}{    end if}
6971 
6972     \textcolor{comment}{! 最後に出力した時刻を保存}
6973     \textcolor{comment}{! Save last time of output}
6974     \textcolor{comment}{!}
6975     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6976       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
6977         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
6978 
6979         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
6980           prev\_outtime\_vars(vnum) = time
6981         \textcolor{keywordflow}{else}
6982           prev\_outtime\_vars(vnum) = &
6983             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
6984 \textcolor{keywordflow}{        end if}
6985 \textcolor{keywordflow}{      end if}
6986 \textcolor{keywordflow}{    end if}
6987 
6988     \textcolor{comment}{! 結合解除}
6989     \textcolor{comment}{! Release associations}
6990     \textcolor{comment}{!}
6991     \textcolor{keyword}{nullify}( gthist )
6992                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
6993                     
6994 
6995 999 \textcolor{keywordflow}{continue}
6996     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
6997     \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]{historyautoput_8f90_a4a613764d786ad25fe770d07addd2b08_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a1ee862fac0290821bd7a0370722f7497}\label{historyautoput_8f90_a1ee862fac0290821bd7a0370722f7497}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1double0@{historyautoputold1double0}}
\index{historyautoputold1double0@{historyautoputold1double0}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1double0()}{historyautoputold1double0()}}
{\footnotesize\ttfamily subroutine historyautoputold1double0 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), intent(in), target}]{value,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7005 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7005     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7006     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7007       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7008       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7009     \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}
7010     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7011     \textcolor{keywordtype}{implicit none}
7012     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7013     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7014     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: value
7015     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7016 
7017     \textcolor{keywordtype}{real(DP)}:: timed
7018 
7019   \textcolor{keywordflow}{continue}
7020     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7021 
7022     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7023       & timed, varname, \textcolor{keywordtype}{value}, &  \textcolor{comment}{! (in)}
7024       & err )                                    \textcolor{comment}{! (out) optional}
7025 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_ad437098082ca17279e227281e3ef2022}\label{historyautoput_8f90_ad437098082ca17279e227281e3ef2022}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1double1@{historyautoputold1double1}}
\index{historyautoputold1double1@{historyautoputold1double1}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1double1()}{historyautoputold1double1()}}
{\footnotesize\ttfamily subroutine historyautoputold1double1 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7033 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7033     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7034     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7035       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7036       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7037     \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}
7038     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7039     \textcolor{keywordtype}{implicit none}
7040     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7041     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7042     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:)
7043     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7044 
7045     \textcolor{keywordtype}{real(DP)}:: timed
7046 
7047   \textcolor{keywordflow}{continue}
7048     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7049 
7050     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7051       & timed, varname, array, &  \textcolor{comment}{! (in)}
7052       & err )                                    \textcolor{comment}{! (out) optional}
7053 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a04d76f0d98ffb5b94fa217dfd50e87d4}\label{historyautoput_8f90_a04d76f0d98ffb5b94fa217dfd50e87d4}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1double2@{historyautoputold1double2}}
\index{historyautoputold1double2@{historyautoputold1double2}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1double2()}{historyautoputold1double2()}}
{\footnotesize\ttfamily subroutine historyautoputold1double2 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7061 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7061     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7062     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7063       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7064       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7065     \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}
7066     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7067     \textcolor{keywordtype}{implicit none}
7068     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7069     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7070     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:)
7071     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7072 
7073     \textcolor{keywordtype}{real(DP)}:: timed
7074 
7075   \textcolor{keywordflow}{continue}
7076     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7077 
7078     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7079       & timed, varname, array, &  \textcolor{comment}{! (in)}
7080       & err )                                    \textcolor{comment}{! (out) optional}
7081 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a4c3d9cee366182f90984fca9e376fcf9}\label{historyautoput_8f90_a4c3d9cee366182f90984fca9e376fcf9}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1double3@{historyautoputold1double3}}
\index{historyautoputold1double3@{historyautoputold1double3}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1double3()}{historyautoputold1double3()}}
{\footnotesize\ttfamily subroutine historyautoputold1double3 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7089 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7089     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7090     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7091       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7092       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7093     \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}
7094     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7095     \textcolor{keywordtype}{implicit none}
7096     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7097     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7098     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:)
7099     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7100 
7101     \textcolor{keywordtype}{real(DP)}:: timed
7102 
7103   \textcolor{keywordflow}{continue}
7104     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7105 
7106     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7107       & timed, varname, array, &  \textcolor{comment}{! (in)}
7108       & err )                                    \textcolor{comment}{! (out) optional}
7109 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a4818c20a43435bdcae425314a50f2b66}\label{historyautoput_8f90_a4818c20a43435bdcae425314a50f2b66}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1double4@{historyautoputold1double4}}
\index{historyautoputold1double4@{historyautoputold1double4}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1double4()}{historyautoputold1double4()}}
{\footnotesize\ttfamily subroutine historyautoputold1double4 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7117 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7117     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7118     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7119       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7120       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7121     \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}
7122     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7123     \textcolor{keywordtype}{implicit none}
7124     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7125     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7126     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:)
7127     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7128 
7129     \textcolor{keywordtype}{real(DP)}:: timed
7130 
7131   \textcolor{keywordflow}{continue}
7132     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7133 
7134     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7135       & timed, varname, array, &  \textcolor{comment}{! (in)}
7136       & err )                                    \textcolor{comment}{! (out) optional}
7137 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_add4f7a88e2be7918841d3db000ed1d5c}\label{historyautoput_8f90_add4f7a88e2be7918841d3db000ed1d5c}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1double5@{historyautoputold1double5}}
\index{historyautoputold1double5@{historyautoputold1double5}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1double5()}{historyautoputold1double5()}}
{\footnotesize\ttfamily subroutine historyautoputold1double5 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7145 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7145     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7146     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7147       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7148       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7149     \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}
7150     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7151     \textcolor{keywordtype}{implicit none}
7152     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7153     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7154     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:)
7155     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7156 
7157     \textcolor{keywordtype}{real(DP)}:: timed
7158 
7159   \textcolor{keywordflow}{continue}
7160     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7161 
7162     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7163       & timed, varname, array, &  \textcolor{comment}{! (in)}
7164       & err )                                    \textcolor{comment}{! (out) optional}
7165 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a7d8aa4601e44c3e150b7a03703201726}\label{historyautoput_8f90_a7d8aa4601e44c3e150b7a03703201726}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1double6@{historyautoputold1double6}}
\index{historyautoputold1double6@{historyautoputold1double6}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1double6()}{historyautoputold1double6()}}
{\footnotesize\ttfamily subroutine historyautoputold1double6 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7173 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7173     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7174     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7175       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7176       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7177     \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}
7178     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7179     \textcolor{keywordtype}{implicit none}
7180     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7181     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7182     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:)
7183     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7184 
7185     \textcolor{keywordtype}{real(DP)}:: timed
7186 
7187   \textcolor{keywordflow}{continue}
7188     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7189 
7190     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7191       & timed, varname, array, &  \textcolor{comment}{! (in)}
7192       & err )                                    \textcolor{comment}{! (out) optional}
7193 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a10053370cf0cb237cb9df4dc86811a98}\label{historyautoput_8f90_a10053370cf0cb237cb9df4dc86811a98}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1double7@{historyautoputold1double7}}
\index{historyautoputold1double7@{historyautoputold1double7}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1double7()}{historyautoputold1double7()}}
{\footnotesize\ttfamily subroutine historyautoputold1double7 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7201 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7201     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7202     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7203       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7204       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7205     \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}
7206     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7207     \textcolor{keywordtype}{implicit none}
7208     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7209     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7210     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:,:)
7211     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7212 
7213     \textcolor{keywordtype}{real(DP)}:: timed
7214 
7215   \textcolor{keywordflow}{continue}
7216     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7217 
7218     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7219       & timed, varname, array, &  \textcolor{comment}{! (in)}
7220       & err )                                    \textcolor{comment}{! (out) optional}
7221 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_abe3eeca8fc32b5f6927ae29ad586b1b8}\label{historyautoput_8f90_abe3eeca8fc32b5f6927ae29ad586b1b8}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1int0@{historyautoputold1int0}}
\index{historyautoputold1int0@{historyautoputold1int0}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1int0()}{historyautoputold1int0()}}
{\footnotesize\ttfamily subroutine historyautoputold1int0 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, intent(in), target}]{value,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7453 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7453     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7454     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7455       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7456       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7457     \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}
7458     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7459     \textcolor{keywordtype}{implicit none}
7460     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7461     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7462     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: value
7463     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7464 
7465     \textcolor{keywordtype}{real(DP)}:: timed
7466 
7467   \textcolor{keywordflow}{continue}
7468     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7469 
7470     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7471       & timed, varname, \textcolor{keywordtype}{value}, &  \textcolor{comment}{! (in)}
7472       & err )                                    \textcolor{comment}{! (out) optional}
7473 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_ac01ab8b5c12801a71a5dbbff48bfbecd}\label{historyautoput_8f90_ac01ab8b5c12801a71a5dbbff48bfbecd}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1int1@{historyautoputold1int1}}
\index{historyautoputold1int1@{historyautoputold1int1}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1int1()}{historyautoputold1int1()}}
{\footnotesize\ttfamily subroutine historyautoputold1int1 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7481 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7481     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7482     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7483       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7484       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7485     \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}
7486     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7487     \textcolor{keywordtype}{implicit none}
7488     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7489     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7490     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:)
7491     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7492 
7493     \textcolor{keywordtype}{real(DP)}:: timed
7494 
7495   \textcolor{keywordflow}{continue}
7496     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7497 
7498     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7499       & timed, varname, array, &  \textcolor{comment}{! (in)}
7500       & err )                                    \textcolor{comment}{! (out) optional}
7501 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a020e89bab179e21ba927bd94d40fb034}\label{historyautoput_8f90_a020e89bab179e21ba927bd94d40fb034}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1int2@{historyautoputold1int2}}
\index{historyautoputold1int2@{historyautoputold1int2}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1int2()}{historyautoputold1int2()}}
{\footnotesize\ttfamily subroutine historyautoputold1int2 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7509 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7509     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7510     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7511       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7512       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7513     \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}
7514     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7515     \textcolor{keywordtype}{implicit none}
7516     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7517     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7518     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:)
7519     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7520 
7521     \textcolor{keywordtype}{real(DP)}:: timed
7522 
7523   \textcolor{keywordflow}{continue}
7524     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7525 
7526     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7527       & timed, varname, array, &  \textcolor{comment}{! (in)}
7528       & err )                                    \textcolor{comment}{! (out) optional}
7529 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a322d9cf46a6ea2c0001941e76737260a}\label{historyautoput_8f90_a322d9cf46a6ea2c0001941e76737260a}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1int3@{historyautoputold1int3}}
\index{historyautoputold1int3@{historyautoputold1int3}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1int3()}{historyautoputold1int3()}}
{\footnotesize\ttfamily subroutine historyautoputold1int3 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7537 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7537     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7538     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7539       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7540       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7541     \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}
7542     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7543     \textcolor{keywordtype}{implicit none}
7544     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7545     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7546     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:)
7547     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7548 
7549     \textcolor{keywordtype}{real(DP)}:: timed
7550 
7551   \textcolor{keywordflow}{continue}
7552     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7553 
7554     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7555       & timed, varname, array, &  \textcolor{comment}{! (in)}
7556       & err )                                    \textcolor{comment}{! (out) optional}
7557 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a10339f0134876f97571124338093f22d}\label{historyautoput_8f90_a10339f0134876f97571124338093f22d}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1int4@{historyautoputold1int4}}
\index{historyautoputold1int4@{historyautoputold1int4}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1int4()}{historyautoputold1int4()}}
{\footnotesize\ttfamily subroutine historyautoputold1int4 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7565 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7565     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7566     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7567       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7568       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7569     \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}
7570     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7571     \textcolor{keywordtype}{implicit none}
7572     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7573     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7574     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:)
7575     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7576 
7577     \textcolor{keywordtype}{real(DP)}:: timed
7578 
7579   \textcolor{keywordflow}{continue}
7580     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7581 
7582     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7583       & timed, varname, array, &  \textcolor{comment}{! (in)}
7584       & err )                                    \textcolor{comment}{! (out) optional}
7585 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a344c4bd693d9389d0bd8ca0ade118ce1}\label{historyautoput_8f90_a344c4bd693d9389d0bd8ca0ade118ce1}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1int5@{historyautoputold1int5}}
\index{historyautoputold1int5@{historyautoputold1int5}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1int5()}{historyautoputold1int5()}}
{\footnotesize\ttfamily subroutine historyautoputold1int5 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7593 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7593     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7594     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7595       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7596       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7597     \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}
7598     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7599     \textcolor{keywordtype}{implicit none}
7600     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7601     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7602     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:)
7603     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7604 
7605     \textcolor{keywordtype}{real(DP)}:: timed
7606 
7607   \textcolor{keywordflow}{continue}
7608     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7609 
7610     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7611       & timed, varname, array, &  \textcolor{comment}{! (in)}
7612       & err )                                    \textcolor{comment}{! (out) optional}
7613 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a3c0e175ec349fe4bf1845769c73755cc}\label{historyautoput_8f90_a3c0e175ec349fe4bf1845769c73755cc}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1int6@{historyautoputold1int6}}
\index{historyautoputold1int6@{historyautoputold1int6}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1int6()}{historyautoputold1int6()}}
{\footnotesize\ttfamily subroutine historyautoputold1int6 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7621 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7621     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7622     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7623       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7624       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7625     \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}
7626     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7627     \textcolor{keywordtype}{implicit none}
7628     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7629     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7630     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:)
7631     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7632 
7633     \textcolor{keywordtype}{real(DP)}:: timed
7634 
7635   \textcolor{keywordflow}{continue}
7636     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7637 
7638     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7639       & timed, varname, array, &  \textcolor{comment}{! (in)}
7640       & err )                                    \textcolor{comment}{! (out) optional}
7641 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_aed4d1654848b0ca7e7ade1437378b2d8}\label{historyautoput_8f90_aed4d1654848b0ca7e7ade1437378b2d8}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1int7@{historyautoputold1int7}}
\index{historyautoputold1int7@{historyautoputold1int7}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1int7()}{historyautoputold1int7()}}
{\footnotesize\ttfamily subroutine historyautoputold1int7 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7649 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7649     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7650     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7651       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7652       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7653     \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}
7654     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7655     \textcolor{keywordtype}{implicit none}
7656     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7657     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7658     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:,:)
7659     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7660 
7661     \textcolor{keywordtype}{real(DP)}:: timed
7662 
7663   \textcolor{keywordflow}{continue}
7664     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7665 
7666     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7667       & timed, varname, array, &  \textcolor{comment}{! (in)}
7668       & err )                                    \textcolor{comment}{! (out) optional}
7669 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a484ba22990f64ee2fccaf1769b68eef7}\label{historyautoput_8f90_a484ba22990f64ee2fccaf1769b68eef7}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1real0@{historyautoputold1real0}}
\index{historyautoputold1real0@{historyautoputold1real0}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1real0()}{historyautoputold1real0()}}
{\footnotesize\ttfamily subroutine historyautoputold1real0 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, intent(in), target}]{value,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7229 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7229     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7230     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7231       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7232       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7233     \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}
7234     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7235     \textcolor{keywordtype}{implicit none}
7236     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7237     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7238     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: value
7239     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7240 
7241     \textcolor{keywordtype}{real(DP)}:: timed
7242 
7243   \textcolor{keywordflow}{continue}
7244     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7245 
7246     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7247       & timed, varname, \textcolor{keywordtype}{value}, &  \textcolor{comment}{! (in)}
7248       & err )                                    \textcolor{comment}{! (out) optional}
7249 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a985b24d40a111bc1c48de166995b0a80}\label{historyautoput_8f90_a985b24d40a111bc1c48de166995b0a80}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1real1@{historyautoputold1real1}}
\index{historyautoputold1real1@{historyautoputold1real1}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1real1()}{historyautoputold1real1()}}
{\footnotesize\ttfamily subroutine historyautoputold1real1 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7257 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7257     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7258     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7259       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7260       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7261     \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}
7262     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7263     \textcolor{keywordtype}{implicit none}
7264     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7265     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7266     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:)
7267     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7268 
7269     \textcolor{keywordtype}{real(DP)}:: timed
7270 
7271   \textcolor{keywordflow}{continue}
7272     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7273 
7274     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7275       & timed, varname, array, &  \textcolor{comment}{! (in)}
7276       & err )                                    \textcolor{comment}{! (out) optional}
7277 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a4a15e9342cdb899a57f50feb40b0b91c}\label{historyautoput_8f90_a4a15e9342cdb899a57f50feb40b0b91c}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1real2@{historyautoputold1real2}}
\index{historyautoputold1real2@{historyautoputold1real2}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1real2()}{historyautoputold1real2()}}
{\footnotesize\ttfamily subroutine historyautoputold1real2 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7285 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7285     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7286     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7287       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7288       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7289     \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}
7290     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7291     \textcolor{keywordtype}{implicit none}
7292     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7293     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7294     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:)
7295     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7296 
7297     \textcolor{keywordtype}{real(DP)}:: timed
7298 
7299   \textcolor{keywordflow}{continue}
7300     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7301 
7302     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7303       & timed, varname, array, &  \textcolor{comment}{! (in)}
7304       & err )                                    \textcolor{comment}{! (out) optional}
7305 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a1f82fecad2f460579a54249a33be6edf}\label{historyautoput_8f90_a1f82fecad2f460579a54249a33be6edf}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1real3@{historyautoputold1real3}}
\index{historyautoputold1real3@{historyautoputold1real3}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1real3()}{historyautoputold1real3()}}
{\footnotesize\ttfamily subroutine historyautoputold1real3 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7313 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7313     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7314     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7315       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7316       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7317     \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}
7318     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7319     \textcolor{keywordtype}{implicit none}
7320     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7321     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7322     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:)
7323     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7324 
7325     \textcolor{keywordtype}{real(DP)}:: timed
7326 
7327   \textcolor{keywordflow}{continue}
7328     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7329 
7330     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7331       & timed, varname, array, &  \textcolor{comment}{! (in)}
7332       & err )                                    \textcolor{comment}{! (out) optional}
7333 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_adbbb69ea824040208cd91d651b96836e}\label{historyautoput_8f90_adbbb69ea824040208cd91d651b96836e}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1real4@{historyautoputold1real4}}
\index{historyautoputold1real4@{historyautoputold1real4}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1real4()}{historyautoputold1real4()}}
{\footnotesize\ttfamily subroutine historyautoputold1real4 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7341 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7341     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7342     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7343       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7344       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7345     \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}
7346     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7347     \textcolor{keywordtype}{implicit none}
7348     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7349     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7350     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:)
7351     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7352 
7353     \textcolor{keywordtype}{real(DP)}:: timed
7354 
7355   \textcolor{keywordflow}{continue}
7356     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7357 
7358     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7359       & timed, varname, array, &  \textcolor{comment}{! (in)}
7360       & err )                                    \textcolor{comment}{! (out) optional}
7361 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a0ae20c7ca0d4a9b943814f9bc699100b}\label{historyautoput_8f90_a0ae20c7ca0d4a9b943814f9bc699100b}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1real5@{historyautoputold1real5}}
\index{historyautoputold1real5@{historyautoputold1real5}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1real5()}{historyautoputold1real5()}}
{\footnotesize\ttfamily subroutine historyautoputold1real5 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7369 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7369     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7370     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7371       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7372       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7373     \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}
7374     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7375     \textcolor{keywordtype}{implicit none}
7376     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7377     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7378     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:)
7379     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7380 
7381     \textcolor{keywordtype}{real(DP)}:: timed
7382 
7383   \textcolor{keywordflow}{continue}
7384     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7385 
7386     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7387       & timed, varname, array, &  \textcolor{comment}{! (in)}
7388       & err )                                    \textcolor{comment}{! (out) optional}
7389 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a54c9cf4e170b576633f29942fbd2ae36}\label{historyautoput_8f90_a54c9cf4e170b576633f29942fbd2ae36}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1real6@{historyautoputold1real6}}
\index{historyautoputold1real6@{historyautoputold1real6}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1real6()}{historyautoputold1real6()}}
{\footnotesize\ttfamily subroutine historyautoputold1real6 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7397 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7397     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7398     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7399       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7400       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7401     \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}
7402     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7403     \textcolor{keywordtype}{implicit none}
7404     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7405     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7406     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:)
7407     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7408 
7409     \textcolor{keywordtype}{real(DP)}:: timed
7410 
7411   \textcolor{keywordflow}{continue}
7412     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7413 
7414     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7415       & timed, varname, array, &  \textcolor{comment}{! (in)}
7416       & err )                                    \textcolor{comment}{! (out) optional}
7417 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_a226ac696d1f32290b4944891d0f07add}\label{historyautoput_8f90_a226ac696d1f32290b4944891d0f07add}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputold1real7@{historyautoputold1real7}}
\index{historyautoputold1real7@{historyautoputold1real7}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputold1real7()}{historyautoputold1real7()}}
{\footnotesize\ttfamily subroutine historyautoputold1real7 (\begin{DoxyParamCaption}\item[{type(dc\+\_\+difftime), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 7425 of file historyautoput.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
7425     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}
7426     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
7427       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
7428       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}, \textcolor{keyword}{assignment}(=)
7429     \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}
7430     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
7431     \textcolor{keywordtype}{implicit none}
7432     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: time
7433     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
7434     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:,:)
7435     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
7436 
7437     \textcolor{keywordtype}{real(DP)}:: timed
7438 
7439   \textcolor{keywordflow}{continue}
7440     timed = \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}( time )
7441 
7442     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoput}{historyautoput}( &
7443       & timed, varname, array, &  \textcolor{comment}{! (in)}
7444       & err )                                    \textcolor{comment}{! (out) optional}
7445 
\end{DoxyCode}
\mbox{\Hypertarget{historyautoput_8f90_aabbb6234ff1743866ef75f493e2c2da6}\label{historyautoput_8f90_aabbb6234ff1743866ef75f493e2c2da6}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputreal0@{historyautoputreal0}}
\index{historyautoputreal0@{historyautoputreal0}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputreal0()}{historyautoputreal0()}}
{\footnotesize\ttfamily subroutine historyautoputreal0 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, intent(in), target}]{value,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 2409 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
2409     \textcolor{comment}{!}
2410                                         
2411     \textcolor{comment}{!}
2412 
2413     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
2414       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
2415       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
2416       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
2417       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
2418       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
2419       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
2420       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
2421       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
2422     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
2423       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
2424     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
2425     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
2426       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
2427     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
2428       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
2429       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
2430     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
2431     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
2432     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
2433     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
2434       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
2435     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
2436     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
2437       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
2438       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
2439     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
2440     \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}
2441     \textcolor{keywordtype}{implicit none}
2442     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
2443                                         
2444     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
2445                                         
2446     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: value
2447                                         
2448     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
2449                                         
2450 
2451     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
2452                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
2453                               \textcolor{comment}{! Derived type for "gtool\_history" module}
2454 
2455                                         
2456     \textcolor{keywordtype}{real(DP)}:: settime
2457     \textcolor{keywordtype}{integer}:: stat, i
2458     \textcolor{keywordtype}{integer}:: vnum
2459     \textcolor{keywordtype}{character(STRING)}:: cause\_c
2460     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
2461     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutReal0"}
2462   \textcolor{keywordflow}{continue}
2463     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
2464     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
2465     cause\_c = \textcolor{stringliteral}{""}
2466 
2467     \textcolor{comment}{! 初期設定チェック}
2468     \textcolor{comment}{! Check initialization}
2469     \textcolor{comment}{!}
2470     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
2471       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
2472       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
2473       \textcolor{keywordflow}{goto} 999
2474 \textcolor{keywordflow}{    end if}
2475 
2476     \textcolor{comment}{! 時刻に関するエラー処理}
2477     \textcolor{comment}{! Error handling for time}
2478     \textcolor{comment}{!}
2479     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
2480       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
2481       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
2482         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
2483         & c1 = trim( cause\_c ), c2 = trim( varname ) )
2484       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
2485       cause\_c = \textcolor{stringliteral}{'time'}
2486       \textcolor{keywordflow}{goto} 999
2487 \textcolor{keywordflow}{    end if}
2488 
2489     \textcolor{comment}{! 変数 ID のサーチ}
2490     \textcolor{comment}{! Search variable ID}
2491     \textcolor{comment}{!}
2492     varsearch: \textcolor{keywordflow}{do}
2493       \textcolor{keywordflow}{do} i = svnum, numvars
2494         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
2495           vnum = i
2496           \textcolor{keywordflow}{exit} varsearch
2497 \textcolor{keywordflow}{        end if}
2498 \textcolor{keywordflow}{      end do}
2499       \textcolor{keywordflow}{do} i = 1, svnum - 1
2500         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
2501           vnum = i
2502           \textcolor{keywordflow}{exit} varsearch
2503 \textcolor{keywordflow}{        end if}
2504 \textcolor{keywordflow}{      end do}
2505 
2506       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
2507       cause\_c = varname
2508       \textcolor{keywordflow}{goto} 999
2509 \textcolor{keywordflow}{    end do} varsearch
2510 
2511     svnum = vnum
2512 
2513     \textcolor{comment}{! 定義モードからデータモードへ}
2514     \textcolor{comment}{! Transit from define mode to data mode}
2515     \textcolor{comment}{!}
2516     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
2517       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
2518 \textcolor{keywordflow}{    end if}
2519 
2520     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
2521     \textcolor{comment}{! Check output timing and create files}
2522     \textcolor{comment}{!}
2523     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
2524       &        time = time, &    \textcolor{comment}{! (in)}
2525       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
2526 
2527     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
2528     \textcolor{comment}{! Open, close, reopen files}
2529     \textcolor{comment}{!}
2530     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
2531       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
2532       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
2533         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
2534       histaddvar\_vars(vnum) = .true.
2535       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
2536         prev\_outtime\_vars(vnum) = time
2537       \textcolor{keywordflow}{else}
2538         flag\_output\_prev\_vars(vnum) = .true.
2539         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
2540           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
2541         \textcolor{keywordflow}{else}
2542           prev\_outtime\_vars(vnum) = time
2543 \textcolor{keywordflow}{        end if}
2544 \textcolor{keywordflow}{      end if}
2545 \textcolor{keywordflow}{    end if}
2546 
2547     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2548       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
2549         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
2550 \textcolor{keywordflow}{      end if}
2551 \textcolor{keywordflow}{    end if}
2552 
2553     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2554       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
2555         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
2556 \textcolor{keywordflow}{      end if}
2557       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
2558         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
2559       newfile\_createtime\_vars(vnum) = time
2560       prev\_outtime\_vars(vnum) = time
2561 \textcolor{keywordflow}{    end if}
2562 
2563     \textcolor{comment}{! 出力が有効かどうかを確認する}
2564     \textcolor{comment}{! Confirm whether the output is effective}
2565     \textcolor{comment}{!}
2566     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
2567       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2568 
2569       \textcolor{keywordflow}{goto} 999
2570 \textcolor{keywordflow}{    end if}
2571 
2572     \textcolor{comment}{! GT\_HISTORY 変数の取得}
2573     \textcolor{comment}{! Get "GT\_HISTORY" variable}
2574     \textcolor{comment}{!}
2575     gthist => gthst\_history\_vars(vnum) % gthist
2576 
2577 
2578     \textcolor{comment}{! 空間切り出し}
2579     \textcolor{comment}{! Slice of spaces}
2580     \textcolor{comment}{!}
2581                         \textcolor{comment}{! array only}
2582                     
2583 
2584 
2585     \textcolor{comment}{! 空間平均}
2586     \textcolor{comment}{! Spatial average}
2587     \textcolor{comment}{!}
2588                         \textcolor{comment}{! array only}
2589                     
2590 
2591     \textcolor{comment}{! 単位に応じて時刻を変換}
2592     \textcolor{comment}{! Convert time according to units}
2593     \textcolor{comment}{!}
2594     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
2595       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2596 
2597       settime = &
2598         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
2599 \textcolor{keywordflow}{    end if}
2600 
2601     \textcolor{comment}{! 時刻設定}
2602     \textcolor{comment}{! Set time}
2603     \textcolor{comment}{!}
2604     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2605       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
2606         & history = gthist, &   \textcolor{comment}{! (in) optional}
2607         & timed = settime )     \textcolor{comment}{! (in) optional}
2608 \textcolor{keywordflow}{    end if}
2609 
2610     \textcolor{comment}{! 出力}
2611     \textcolor{comment}{! OutPut}
2612     \textcolor{comment}{!}
2613     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2614       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
2615         & varname, &              \textcolor{comment}{! (in)}
2616                               & (/\textcolor{keywordtype}{value}/), &            \textcolor{comment}{! (in)}
2617                       
2618         & timed = settime, &      \textcolor{comment}{! (in) optional}
2619         & time\_average\_store = &
2620         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
2621         & history = gthist )                  \textcolor{comment}{! (inout) optional}
2622     \textcolor{keywordflow}{else}
2623       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
2624         & varname, &              \textcolor{comment}{! (in)}
2625                               & (/\textcolor{keywordtype}{value}/), &            \textcolor{comment}{! (in)}
2626                       
2627         & history = gthist )      \textcolor{comment}{! (inout) optional}
2628 \textcolor{keywordflow}{    end if}
2629 
2630     \textcolor{comment}{! 最後に出力した時刻を保存}
2631     \textcolor{comment}{! Save last time of output}
2632     \textcolor{comment}{!}
2633     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2634       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
2635         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2636 
2637         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
2638           prev\_outtime\_vars(vnum) = time
2639         \textcolor{keywordflow}{else}
2640           prev\_outtime\_vars(vnum) = &
2641             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
2642 \textcolor{keywordflow}{        end if}
2643 \textcolor{keywordflow}{      end if}
2644 \textcolor{keywordflow}{    end if}
2645 
2646     \textcolor{comment}{! 結合解除}
2647     \textcolor{comment}{! Release associations}
2648     \textcolor{comment}{!}
2649     \textcolor{keyword}{nullify}( gthist )
2650                                         
2651 
2652 999 \textcolor{keywordflow}{continue}
2653     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
2654     \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]{historyautoput_8f90_aabbb6234ff1743866ef75f493e2c2da6_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_abae3dd75159a122c0fb260997cfce991}\label{historyautoput_8f90_abae3dd75159a122c0fb260997cfce991}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputreal1@{historyautoputreal1}}
\index{historyautoputreal1@{historyautoputreal1}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputreal1()}{historyautoputreal1()}}
{\footnotesize\ttfamily subroutine historyautoputreal1 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 2662 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
2662     \textcolor{comment}{!}
2663                     
2664     \textcolor{comment}{!}
2665 
2666     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
2667       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
2668       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
2669       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
2670       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
2671       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
2672       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
2673       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
2674       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
2675     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
2676       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
2677     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
2678     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
2679       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
2680     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
2681       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
2682       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
2683     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
2684     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
2685     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
2686     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
2687       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
2688     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
2689     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
2690       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
2691       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
2692     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
2693     \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}
2694     \textcolor{keywordtype}{implicit none}
2695     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
2696                     
2697     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
2698                     
2699     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:)
2700                     
2701     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
2702                     
2703 
2704     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
2705                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
2706                               \textcolor{comment}{! Derived type for "gtool\_history" module}
2707 
2708                         \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_slice(:) =>null()
2709     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
2710     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_avr(:) =>null()
2711                     
2712     \textcolor{keywordtype}{real(DP)}:: settime
2713     \textcolor{keywordtype}{integer}:: stat, i
2714     \textcolor{keywordtype}{integer}:: vnum
2715     \textcolor{keywordtype}{character(STRING)}:: cause\_c
2716     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
2717     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutReal1"}
2718   \textcolor{keywordflow}{continue}
2719     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
2720     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
2721     cause\_c = \textcolor{stringliteral}{""}
2722 
2723     \textcolor{comment}{! 初期設定チェック}
2724     \textcolor{comment}{! Check initialization}
2725     \textcolor{comment}{!}
2726     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
2727       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
2728       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
2729       \textcolor{keywordflow}{goto} 999
2730 \textcolor{keywordflow}{    end if}
2731 
2732     \textcolor{comment}{! 時刻に関するエラー処理}
2733     \textcolor{comment}{! Error handling for time}
2734     \textcolor{comment}{!}
2735     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
2736       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
2737       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
2738         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
2739         & c1 = trim( cause\_c ), c2 = trim( varname ) )
2740       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
2741       cause\_c = \textcolor{stringliteral}{'time'}
2742       \textcolor{keywordflow}{goto} 999
2743 \textcolor{keywordflow}{    end if}
2744 
2745     \textcolor{comment}{! 変数 ID のサーチ}
2746     \textcolor{comment}{! Search variable ID}
2747     \textcolor{comment}{!}
2748     varsearch: \textcolor{keywordflow}{do}
2749       \textcolor{keywordflow}{do} i = svnum, numvars
2750         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
2751           vnum = i
2752           \textcolor{keywordflow}{exit} varsearch
2753 \textcolor{keywordflow}{        end if}
2754 \textcolor{keywordflow}{      end do}
2755       \textcolor{keywordflow}{do} i = 1, svnum - 1
2756         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
2757           vnum = i
2758           \textcolor{keywordflow}{exit} varsearch
2759 \textcolor{keywordflow}{        end if}
2760 \textcolor{keywordflow}{      end do}
2761 
2762       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
2763       cause\_c = varname
2764       \textcolor{keywordflow}{goto} 999
2765 \textcolor{keywordflow}{    end do} varsearch
2766 
2767     svnum = vnum
2768 
2769     \textcolor{comment}{! 定義モードからデータモードへ}
2770     \textcolor{comment}{! Transit from define mode to data mode}
2771     \textcolor{comment}{!}
2772     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
2773       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
2774 \textcolor{keywordflow}{    end if}
2775 
2776     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
2777     \textcolor{comment}{! Check output timing and create files}
2778     \textcolor{comment}{!}
2779     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
2780       &        time = time, &    \textcolor{comment}{! (in)}
2781       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
2782 
2783     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
2784     \textcolor{comment}{! Open, close, reopen files}
2785     \textcolor{comment}{!}
2786     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
2787       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
2788       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
2789         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
2790       histaddvar\_vars(vnum) = .true.
2791       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
2792         prev\_outtime\_vars(vnum) = time
2793       \textcolor{keywordflow}{else}
2794         flag\_output\_prev\_vars(vnum) = .true.
2795         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
2796           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
2797         \textcolor{keywordflow}{else}
2798           prev\_outtime\_vars(vnum) = time
2799 \textcolor{keywordflow}{        end if}
2800 \textcolor{keywordflow}{      end if}
2801 \textcolor{keywordflow}{    end if}
2802 
2803     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2804       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
2805         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
2806 \textcolor{keywordflow}{      end if}
2807 \textcolor{keywordflow}{    end if}
2808 
2809     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2810       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
2811         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
2812 \textcolor{keywordflow}{      end if}
2813       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
2814         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
2815       newfile\_createtime\_vars(vnum) = time
2816       prev\_outtime\_vars(vnum) = time
2817 \textcolor{keywordflow}{    end if}
2818 
2819     \textcolor{comment}{! 出力が有効かどうかを確認する}
2820     \textcolor{comment}{! Confirm whether the output is effective}
2821     \textcolor{comment}{!}
2822     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
2823       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2824 
2825       \textcolor{keywordflow}{goto} 999
2826 \textcolor{keywordflow}{    end if}
2827 
2828     \textcolor{comment}{! GT\_HISTORY 変数の取得}
2829     \textcolor{comment}{! Get "GT\_HISTORY" variable}
2830     \textcolor{comment}{!}
2831     gthist => gthst\_history\_vars(vnum) % gthist
2832 
2833 
2834     \textcolor{comment}{! 空間切り出し}
2835     \textcolor{comment}{! Slice of spaces}
2836     \textcolor{comment}{!}
2837                         sv => slice\_vars(vnum)
2838 
2839                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
2840                       
2841 
2842     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
2843                       
2844       & )
2845                     
2846 
2847 
2848     \textcolor{comment}{! 空間平均}
2849     \textcolor{comment}{! Spatial average}
2850     \textcolor{comment}{!}
2851                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
2852       array\_avr => array\_slice
2853     \textcolor{keywordflow}{else}
2854       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
2855         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
2856                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
2857                       
2858         & array\_avr )                       \textcolor{comment}{! (out)}
2859 \textcolor{keywordflow}{    end if}
2860 
2861     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
2862 
2863                     
2864 
2865     \textcolor{comment}{! 単位に応じて時刻を変換}
2866     \textcolor{comment}{! Convert time according to units}
2867     \textcolor{comment}{!}
2868     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
2869       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2870 
2871       settime = &
2872         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
2873 \textcolor{keywordflow}{    end if}
2874 
2875     \textcolor{comment}{! 時刻設定}
2876     \textcolor{comment}{! Set time}
2877     \textcolor{comment}{!}
2878     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2879       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
2880         & history = gthist, &   \textcolor{comment}{! (in) optional}
2881         & timed = settime )     \textcolor{comment}{! (in) optional}
2882 \textcolor{keywordflow}{    end if}
2883 
2884     \textcolor{comment}{! 出力}
2885     \textcolor{comment}{! OutPut}
2886     \textcolor{comment}{!}
2887     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2888       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
2889         & varname, &              \textcolor{comment}{! (in)}
2890                               & array\_avr, &            \textcolor{comment}{! (in)}
2891                       
2892         & timed = settime, &      \textcolor{comment}{! (in) optional}
2893         & time\_average\_store = &
2894         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
2895         & history = gthist )                  \textcolor{comment}{! (inout) optional}
2896     \textcolor{keywordflow}{else}
2897       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
2898         & varname, &              \textcolor{comment}{! (in)}
2899                               & array\_avr, &            \textcolor{comment}{! (in)}
2900                       
2901         & history = gthist )      \textcolor{comment}{! (inout) optional}
2902 \textcolor{keywordflow}{    end if}
2903 
2904     \textcolor{comment}{! 最後に出力した時刻を保存}
2905     \textcolor{comment}{! Save last time of output}
2906     \textcolor{comment}{!}
2907     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2908       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
2909         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
2910 
2911         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
2912           prev\_outtime\_vars(vnum) = time
2913         \textcolor{keywordflow}{else}
2914           prev\_outtime\_vars(vnum) = &
2915             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
2916 \textcolor{keywordflow}{        end if}
2917 \textcolor{keywordflow}{      end if}
2918 \textcolor{keywordflow}{    end if}
2919 
2920     \textcolor{comment}{! 結合解除}
2921     \textcolor{comment}{! Release associations}
2922     \textcolor{comment}{!}
2923     \textcolor{keyword}{nullify}( gthist )
2924                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
2925                     
2926 
2927 999 \textcolor{keywordflow}{continue}
2928     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
2929     \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]{historyautoput_8f90_abae3dd75159a122c0fb260997cfce991_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a4f870f56a424e6132399d7c3b2404f6e}\label{historyautoput_8f90_a4f870f56a424e6132399d7c3b2404f6e}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputreal2@{historyautoputreal2}}
\index{historyautoputreal2@{historyautoputreal2}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputreal2()}{historyautoputreal2()}}
{\footnotesize\ttfamily subroutine historyautoputreal2 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 2937 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
2937     \textcolor{comment}{!}
2938                     
2939     \textcolor{comment}{!}
2940 
2941     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
2942       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
2943       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
2944       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
2945       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
2946       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
2947       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
2948       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
2949       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
2950     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
2951       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
2952     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
2953     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
2954       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
2955     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
2956       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
2957       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
2958     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
2959     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
2960     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
2961     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
2962       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
2963     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
2964     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
2965       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
2966       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
2967     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
2968     \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}
2969     \textcolor{keywordtype}{implicit none}
2970     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
2971                     
2972     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
2973                     
2974     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:)
2975                     
2976     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
2977                     
2978 
2979     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
2980                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
2981                               \textcolor{comment}{! Derived type for "gtool\_history" module}
2982 
2983                         \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:) =>null()
2984     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
2985     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:) =>null()
2986                     
2987     \textcolor{keywordtype}{real(DP)}:: settime
2988     \textcolor{keywordtype}{integer}:: stat, i
2989     \textcolor{keywordtype}{integer}:: vnum
2990     \textcolor{keywordtype}{character(STRING)}:: cause\_c
2991     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
2992     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutReal2"}
2993   \textcolor{keywordflow}{continue}
2994     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
2995     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
2996     cause\_c = \textcolor{stringliteral}{""}
2997 
2998     \textcolor{comment}{! 初期設定チェック}
2999     \textcolor{comment}{! Check initialization}
3000     \textcolor{comment}{!}
3001     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
3002       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
3003       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
3004       \textcolor{keywordflow}{goto} 999
3005 \textcolor{keywordflow}{    end if}
3006 
3007     \textcolor{comment}{! 時刻に関するエラー処理}
3008     \textcolor{comment}{! Error handling for time}
3009     \textcolor{comment}{!}
3010     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
3011       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
3012       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
3013         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
3014         & c1 = trim( cause\_c ), c2 = trim( varname ) )
3015       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
3016       cause\_c = \textcolor{stringliteral}{'time'}
3017       \textcolor{keywordflow}{goto} 999
3018 \textcolor{keywordflow}{    end if}
3019 
3020     \textcolor{comment}{! 変数 ID のサーチ}
3021     \textcolor{comment}{! Search variable ID}
3022     \textcolor{comment}{!}
3023     varsearch: \textcolor{keywordflow}{do}
3024       \textcolor{keywordflow}{do} i = svnum, numvars
3025         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
3026           vnum = i
3027           \textcolor{keywordflow}{exit} varsearch
3028 \textcolor{keywordflow}{        end if}
3029 \textcolor{keywordflow}{      end do}
3030       \textcolor{keywordflow}{do} i = 1, svnum - 1
3031         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
3032           vnum = i
3033           \textcolor{keywordflow}{exit} varsearch
3034 \textcolor{keywordflow}{        end if}
3035 \textcolor{keywordflow}{      end do}
3036 
3037       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
3038       cause\_c = varname
3039       \textcolor{keywordflow}{goto} 999
3040 \textcolor{keywordflow}{    end do} varsearch
3041 
3042     svnum = vnum
3043 
3044     \textcolor{comment}{! 定義モードからデータモードへ}
3045     \textcolor{comment}{! Transit from define mode to data mode}
3046     \textcolor{comment}{!}
3047     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
3048       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
3049 \textcolor{keywordflow}{    end if}
3050 
3051     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
3052     \textcolor{comment}{! Check output timing and create files}
3053     \textcolor{comment}{!}
3054     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
3055       &        time = time, &    \textcolor{comment}{! (in)}
3056       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
3057 
3058     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
3059     \textcolor{comment}{! Open, close, reopen files}
3060     \textcolor{comment}{!}
3061     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
3062       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
3063       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
3064         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
3065       histaddvar\_vars(vnum) = .true.
3066       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
3067         prev\_outtime\_vars(vnum) = time
3068       \textcolor{keywordflow}{else}
3069         flag\_output\_prev\_vars(vnum) = .true.
3070         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
3071           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
3072         \textcolor{keywordflow}{else}
3073           prev\_outtime\_vars(vnum) = time
3074 \textcolor{keywordflow}{        end if}
3075 \textcolor{keywordflow}{      end if}
3076 \textcolor{keywordflow}{    end if}
3077 
3078     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3079       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
3080         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
3081 \textcolor{keywordflow}{      end if}
3082 \textcolor{keywordflow}{    end if}
3083 
3084     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3085       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
3086         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
3087 \textcolor{keywordflow}{      end if}
3088       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
3089         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
3090       newfile\_createtime\_vars(vnum) = time
3091       prev\_outtime\_vars(vnum) = time
3092 \textcolor{keywordflow}{    end if}
3093 
3094     \textcolor{comment}{! 出力が有効かどうかを確認する}
3095     \textcolor{comment}{! Confirm whether the output is effective}
3096     \textcolor{comment}{!}
3097     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
3098       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3099 
3100       \textcolor{keywordflow}{goto} 999
3101 \textcolor{keywordflow}{    end if}
3102 
3103     \textcolor{comment}{! GT\_HISTORY 変数の取得}
3104     \textcolor{comment}{! Get "GT\_HISTORY" variable}
3105     \textcolor{comment}{!}
3106     gthist => gthst\_history\_vars(vnum) % gthist
3107 
3108 
3109     \textcolor{comment}{! 空間切り出し}
3110     \textcolor{comment}{! Slice of spaces}
3111     \textcolor{comment}{!}
3112                         sv => slice\_vars(vnum)
3113 
3114                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
3115                       
3116 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
3117                       
3118 
3119     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
3120                             & , sv%st(2):sv%ed(2):sv%sd(2) &
3121                       
3122       & )
3123                     
3124 
3125 
3126     \textcolor{comment}{! 空間平均}
3127     \textcolor{comment}{! Spatial average}
3128     \textcolor{comment}{!}
3129                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
3130       array\_avr => array\_slice
3131     \textcolor{keywordflow}{else}
3132       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
3133         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
3134                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
3135                       
3136         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
3137                       
3138         & array\_avr )                       \textcolor{comment}{! (out)}
3139 \textcolor{keywordflow}{    end if}
3140 
3141     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
3142 
3143                     
3144 
3145     \textcolor{comment}{! 単位に応じて時刻を変換}
3146     \textcolor{comment}{! Convert time according to units}
3147     \textcolor{comment}{!}
3148     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
3149       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3150 
3151       settime = &
3152         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
3153 \textcolor{keywordflow}{    end if}
3154 
3155     \textcolor{comment}{! 時刻設定}
3156     \textcolor{comment}{! Set time}
3157     \textcolor{comment}{!}
3158     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3159       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
3160         & history = gthist, &   \textcolor{comment}{! (in) optional}
3161         & timed = settime )     \textcolor{comment}{! (in) optional}
3162 \textcolor{keywordflow}{    end if}
3163 
3164     \textcolor{comment}{! 出力}
3165     \textcolor{comment}{! OutPut}
3166     \textcolor{comment}{!}
3167     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3168       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
3169         & varname, &              \textcolor{comment}{! (in)}
3170                               & array\_avr, &            \textcolor{comment}{! (in)}
3171                       
3172         & timed = settime, &      \textcolor{comment}{! (in) optional}
3173         & time\_average\_store = &
3174         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
3175         & history = gthist )                  \textcolor{comment}{! (inout) optional}
3176     \textcolor{keywordflow}{else}
3177       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
3178         & varname, &              \textcolor{comment}{! (in)}
3179                               & array\_avr, &            \textcolor{comment}{! (in)}
3180                       
3181         & history = gthist )      \textcolor{comment}{! (inout) optional}
3182 \textcolor{keywordflow}{    end if}
3183 
3184     \textcolor{comment}{! 最後に出力した時刻を保存}
3185     \textcolor{comment}{! Save last time of output}
3186     \textcolor{comment}{!}
3187     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3188       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
3189         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3190 
3191         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
3192           prev\_outtime\_vars(vnum) = time
3193         \textcolor{keywordflow}{else}
3194           prev\_outtime\_vars(vnum) = &
3195             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
3196 \textcolor{keywordflow}{        end if}
3197 \textcolor{keywordflow}{      end if}
3198 \textcolor{keywordflow}{    end if}
3199 
3200     \textcolor{comment}{! 結合解除}
3201     \textcolor{comment}{! Release associations}
3202     \textcolor{comment}{!}
3203     \textcolor{keyword}{nullify}( gthist )
3204                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
3205                     
3206 
3207 999 \textcolor{keywordflow}{continue}
3208     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
3209     \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]{historyautoput_8f90_a4f870f56a424e6132399d7c3b2404f6e_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a1bd703580c0481ff9a2d0a2589f97d79}\label{historyautoput_8f90_a1bd703580c0481ff9a2d0a2589f97d79}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputreal3@{historyautoputreal3}}
\index{historyautoputreal3@{historyautoputreal3}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputreal3()}{historyautoputreal3()}}
{\footnotesize\ttfamily subroutine historyautoputreal3 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 3217 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
3217     \textcolor{comment}{!}
3218                     
3219     \textcolor{comment}{!}
3220 
3221     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
3222       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
3223       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
3224       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
3225       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
3226       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
3227       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
3228       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
3229       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
3230     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
3231       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
3232     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
3233     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
3234       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
3235     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
3236       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
3237       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
3238     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
3239     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
3240     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
3241     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
3242       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
3243     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
3244     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
3245       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
3246       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
3247     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
3248     \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}
3249     \textcolor{keywordtype}{implicit none}
3250     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
3251                     
3252     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
3253                     
3254     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:)
3255                     
3256     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
3257                     
3258 
3259     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
3260                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
3261                               \textcolor{comment}{! Derived type for "gtool\_history" module}
3262 
3263                         \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:) =>null()
3264     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
3265     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:) =>null()
3266                     
3267     \textcolor{keywordtype}{real(DP)}:: settime
3268     \textcolor{keywordtype}{integer}:: stat, i
3269     \textcolor{keywordtype}{integer}:: vnum
3270     \textcolor{keywordtype}{character(STRING)}:: cause\_c
3271     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
3272     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutReal3"}
3273   \textcolor{keywordflow}{continue}
3274     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
3275     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
3276     cause\_c = \textcolor{stringliteral}{""}
3277 
3278     \textcolor{comment}{! 初期設定チェック}
3279     \textcolor{comment}{! Check initialization}
3280     \textcolor{comment}{!}
3281     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
3282       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
3283       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
3284       \textcolor{keywordflow}{goto} 999
3285 \textcolor{keywordflow}{    end if}
3286 
3287     \textcolor{comment}{! 時刻に関するエラー処理}
3288     \textcolor{comment}{! Error handling for time}
3289     \textcolor{comment}{!}
3290     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
3291       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
3292       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
3293         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
3294         & c1 = trim( cause\_c ), c2 = trim( varname ) )
3295       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
3296       cause\_c = \textcolor{stringliteral}{'time'}
3297       \textcolor{keywordflow}{goto} 999
3298 \textcolor{keywordflow}{    end if}
3299 
3300     \textcolor{comment}{! 変数 ID のサーチ}
3301     \textcolor{comment}{! Search variable ID}
3302     \textcolor{comment}{!}
3303     varsearch: \textcolor{keywordflow}{do}
3304       \textcolor{keywordflow}{do} i = svnum, numvars
3305         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
3306           vnum = i
3307           \textcolor{keywordflow}{exit} varsearch
3308 \textcolor{keywordflow}{        end if}
3309 \textcolor{keywordflow}{      end do}
3310       \textcolor{keywordflow}{do} i = 1, svnum - 1
3311         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
3312           vnum = i
3313           \textcolor{keywordflow}{exit} varsearch
3314 \textcolor{keywordflow}{        end if}
3315 \textcolor{keywordflow}{      end do}
3316 
3317       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
3318       cause\_c = varname
3319       \textcolor{keywordflow}{goto} 999
3320 \textcolor{keywordflow}{    end do} varsearch
3321 
3322     svnum = vnum
3323 
3324     \textcolor{comment}{! 定義モードからデータモードへ}
3325     \textcolor{comment}{! Transit from define mode to data mode}
3326     \textcolor{comment}{!}
3327     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
3328       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
3329 \textcolor{keywordflow}{    end if}
3330 
3331     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
3332     \textcolor{comment}{! Check output timing and create files}
3333     \textcolor{comment}{!}
3334     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
3335       &        time = time, &    \textcolor{comment}{! (in)}
3336       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
3337 
3338     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
3339     \textcolor{comment}{! Open, close, reopen files}
3340     \textcolor{comment}{!}
3341     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
3342       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
3343       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
3344         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
3345       histaddvar\_vars(vnum) = .true.
3346       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
3347         prev\_outtime\_vars(vnum) = time
3348       \textcolor{keywordflow}{else}
3349         flag\_output\_prev\_vars(vnum) = .true.
3350         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
3351           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
3352         \textcolor{keywordflow}{else}
3353           prev\_outtime\_vars(vnum) = time
3354 \textcolor{keywordflow}{        end if}
3355 \textcolor{keywordflow}{      end if}
3356 \textcolor{keywordflow}{    end if}
3357 
3358     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3359       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
3360         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
3361 \textcolor{keywordflow}{      end if}
3362 \textcolor{keywordflow}{    end if}
3363 
3364     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3365       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
3366         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
3367 \textcolor{keywordflow}{      end if}
3368       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
3369         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
3370       newfile\_createtime\_vars(vnum) = time
3371       prev\_outtime\_vars(vnum) = time
3372 \textcolor{keywordflow}{    end if}
3373 
3374     \textcolor{comment}{! 出力が有効かどうかを確認する}
3375     \textcolor{comment}{! Confirm whether the output is effective}
3376     \textcolor{comment}{!}
3377     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
3378       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3379 
3380       \textcolor{keywordflow}{goto} 999
3381 \textcolor{keywordflow}{    end if}
3382 
3383     \textcolor{comment}{! GT\_HISTORY 変数の取得}
3384     \textcolor{comment}{! Get "GT\_HISTORY" variable}
3385     \textcolor{comment}{!}
3386     gthist => gthst\_history\_vars(vnum) % gthist
3387 
3388 
3389     \textcolor{comment}{! 空間切り出し}
3390     \textcolor{comment}{! Slice of spaces}
3391     \textcolor{comment}{!}
3392                         sv => slice\_vars(vnum)
3393 
3394                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
3395                       
3396 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
3397                       
3398 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
3399                       
3400 
3401     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
3402                             & , sv%st(2):sv%ed(2):sv%sd(2) &
3403                       
3404       & , sv%st(3):sv%ed(3):sv%sd(3) &
3405                       
3406       & )
3407                     
3408 
3409 
3410     \textcolor{comment}{! 空間平均}
3411     \textcolor{comment}{! Spatial average}
3412     \textcolor{comment}{!}
3413                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
3414       array\_avr => array\_slice
3415     \textcolor{keywordflow}{else}
3416       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
3417         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
3418                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
3419                       
3420         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
3421                       
3422         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
3423                       
3424         & array\_avr )                       \textcolor{comment}{! (out)}
3425 \textcolor{keywordflow}{    end if}
3426 
3427     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
3428 
3429                     
3430 
3431     \textcolor{comment}{! 単位に応じて時刻を変換}
3432     \textcolor{comment}{! Convert time according to units}
3433     \textcolor{comment}{!}
3434     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
3435       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3436 
3437       settime = &
3438         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
3439 \textcolor{keywordflow}{    end if}
3440 
3441     \textcolor{comment}{! 時刻設定}
3442     \textcolor{comment}{! Set time}
3443     \textcolor{comment}{!}
3444     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3445       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
3446         & history = gthist, &   \textcolor{comment}{! (in) optional}
3447         & timed = settime )     \textcolor{comment}{! (in) optional}
3448 \textcolor{keywordflow}{    end if}
3449 
3450     \textcolor{comment}{! 出力}
3451     \textcolor{comment}{! OutPut}
3452     \textcolor{comment}{!}
3453     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3454       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
3455         & varname, &              \textcolor{comment}{! (in)}
3456                               & array\_avr, &            \textcolor{comment}{! (in)}
3457                       
3458         & timed = settime, &      \textcolor{comment}{! (in) optional}
3459         & time\_average\_store = &
3460         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
3461         & history = gthist )                  \textcolor{comment}{! (inout) optional}
3462     \textcolor{keywordflow}{else}
3463       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
3464         & varname, &              \textcolor{comment}{! (in)}
3465                               & array\_avr, &            \textcolor{comment}{! (in)}
3466                       
3467         & history = gthist )      \textcolor{comment}{! (inout) optional}
3468 \textcolor{keywordflow}{    end if}
3469 
3470     \textcolor{comment}{! 最後に出力した時刻を保存}
3471     \textcolor{comment}{! Save last time of output}
3472     \textcolor{comment}{!}
3473     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3474       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
3475         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3476 
3477         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
3478           prev\_outtime\_vars(vnum) = time
3479         \textcolor{keywordflow}{else}
3480           prev\_outtime\_vars(vnum) = &
3481             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
3482 \textcolor{keywordflow}{        end if}
3483 \textcolor{keywordflow}{      end if}
3484 \textcolor{keywordflow}{    end if}
3485 
3486     \textcolor{comment}{! 結合解除}
3487     \textcolor{comment}{! Release associations}
3488     \textcolor{comment}{!}
3489     \textcolor{keyword}{nullify}( gthist )
3490                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
3491                     
3492 
3493 999 \textcolor{keywordflow}{continue}
3494     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
3495     \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]{historyautoput_8f90_a1bd703580c0481ff9a2d0a2589f97d79_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a7af56d3a6950be00440df401f19a02c1}\label{historyautoput_8f90_a7af56d3a6950be00440df401f19a02c1}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputreal4@{historyautoputreal4}}
\index{historyautoputreal4@{historyautoputreal4}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputreal4()}{historyautoputreal4()}}
{\footnotesize\ttfamily subroutine historyautoputreal4 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 3503 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
3503     \textcolor{comment}{!}
3504                     
3505     \textcolor{comment}{!}
3506 
3507     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
3508       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
3509       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
3510       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
3511       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
3512       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
3513       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
3514       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
3515       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
3516     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
3517       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
3518     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
3519     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
3520       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
3521     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
3522       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
3523       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
3524     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
3525     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
3526     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
3527     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
3528       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
3529     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
3530     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
3531       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
3532       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
3533     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
3534     \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}
3535     \textcolor{keywordtype}{implicit none}
3536     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
3537                     
3538     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
3539                     
3540     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:)
3541                     
3542     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
3543                     
3544 
3545     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
3546                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
3547                               \textcolor{comment}{! Derived type for "gtool\_history" module}
3548 
3549                         \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:) =>null()
3550     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
3551     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:) =>null()
3552                     
3553     \textcolor{keywordtype}{real(DP)}:: settime
3554     \textcolor{keywordtype}{integer}:: stat, i
3555     \textcolor{keywordtype}{integer}:: vnum
3556     \textcolor{keywordtype}{character(STRING)}:: cause\_c
3557     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
3558     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutReal4"}
3559   \textcolor{keywordflow}{continue}
3560     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
3561     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
3562     cause\_c = \textcolor{stringliteral}{""}
3563 
3564     \textcolor{comment}{! 初期設定チェック}
3565     \textcolor{comment}{! Check initialization}
3566     \textcolor{comment}{!}
3567     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
3568       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
3569       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
3570       \textcolor{keywordflow}{goto} 999
3571 \textcolor{keywordflow}{    end if}
3572 
3573     \textcolor{comment}{! 時刻に関するエラー処理}
3574     \textcolor{comment}{! Error handling for time}
3575     \textcolor{comment}{!}
3576     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
3577       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
3578       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
3579         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
3580         & c1 = trim( cause\_c ), c2 = trim( varname ) )
3581       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
3582       cause\_c = \textcolor{stringliteral}{'time'}
3583       \textcolor{keywordflow}{goto} 999
3584 \textcolor{keywordflow}{    end if}
3585 
3586     \textcolor{comment}{! 変数 ID のサーチ}
3587     \textcolor{comment}{! Search variable ID}
3588     \textcolor{comment}{!}
3589     varsearch: \textcolor{keywordflow}{do}
3590       \textcolor{keywordflow}{do} i = svnum, numvars
3591         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
3592           vnum = i
3593           \textcolor{keywordflow}{exit} varsearch
3594 \textcolor{keywordflow}{        end if}
3595 \textcolor{keywordflow}{      end do}
3596       \textcolor{keywordflow}{do} i = 1, svnum - 1
3597         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
3598           vnum = i
3599           \textcolor{keywordflow}{exit} varsearch
3600 \textcolor{keywordflow}{        end if}
3601 \textcolor{keywordflow}{      end do}
3602 
3603       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
3604       cause\_c = varname
3605       \textcolor{keywordflow}{goto} 999
3606 \textcolor{keywordflow}{    end do} varsearch
3607 
3608     svnum = vnum
3609 
3610     \textcolor{comment}{! 定義モードからデータモードへ}
3611     \textcolor{comment}{! Transit from define mode to data mode}
3612     \textcolor{comment}{!}
3613     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
3614       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
3615 \textcolor{keywordflow}{    end if}
3616 
3617     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
3618     \textcolor{comment}{! Check output timing and create files}
3619     \textcolor{comment}{!}
3620     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
3621       &        time = time, &    \textcolor{comment}{! (in)}
3622       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
3623 
3624     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
3625     \textcolor{comment}{! Open, close, reopen files}
3626     \textcolor{comment}{!}
3627     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
3628       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
3629       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
3630         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
3631       histaddvar\_vars(vnum) = .true.
3632       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
3633         prev\_outtime\_vars(vnum) = time
3634       \textcolor{keywordflow}{else}
3635         flag\_output\_prev\_vars(vnum) = .true.
3636         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
3637           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
3638         \textcolor{keywordflow}{else}
3639           prev\_outtime\_vars(vnum) = time
3640 \textcolor{keywordflow}{        end if}
3641 \textcolor{keywordflow}{      end if}
3642 \textcolor{keywordflow}{    end if}
3643 
3644     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3645       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
3646         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
3647 \textcolor{keywordflow}{      end if}
3648 \textcolor{keywordflow}{    end if}
3649 
3650     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3651       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
3652         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
3653 \textcolor{keywordflow}{      end if}
3654       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
3655         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
3656       newfile\_createtime\_vars(vnum) = time
3657       prev\_outtime\_vars(vnum) = time
3658 \textcolor{keywordflow}{    end if}
3659 
3660     \textcolor{comment}{! 出力が有効かどうかを確認する}
3661     \textcolor{comment}{! Confirm whether the output is effective}
3662     \textcolor{comment}{!}
3663     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
3664       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3665 
3666       \textcolor{keywordflow}{goto} 999
3667 \textcolor{keywordflow}{    end if}
3668 
3669     \textcolor{comment}{! GT\_HISTORY 変数の取得}
3670     \textcolor{comment}{! Get "GT\_HISTORY" variable}
3671     \textcolor{comment}{!}
3672     gthist => gthst\_history\_vars(vnum) % gthist
3673 
3674 
3675     \textcolor{comment}{! 空間切り出し}
3676     \textcolor{comment}{! Slice of spaces}
3677     \textcolor{comment}{!}
3678                         sv => slice\_vars(vnum)
3679 
3680                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
3681                       
3682 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
3683                       
3684 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
3685                       
3686 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
3687                       
3688 
3689     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
3690                             & , sv%st(2):sv%ed(2):sv%sd(2) &
3691                       
3692       & , sv%st(3):sv%ed(3):sv%sd(3) &
3693                       
3694       & , sv%st(4):sv%ed(4):sv%sd(4) &
3695                       
3696       & )
3697                     
3698 
3699 
3700     \textcolor{comment}{! 空間平均}
3701     \textcolor{comment}{! Spatial average}
3702     \textcolor{comment}{!}
3703                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
3704       array\_avr => array\_slice
3705     \textcolor{keywordflow}{else}
3706       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
3707         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
3708                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
3709                       
3710         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
3711                       
3712         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
3713                       
3714         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
3715                       
3716         & array\_avr )                       \textcolor{comment}{! (out)}
3717 \textcolor{keywordflow}{    end if}
3718 
3719     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
3720 
3721                     
3722 
3723     \textcolor{comment}{! 単位に応じて時刻を変換}
3724     \textcolor{comment}{! Convert time according to units}
3725     \textcolor{comment}{!}
3726     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
3727       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3728 
3729       settime = &
3730         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
3731 \textcolor{keywordflow}{    end if}
3732 
3733     \textcolor{comment}{! 時刻設定}
3734     \textcolor{comment}{! Set time}
3735     \textcolor{comment}{!}
3736     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3737       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
3738         & history = gthist, &   \textcolor{comment}{! (in) optional}
3739         & timed = settime )     \textcolor{comment}{! (in) optional}
3740 \textcolor{keywordflow}{    end if}
3741 
3742     \textcolor{comment}{! 出力}
3743     \textcolor{comment}{! OutPut}
3744     \textcolor{comment}{!}
3745     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3746       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
3747         & varname, &              \textcolor{comment}{! (in)}
3748                               & array\_avr, &            \textcolor{comment}{! (in)}
3749                       
3750         & timed = settime, &      \textcolor{comment}{! (in) optional}
3751         & time\_average\_store = &
3752         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
3753         & history = gthist )                  \textcolor{comment}{! (inout) optional}
3754     \textcolor{keywordflow}{else}
3755       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
3756         & varname, &              \textcolor{comment}{! (in)}
3757                               & array\_avr, &            \textcolor{comment}{! (in)}
3758                       
3759         & history = gthist )      \textcolor{comment}{! (inout) optional}
3760 \textcolor{keywordflow}{    end if}
3761 
3762     \textcolor{comment}{! 最後に出力した時刻を保存}
3763     \textcolor{comment}{! Save last time of output}
3764     \textcolor{comment}{!}
3765     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3766       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
3767         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3768 
3769         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
3770           prev\_outtime\_vars(vnum) = time
3771         \textcolor{keywordflow}{else}
3772           prev\_outtime\_vars(vnum) = &
3773             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
3774 \textcolor{keywordflow}{        end if}
3775 \textcolor{keywordflow}{      end if}
3776 \textcolor{keywordflow}{    end if}
3777 
3778     \textcolor{comment}{! 結合解除}
3779     \textcolor{comment}{! Release associations}
3780     \textcolor{comment}{!}
3781     \textcolor{keyword}{nullify}( gthist )
3782                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
3783                     
3784 
3785 999 \textcolor{keywordflow}{continue}
3786     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
3787     \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]{historyautoput_8f90_a7af56d3a6950be00440df401f19a02c1_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_ae00f103ebcaf1dabe78534593981757e}\label{historyautoput_8f90_ae00f103ebcaf1dabe78534593981757e}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputreal5@{historyautoputreal5}}
\index{historyautoputreal5@{historyautoputreal5}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputreal5()}{historyautoputreal5()}}
{\footnotesize\ttfamily subroutine historyautoputreal5 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 3795 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
3795     \textcolor{comment}{!}
3796                     
3797     \textcolor{comment}{!}
3798 
3799     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
3800       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
3801       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
3802       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
3803       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
3804       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
3805       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
3806       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
3807       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
3808     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
3809       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
3810     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
3811     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
3812       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
3813     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
3814       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
3815       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
3816     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
3817     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
3818     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
3819     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
3820       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
3821     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
3822     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
3823       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
3824       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
3825     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
3826     \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}
3827     \textcolor{keywordtype}{implicit none}
3828     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
3829                     
3830     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
3831                     
3832     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:)
3833                     
3834     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
3835                     
3836 
3837     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
3838                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
3839                               \textcolor{comment}{! Derived type for "gtool\_history" module}
3840 
3841                         \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:) =>null()
3842     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
3843     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:) =>null()
3844                     
3845     \textcolor{keywordtype}{real(DP)}:: settime
3846     \textcolor{keywordtype}{integer}:: stat, i
3847     \textcolor{keywordtype}{integer}:: vnum
3848     \textcolor{keywordtype}{character(STRING)}:: cause\_c
3849     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
3850     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutReal5"}
3851   \textcolor{keywordflow}{continue}
3852     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
3853     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
3854     cause\_c = \textcolor{stringliteral}{""}
3855 
3856     \textcolor{comment}{! 初期設定チェック}
3857     \textcolor{comment}{! Check initialization}
3858     \textcolor{comment}{!}
3859     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
3860       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
3861       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
3862       \textcolor{keywordflow}{goto} 999
3863 \textcolor{keywordflow}{    end if}
3864 
3865     \textcolor{comment}{! 時刻に関するエラー処理}
3866     \textcolor{comment}{! Error handling for time}
3867     \textcolor{comment}{!}
3868     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
3869       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
3870       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
3871         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
3872         & c1 = trim( cause\_c ), c2 = trim( varname ) )
3873       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
3874       cause\_c = \textcolor{stringliteral}{'time'}
3875       \textcolor{keywordflow}{goto} 999
3876 \textcolor{keywordflow}{    end if}
3877 
3878     \textcolor{comment}{! 変数 ID のサーチ}
3879     \textcolor{comment}{! Search variable ID}
3880     \textcolor{comment}{!}
3881     varsearch: \textcolor{keywordflow}{do}
3882       \textcolor{keywordflow}{do} i = svnum, numvars
3883         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
3884           vnum = i
3885           \textcolor{keywordflow}{exit} varsearch
3886 \textcolor{keywordflow}{        end if}
3887 \textcolor{keywordflow}{      end do}
3888       \textcolor{keywordflow}{do} i = 1, svnum - 1
3889         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
3890           vnum = i
3891           \textcolor{keywordflow}{exit} varsearch
3892 \textcolor{keywordflow}{        end if}
3893 \textcolor{keywordflow}{      end do}
3894 
3895       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
3896       cause\_c = varname
3897       \textcolor{keywordflow}{goto} 999
3898 \textcolor{keywordflow}{    end do} varsearch
3899 
3900     svnum = vnum
3901 
3902     \textcolor{comment}{! 定義モードからデータモードへ}
3903     \textcolor{comment}{! Transit from define mode to data mode}
3904     \textcolor{comment}{!}
3905     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
3906       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
3907 \textcolor{keywordflow}{    end if}
3908 
3909     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
3910     \textcolor{comment}{! Check output timing and create files}
3911     \textcolor{comment}{!}
3912     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
3913       &        time = time, &    \textcolor{comment}{! (in)}
3914       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
3915 
3916     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
3917     \textcolor{comment}{! Open, close, reopen files}
3918     \textcolor{comment}{!}
3919     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
3920       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
3921       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
3922         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
3923       histaddvar\_vars(vnum) = .true.
3924       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
3925         prev\_outtime\_vars(vnum) = time
3926       \textcolor{keywordflow}{else}
3927         flag\_output\_prev\_vars(vnum) = .true.
3928         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
3929           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
3930         \textcolor{keywordflow}{else}
3931           prev\_outtime\_vars(vnum) = time
3932 \textcolor{keywordflow}{        end if}
3933 \textcolor{keywordflow}{      end if}
3934 \textcolor{keywordflow}{    end if}
3935 
3936     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3937       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
3938         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
3939 \textcolor{keywordflow}{      end if}
3940 \textcolor{keywordflow}{    end if}
3941 
3942     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3943       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
3944         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
3945 \textcolor{keywordflow}{      end if}
3946       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
3947         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
3948       newfile\_createtime\_vars(vnum) = time
3949       prev\_outtime\_vars(vnum) = time
3950 \textcolor{keywordflow}{    end if}
3951 
3952     \textcolor{comment}{! 出力が有効かどうかを確認する}
3953     \textcolor{comment}{! Confirm whether the output is effective}
3954     \textcolor{comment}{!}
3955     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
3956       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
3957 
3958       \textcolor{keywordflow}{goto} 999
3959 \textcolor{keywordflow}{    end if}
3960 
3961     \textcolor{comment}{! GT\_HISTORY 変数の取得}
3962     \textcolor{comment}{! Get "GT\_HISTORY" variable}
3963     \textcolor{comment}{!}
3964     gthist => gthst\_history\_vars(vnum) % gthist
3965 
3966 
3967     \textcolor{comment}{! 空間切り出し}
3968     \textcolor{comment}{! Slice of spaces}
3969     \textcolor{comment}{!}
3970                         sv => slice\_vars(vnum)
3971 
3972                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
3973                       
3974 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
3975                       
3976 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
3977                       
3978 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
3979                       
3980 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
3981                       
3982 
3983     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
3984                             & , sv%st(2):sv%ed(2):sv%sd(2) &
3985                       
3986       & , sv%st(3):sv%ed(3):sv%sd(3) &
3987                       
3988       & , sv%st(4):sv%ed(4):sv%sd(4) &
3989                       
3990       & , sv%st(5):sv%ed(5):sv%sd(5) &
3991                       
3992       & )
3993                     
3994 
3995 
3996     \textcolor{comment}{! 空間平均}
3997     \textcolor{comment}{! Spatial average}
3998     \textcolor{comment}{!}
3999                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
4000       array\_avr => array\_slice
4001     \textcolor{keywordflow}{else}
4002       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
4003         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
4004                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
4005                       
4006         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
4007                       
4008         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
4009                       
4010         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
4011                       
4012         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
4013                       
4014         & array\_avr )                       \textcolor{comment}{! (out)}
4015 \textcolor{keywordflow}{    end if}
4016 
4017     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
4018 
4019                     
4020 
4021     \textcolor{comment}{! 単位に応じて時刻を変換}
4022     \textcolor{comment}{! Convert time according to units}
4023     \textcolor{comment}{!}
4024     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
4025       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4026 
4027       settime = &
4028         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
4029 \textcolor{keywordflow}{    end if}
4030 
4031     \textcolor{comment}{! 時刻設定}
4032     \textcolor{comment}{! Set time}
4033     \textcolor{comment}{!}
4034     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4035       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
4036         & history = gthist, &   \textcolor{comment}{! (in) optional}
4037         & timed = settime )     \textcolor{comment}{! (in) optional}
4038 \textcolor{keywordflow}{    end if}
4039 
4040     \textcolor{comment}{! 出力}
4041     \textcolor{comment}{! OutPut}
4042     \textcolor{comment}{!}
4043     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4044       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
4045         & varname, &              \textcolor{comment}{! (in)}
4046                               & array\_avr, &            \textcolor{comment}{! (in)}
4047                       
4048         & timed = settime, &      \textcolor{comment}{! (in) optional}
4049         & time\_average\_store = &
4050         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
4051         & history = gthist )                  \textcolor{comment}{! (inout) optional}
4052     \textcolor{keywordflow}{else}
4053       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
4054         & varname, &              \textcolor{comment}{! (in)}
4055                               & array\_avr, &            \textcolor{comment}{! (in)}
4056                       
4057         & history = gthist )      \textcolor{comment}{! (inout) optional}
4058 \textcolor{keywordflow}{    end if}
4059 
4060     \textcolor{comment}{! 最後に出力した時刻を保存}
4061     \textcolor{comment}{! Save last time of output}
4062     \textcolor{comment}{!}
4063     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4064       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
4065         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4066 
4067         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
4068           prev\_outtime\_vars(vnum) = time
4069         \textcolor{keywordflow}{else}
4070           prev\_outtime\_vars(vnum) = &
4071             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
4072 \textcolor{keywordflow}{        end if}
4073 \textcolor{keywordflow}{      end if}
4074 \textcolor{keywordflow}{    end if}
4075 
4076     \textcolor{comment}{! 結合解除}
4077     \textcolor{comment}{! Release associations}
4078     \textcolor{comment}{!}
4079     \textcolor{keyword}{nullify}( gthist )
4080                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
4081                     
4082 
4083 999 \textcolor{keywordflow}{continue}
4084     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
4085     \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]{historyautoput_8f90_ae00f103ebcaf1dabe78534593981757e_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a26e4ce95f5039a5c9da88dce187b4c9e}\label{historyautoput_8f90_a26e4ce95f5039a5c9da88dce187b4c9e}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputreal6@{historyautoputreal6}}
\index{historyautoputreal6@{historyautoputreal6}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputreal6()}{historyautoputreal6()}}
{\footnotesize\ttfamily subroutine historyautoputreal6 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 4093 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
4093     \textcolor{comment}{!}
4094                     
4095     \textcolor{comment}{!}
4096 
4097     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
4098       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
4099       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
4100       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
4101       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
4102       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
4103       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
4104       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
4105       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
4106     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
4107       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
4108     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
4109     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
4110       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
4111     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
4112       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
4113       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
4114     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
4115     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
4116     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
4117     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
4118       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
4119     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
4120     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
4121       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
4122       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
4123     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
4124     \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}
4125     \textcolor{keywordtype}{implicit none}
4126     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
4127                     
4128     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
4129                     
4130     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:)
4131                     
4132     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
4133                     
4134 
4135     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
4136                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
4137                               \textcolor{comment}{! Derived type for "gtool\_history" module}
4138 
4139                         \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:,:) =>null()
4140     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
4141     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:,:) =>null()
4142                     
4143     \textcolor{keywordtype}{real(DP)}:: settime
4144     \textcolor{keywordtype}{integer}:: stat, i
4145     \textcolor{keywordtype}{integer}:: vnum
4146     \textcolor{keywordtype}{character(STRING)}:: cause\_c
4147     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
4148     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutReal6"}
4149   \textcolor{keywordflow}{continue}
4150     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
4151     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
4152     cause\_c = \textcolor{stringliteral}{""}
4153 
4154     \textcolor{comment}{! 初期設定チェック}
4155     \textcolor{comment}{! Check initialization}
4156     \textcolor{comment}{!}
4157     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
4158       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
4159       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
4160       \textcolor{keywordflow}{goto} 999
4161 \textcolor{keywordflow}{    end if}
4162 
4163     \textcolor{comment}{! 時刻に関するエラー処理}
4164     \textcolor{comment}{! Error handling for time}
4165     \textcolor{comment}{!}
4166     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
4167       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
4168       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
4169         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
4170         & c1 = trim( cause\_c ), c2 = trim( varname ) )
4171       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
4172       cause\_c = \textcolor{stringliteral}{'time'}
4173       \textcolor{keywordflow}{goto} 999
4174 \textcolor{keywordflow}{    end if}
4175 
4176     \textcolor{comment}{! 変数 ID のサーチ}
4177     \textcolor{comment}{! Search variable ID}
4178     \textcolor{comment}{!}
4179     varsearch: \textcolor{keywordflow}{do}
4180       \textcolor{keywordflow}{do} i = svnum, numvars
4181         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
4182           vnum = i
4183           \textcolor{keywordflow}{exit} varsearch
4184 \textcolor{keywordflow}{        end if}
4185 \textcolor{keywordflow}{      end do}
4186       \textcolor{keywordflow}{do} i = 1, svnum - 1
4187         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
4188           vnum = i
4189           \textcolor{keywordflow}{exit} varsearch
4190 \textcolor{keywordflow}{        end if}
4191 \textcolor{keywordflow}{      end do}
4192 
4193       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
4194       cause\_c = varname
4195       \textcolor{keywordflow}{goto} 999
4196 \textcolor{keywordflow}{    end do} varsearch
4197 
4198     svnum = vnum
4199 
4200     \textcolor{comment}{! 定義モードからデータモードへ}
4201     \textcolor{comment}{! Transit from define mode to data mode}
4202     \textcolor{comment}{!}
4203     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
4204       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
4205 \textcolor{keywordflow}{    end if}
4206 
4207     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
4208     \textcolor{comment}{! Check output timing and create files}
4209     \textcolor{comment}{!}
4210     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
4211       &        time = time, &    \textcolor{comment}{! (in)}
4212       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
4213 
4214     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
4215     \textcolor{comment}{! Open, close, reopen files}
4216     \textcolor{comment}{!}
4217     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
4218       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
4219       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
4220         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
4221       histaddvar\_vars(vnum) = .true.
4222       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
4223         prev\_outtime\_vars(vnum) = time
4224       \textcolor{keywordflow}{else}
4225         flag\_output\_prev\_vars(vnum) = .true.
4226         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
4227           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
4228         \textcolor{keywordflow}{else}
4229           prev\_outtime\_vars(vnum) = time
4230 \textcolor{keywordflow}{        end if}
4231 \textcolor{keywordflow}{      end if}
4232 \textcolor{keywordflow}{    end if}
4233 
4234     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4235       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
4236         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
4237 \textcolor{keywordflow}{      end if}
4238 \textcolor{keywordflow}{    end if}
4239 
4240     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4241       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
4242         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
4243 \textcolor{keywordflow}{      end if}
4244       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
4245         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
4246       newfile\_createtime\_vars(vnum) = time
4247       prev\_outtime\_vars(vnum) = time
4248 \textcolor{keywordflow}{    end if}
4249 
4250     \textcolor{comment}{! 出力が有効かどうかを確認する}
4251     \textcolor{comment}{! Confirm whether the output is effective}
4252     \textcolor{comment}{!}
4253     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
4254       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4255 
4256       \textcolor{keywordflow}{goto} 999
4257 \textcolor{keywordflow}{    end if}
4258 
4259     \textcolor{comment}{! GT\_HISTORY 変数の取得}
4260     \textcolor{comment}{! Get "GT\_HISTORY" variable}
4261     \textcolor{comment}{!}
4262     gthist => gthst\_history\_vars(vnum) % gthist
4263 
4264 
4265     \textcolor{comment}{! 空間切り出し}
4266     \textcolor{comment}{! Slice of spaces}
4267     \textcolor{comment}{!}
4268                         sv => slice\_vars(vnum)
4269 
4270                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
4271                       
4272 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
4273                       
4274 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
4275                       
4276 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
4277                       
4278 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
4279                       
4280 \textcolor{comment}{!!$        write(*,*) '  sv%st(6), sv%ed(6), sv%sd(6)=', sv%st(6), sv%ed(6), sv%sd(6)}
4281                       
4282 
4283     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
4284                             & , sv%st(2):sv%ed(2):sv%sd(2) &
4285                       
4286       & , sv%st(3):sv%ed(3):sv%sd(3) &
4287                       
4288       & , sv%st(4):sv%ed(4):sv%sd(4) &
4289                       
4290       & , sv%st(5):sv%ed(5):sv%sd(5) &
4291                       
4292       & , sv%st(6):sv%ed(6):sv%sd(6) &
4293                       
4294       & )
4295                     
4296 
4297 
4298     \textcolor{comment}{! 空間平均}
4299     \textcolor{comment}{! Spatial average}
4300     \textcolor{comment}{!}
4301                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
4302       array\_avr => array\_slice
4303     \textcolor{keywordflow}{else}
4304       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
4305         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
4306                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
4307                       
4308         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
4309                       
4310         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
4311                       
4312         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
4313                       
4314         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
4315                       
4316         & weight\_vars(vnum) % wgt6( sv%st(6):sv%ed(6):sv%sd(6) ) , &   \textcolor{comment}{! (in)}
4317                       
4318         & array\_avr )                       \textcolor{comment}{! (out)}
4319 \textcolor{keywordflow}{    end if}
4320 
4321     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
4322 
4323                     
4324 
4325     \textcolor{comment}{! 単位に応じて時刻を変換}
4326     \textcolor{comment}{! Convert time according to units}
4327     \textcolor{comment}{!}
4328     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
4329       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4330 
4331       settime = &
4332         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
4333 \textcolor{keywordflow}{    end if}
4334 
4335     \textcolor{comment}{! 時刻設定}
4336     \textcolor{comment}{! Set time}
4337     \textcolor{comment}{!}
4338     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4339       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
4340         & history = gthist, &   \textcolor{comment}{! (in) optional}
4341         & timed = settime )     \textcolor{comment}{! (in) optional}
4342 \textcolor{keywordflow}{    end if}
4343 
4344     \textcolor{comment}{! 出力}
4345     \textcolor{comment}{! OutPut}
4346     \textcolor{comment}{!}
4347     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4348       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
4349         & varname, &              \textcolor{comment}{! (in)}
4350                               & array\_avr, &            \textcolor{comment}{! (in)}
4351                       
4352         & timed = settime, &      \textcolor{comment}{! (in) optional}
4353         & time\_average\_store = &
4354         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
4355         & history = gthist )                  \textcolor{comment}{! (inout) optional}
4356     \textcolor{keywordflow}{else}
4357       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
4358         & varname, &              \textcolor{comment}{! (in)}
4359                               & array\_avr, &            \textcolor{comment}{! (in)}
4360                       
4361         & history = gthist )      \textcolor{comment}{! (inout) optional}
4362 \textcolor{keywordflow}{    end if}
4363 
4364     \textcolor{comment}{! 最後に出力した時刻を保存}
4365     \textcolor{comment}{! Save last time of output}
4366     \textcolor{comment}{!}
4367     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4368       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
4369         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4370 
4371         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
4372           prev\_outtime\_vars(vnum) = time
4373         \textcolor{keywordflow}{else}
4374           prev\_outtime\_vars(vnum) = &
4375             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
4376 \textcolor{keywordflow}{        end if}
4377 \textcolor{keywordflow}{      end if}
4378 \textcolor{keywordflow}{    end if}
4379 
4380     \textcolor{comment}{! 結合解除}
4381     \textcolor{comment}{! Release associations}
4382     \textcolor{comment}{!}
4383     \textcolor{keyword}{nullify}( gthist )
4384                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
4385                     
4386 
4387 999 \textcolor{keywordflow}{continue}
4388     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
4389     \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]{historyautoput_8f90_a26e4ce95f5039a5c9da88dce187b4c9e_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoput_8f90_a9d37c6618e5f0d50b5d4552aef4dd9f5}\label{historyautoput_8f90_a9d37c6618e5f0d50b5d4552aef4dd9f5}} 
\index{historyautoput.\+f90@{historyautoput.\+f90}!historyautoputreal7@{historyautoputreal7}}
\index{historyautoputreal7@{historyautoputreal7}!historyautoput.\+f90@{historyautoput.\+f90}}
\subsubsection{\texorpdfstring{historyautoputreal7()}{historyautoputreal7()}}
{\footnotesize\ttfamily subroutine historyautoputreal7 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{time,  }\item[{character($\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in), target}]{array,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 4397 of file historyautoput.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::close\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::create\+\_\+timing\+\_\+vars, dc\+\_\+error\+::dc\+\_\+enegative, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+output\+\_\+prev\+\_\+vars, dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, gtool\+\_\+historyauto\+\_\+internal\+::histaddvar\+\_\+vars, historyclose(), historysettime(), dc\+\_\+error\+::hst\+\_\+ebadvarname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+createtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+avr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::prev\+\_\+outtime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::renew\+\_\+timing\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::zero\+\_\+time.


\begin{DoxyCode}
4397     \textcolor{comment}{!}
4398                     
4399     \textcolor{comment}{!}
4400 
4401     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
4402       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, \hyperlink{namespacegtool__historyauto__internal_a9399975605af7bbc7c94d27c565a9838}{zero\_time}, &
4403       & \hyperlink{namespacegtool__historyauto__internal_a09c7f8df28f4a08ff4ccc13ef1dc09d5}{create\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a07930b5a02bd90f8cfacd7eb854d16ed}{close\_timing\_vars}, &
4404       & \hyperlink{namespacegtool__historyauto__internal_af82718f8d0b65531180dfa0c91b15b0f}{histaddvar\_vars}, \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
4405       & \hyperlink{namespacegtool__historyauto__internal_a97a247a94cc02cdd16d8616c2c0b54ab}{newfile\_createtime\_vars}, &
4406       & \hyperlink{namespacegtool__historyauto__internal_aa6b7a1ee5a20f19ed0613b71073fdf6d}{output\_timing\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a949c34899075f1b5f8125cc2b72f81eb}{output\_timing\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_aa9911354c37b527aa9926ea2095df0f0}{prev\_outtime\_vars}, &
4407       & \hyperlink{namespacegtool__historyauto__internal_a63dcfda2a12d908ea7c299e41b4ae889}{renew\_timing\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, &
4408       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}, 
      \hyperlink{namespacegtool__historyauto__internal_a5c5b5c13f8c9a1f51190b33c6cffbabf}{flag\_output\_prev\_vars}, &
4409       & \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}
4410     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}, \hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}, &
4411       & \hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}
4412     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}
4413     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
4414       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}
4415     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, \hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}, 
      \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}, &
4416       & \hyperlink{interfacegtool__history__generic_1_1historyaddvariable}{historyaddvariable}, \hyperlink{interfacegtool__history__generic_1_1historyinquire}{historyinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
4417       & \hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}, \hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}
4418     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
4419     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
4420     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
4421     \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_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, &
4422       & \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
4423     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: unit\_symbol\_sec, \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
4424     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__generic}{dc\_date\_generic}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(+), &
4425       & \textcolor{keyword}{operator}(>), \textcolor{keyword}{operator}(<), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, \textcolor{keyword}{operator}(==), \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
4426       & \hyperlink{interfacedc__date__generic_1_1dcdifftimeputline}{dcdifftimeputline}
4427     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
4428     \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}
4429     \textcolor{keywordtype}{implicit none}
4430     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: time
4431                     
4432     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
4433                     
4434     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{target}:: array(:,:,:,:,:,:,:)
4435                     
4436     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
4437                     
4438 
4439     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}), \textcolor{keywordtype}{pointer}:: gthist =>null()
4440                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
4441                               \textcolor{comment}{! Derived type for "gtool\_history" module}
4442 
4443                         \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_slice(:,:,:,:,:,:,:) =>null()
4444     \textcolor{keywordtype}{type}(\hyperlink{structgtool__historyauto__internal_1_1slice__info}{slice\_info}), \textcolor{keywordtype}{pointer}:: sv =>null()
4445     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: array\_avr(:,:,:,:,:,:,:) =>null()
4446                     
4447     \textcolor{keywordtype}{real(DP)}:: settime
4448     \textcolor{keywordtype}{integer}:: stat, i
4449     \textcolor{keywordtype}{integer}:: vnum
4450     \textcolor{keywordtype}{character(STRING)}:: cause\_c
4451     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{save}:: svnum = 1, svtstep
4452     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoPutReal7"}
4453   \textcolor{keywordflow}{continue}
4454     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname) )
4455     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
4456     cause\_c = \textcolor{stringliteral}{""}
4457 
4458     \textcolor{comment}{! 初期設定チェック}
4459     \textcolor{comment}{! Check initialization}
4460     \textcolor{comment}{!}
4461     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
4462       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
4463       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
4464       \textcolor{keywordflow}{goto} 999
4465 \textcolor{keywordflow}{    end if}
4466 
4467     \textcolor{comment}{! 時刻に関するエラー処理}
4468     \textcolor{comment}{! Error handling for time}
4469     \textcolor{comment}{!}
4470     \textcolor{keywordflow}{if} ( time < zero\_time ) \textcolor{keywordflow}{then}
4471       cause\_c = \hyperlink{interfacedc__string_1_1tochar}{tochar}( time )
4472       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
4473         & \textcolor{stringliteral}{'"time=<%c>" must be positive value (varname=<%c>).'}, &
4474         & c1 = trim( cause\_c ), c2 = trim( varname ) )
4475       stat = \hyperlink{namespacedc__error_a64f090fc161836514c614059f74c23e6}{dc\_enegative}
4476       cause\_c = \textcolor{stringliteral}{'time'}
4477       \textcolor{keywordflow}{goto} 999
4478 \textcolor{keywordflow}{    end if}
4479 
4480     \textcolor{comment}{! 変数 ID のサーチ}
4481     \textcolor{comment}{! Search variable ID}
4482     \textcolor{comment}{!}
4483     varsearch: \textcolor{keywordflow}{do}
4484       \textcolor{keywordflow}{do} i = svnum, numvars
4485         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
4486           vnum = i
4487           \textcolor{keywordflow}{exit} varsearch
4488 \textcolor{keywordflow}{        end if}
4489 \textcolor{keywordflow}{      end do}
4490       \textcolor{keywordflow}{do} i = 1, svnum - 1
4491         \textcolor{keywordflow}{if} ( trim( varname\_vars(i) ) == trim(varname) ) \textcolor{keywordflow}{then}
4492           vnum = i
4493           \textcolor{keywordflow}{exit} varsearch
4494 \textcolor{keywordflow}{        end if}
4495 \textcolor{keywordflow}{      end do}
4496 
4497       stat = \hyperlink{namespacedc__error_a30736dc67a0d547ad912a1373fcedcbb}{hst\_ebadvarname}
4498       cause\_c = varname
4499       \textcolor{keywordflow}{goto} 999
4500 \textcolor{keywordflow}{    end do} varsearch
4501 
4502     svnum = vnum
4503 
4504     \textcolor{comment}{! 定義モードからデータモードへ}
4505     \textcolor{comment}{! Transit from define mode to data mode}
4506     \textcolor{comment}{!}
4507     \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( gthstnml ) ) \textcolor{keywordflow}{then}
4508       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( gthstnml ) \textcolor{comment}{! (inout)}
4509 \textcolor{keywordflow}{    end if}
4510 
4511     \textcolor{comment}{! 出力タイミングのチェックとファイルの作成}
4512     \textcolor{comment}{! Check output timing and create files}
4513     \textcolor{comment}{!}
4514     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstvarsoutputcheck}{hstvarsoutputcheck}( &
4515       &        time = time, &    \textcolor{comment}{! (in)}
4516       & stime\_index = svtstep )  \textcolor{comment}{! (out)}
4517 
4518     \textcolor{comment}{! ファイルのオープン・クローズ・再オープン}
4519     \textcolor{comment}{! Open, close, reopen files}
4520     \textcolor{comment}{!}
4521     \textcolor{keywordflow}{if} ( create\_timing\_vars(vnum, svtstep) &
4522       &  .and. .not. histaddvar\_vars(vnum)   ) \textcolor{keywordflow}{then}
4523       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
4524         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
4525       histaddvar\_vars(vnum) = .true.
4526       \textcolor{keywordflow}{if} ( flag\_output\_prev\_vars(vnum) ) \textcolor{keywordflow}{then}
4527         prev\_outtime\_vars(vnum) = time
4528       \textcolor{keywordflow}{else}
4529         flag\_output\_prev\_vars(vnum) = .true.
4530         \textcolor{keywordflow}{if} ( origin\_time\_vars(vnum) > zero\_time ) \textcolor{keywordflow}{then}
4531           prev\_outtime\_vars(vnum) = origin\_time\_vars(vnum)
4532         \textcolor{keywordflow}{else}
4533           prev\_outtime\_vars(vnum) = time
4534 \textcolor{keywordflow}{        end if}
4535 \textcolor{keywordflow}{      end if}
4536 \textcolor{keywordflow}{    end if}
4537 
4538     \textcolor{keywordflow}{if} ( close\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4539       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
4540         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
4541 \textcolor{keywordflow}{      end if}
4542 \textcolor{keywordflow}{    end if}
4543 
4544     \textcolor{keywordflow}{if} ( renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4545       \textcolor{keywordflow}{if} ( \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}( gthst\_history\_vars(vnum) % gthist ) ) \textcolor{keywordflow}{then}
4546         \textcolor{keyword}{call }\hyperlink{historyclose_8f90_a05bd27232ee951cef8bb19bd8a6f1a05}{historyclose}( gthst\_history\_vars(vnum) % gthist )   \textcolor{comment}{! (inout)}
4547 \textcolor{keywordflow}{      end if}
4548       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1hstfilecreate}{hstfilecreate}( gthst\_history\_vars(vnum) % gthist, & \textcolor{comment}{! (inout)}
4549         & varname\_vars(vnum), time )                           \textcolor{comment}{! (in)}
4550       newfile\_createtime\_vars(vnum) = time
4551       prev\_outtime\_vars(vnum) = time
4552 \textcolor{keywordflow}{    end if}
4553 
4554     \textcolor{comment}{! 出力が有効かどうかを確認する}
4555     \textcolor{comment}{! Confirm whether the output is effective}
4556     \textcolor{comment}{!}
4557     \textcolor{keywordflow}{if} (       .not. output\_timing\_vars(vnum, svtstep) &
4558       &  .and. .not. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4559 
4560       \textcolor{keywordflow}{goto} 999
4561 \textcolor{keywordflow}{    end if}
4562 
4563     \textcolor{comment}{! GT\_HISTORY 変数の取得}
4564     \textcolor{comment}{! Get "GT\_HISTORY" variable}
4565     \textcolor{comment}{!}
4566     gthist => gthst\_history\_vars(vnum) % gthist
4567 
4568 
4569     \textcolor{comment}{! 空間切り出し}
4570     \textcolor{comment}{! Slice of spaces}
4571     \textcolor{comment}{!}
4572                         sv => slice\_vars(vnum)
4573 
4574                       \textcolor{comment}{!!$        write(*,*) '  sv%st(1), sv%ed(1), sv%sd(1)=', sv%st(1), sv%ed(1), sv%sd(1)}
4575                       
4576 \textcolor{comment}{!!$        write(*,*) '  sv%st(2), sv%ed(2), sv%sd(2)=', sv%st(2), sv%ed(2), sv%sd(2)}
4577                       
4578 \textcolor{comment}{!!$        write(*,*) '  sv%st(3), sv%ed(3), sv%sd(3)=', sv%st(3), sv%ed(3), sv%sd(3)}
4579                       
4580 \textcolor{comment}{!!$        write(*,*) '  sv%st(4), sv%ed(4), sv%sd(4)=', sv%st(4), sv%ed(4), sv%sd(4)}
4581                       
4582 \textcolor{comment}{!!$        write(*,*) '  sv%st(5), sv%ed(5), sv%sd(5)=', sv%st(5), sv%ed(5), sv%sd(5)}
4583                       
4584 \textcolor{comment}{!!$        write(*,*) '  sv%st(6), sv%ed(6), sv%sd(6)=', sv%st(6), sv%ed(6), sv%sd(6)}
4585                       
4586 \textcolor{comment}{!!$        write(*,*) '  sv%st(7), sv%ed(7), sv%sd(7)=', sv%st(7), sv%ed(7), sv%sd(7)}
4587                       
4588 
4589     array\_slice => array(sv%st(1):sv%ed(1):sv%sd(1) &
4590                             & , sv%st(2):sv%ed(2):sv%sd(2) &
4591                       
4592       & , sv%st(3):sv%ed(3):sv%sd(3) &
4593                       
4594       & , sv%st(4):sv%ed(4):sv%sd(4) &
4595                       
4596       & , sv%st(5):sv%ed(5):sv%sd(5) &
4597                       
4598       & , sv%st(6):sv%ed(6):sv%sd(6) &
4599                       
4600       & , sv%st(7):sv%ed(7):sv%sd(7) &
4601                       
4602       & )
4603                     
4604 
4605 
4606     \textcolor{comment}{! 空間平均}
4607     \textcolor{comment}{! Spatial average}
4608     \textcolor{comment}{!}
4609                         \textcolor{keywordflow}{if} ( count(space\_avr\_vars(vnum) % avr) == 0 ) \textcolor{keywordflow}{then}
4610       array\_avr => array\_slice
4611     \textcolor{keywordflow}{else}
4612       \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__internal_1_1averagereduce}{averagereduce}( &
4613         & array\_slice, space\_avr\_vars(vnum) % avr, &   \textcolor{comment}{! (in)}
4614                               & weight\_vars(vnum) % wgt1( sv%st(1):sv%ed(1):sv%sd(1) ) , &   \textcolor{comment}{! (in)}
4615                       
4616         & weight\_vars(vnum) % wgt2( sv%st(2):sv%ed(2):sv%sd(2) ) , &   \textcolor{comment}{! (in)}
4617                       
4618         & weight\_vars(vnum) % wgt3( sv%st(3):sv%ed(3):sv%sd(3) ) , &   \textcolor{comment}{! (in)}
4619                       
4620         & weight\_vars(vnum) % wgt4( sv%st(4):sv%ed(4):sv%sd(4) ) , &   \textcolor{comment}{! (in)}
4621                       
4622         & weight\_vars(vnum) % wgt5( sv%st(5):sv%ed(5):sv%sd(5) ) , &   \textcolor{comment}{! (in)}
4623                       
4624         & weight\_vars(vnum) % wgt6( sv%st(6):sv%ed(6):sv%sd(6) ) , &   \textcolor{comment}{! (in)}
4625                       
4626         & weight\_vars(vnum) % wgt7( sv%st(7):sv%ed(7):sv%sd(7) ) , &   \textcolor{comment}{! (in)}
4627                       
4628         & array\_avr )                       \textcolor{comment}{! (out)}
4629 \textcolor{keywordflow}{    end if}
4630 
4631     \textcolor{comment}{! 座標重みを取得 ; Get weights of axes}
4632 
4633                     
4634 
4635     \textcolor{comment}{! 単位に応じて時刻を変換}
4636     \textcolor{comment}{! Convert time according to units}
4637     \textcolor{comment}{!}
4638     \textcolor{keywordflow}{if} (      output\_timing\_vars(vnum, svtstep) &
4639       &  .or. output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4640 
4641       settime = &
4642         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( time, unit\_symbol\_sec, interval\_unitsym\_vars(vnum), 
      cal\_save )
4643 \textcolor{keywordflow}{    end if}
4644 
4645     \textcolor{comment}{! 時刻設定}
4646     \textcolor{comment}{! Set time}
4647     \textcolor{comment}{!}
4648     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4649       \textcolor{keyword}{call }\hyperlink{historysettime_8f90_a0529c8b4e5a02c57700958caaa1535ce}{historysettime}( &
4650         & history = gthist, &   \textcolor{comment}{! (in) optional}
4651         & timed = settime )     \textcolor{comment}{! (in) optional}
4652 \textcolor{keywordflow}{    end if}
4653 
4654     \textcolor{comment}{! 出力}
4655     \textcolor{comment}{! OutPut}
4656     \textcolor{comment}{!}
4657     \textcolor{keywordflow}{if} ( output\_timing\_avr\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4658       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
4659         & varname, &              \textcolor{comment}{! (in)}
4660                               & array\_avr, &            \textcolor{comment}{! (in)}
4661                       
4662         & timed = settime, &      \textcolor{comment}{! (in) optional}
4663         & time\_average\_store = &
4664         &   .not. output\_timing\_vars(vnum, svtstep), & \textcolor{comment}{! (in) optional}
4665         & history = gthist )                  \textcolor{comment}{! (inout) optional}
4666     \textcolor{keywordflow}{else}
4667       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyput}{historyput}( &
4668         & varname, &              \textcolor{comment}{! (in)}
4669                               & array\_avr, &            \textcolor{comment}{! (in)}
4670                       
4671         & history = gthist )      \textcolor{comment}{! (inout) optional}
4672 \textcolor{keywordflow}{    end if}
4673 
4674     \textcolor{comment}{! 最後に出力した時刻を保存}
4675     \textcolor{comment}{! Save last time of output}
4676     \textcolor{comment}{!}
4677     \textcolor{keywordflow}{if} ( output\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4678       \textcolor{keywordflow}{if} ( .not. create\_timing\_vars(vnum, svtstep) .and. &
4679         &  .not. renew\_timing\_vars(vnum, svtstep) ) \textcolor{keywordflow}{then}
4680 
4681         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1mod}{mod}(time, interval\_time\_vars(vnum) ) == zero\_time ) \textcolor{keywordflow}{then}
4682           prev\_outtime\_vars(vnum) = time
4683         \textcolor{keywordflow}{else}
4684           prev\_outtime\_vars(vnum) = &
4685             & prev\_outtime\_vars(vnum) + interval\_time\_vars(vnum)
4686 \textcolor{keywordflow}{        end if}
4687 \textcolor{keywordflow}{      end if}
4688 \textcolor{keywordflow}{    end if}
4689 
4690     \textcolor{comment}{! 結合解除}
4691     \textcolor{comment}{! Release associations}
4692     \textcolor{comment}{!}
4693     \textcolor{keyword}{nullify}( gthist )
4694                         \textcolor{keyword}{nullify}( array\_avr, array\_slice )
4695                     
4696 
4697 999 \textcolor{keywordflow}{continue}
4698     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, err = err)
4699     \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]{historyautoput_8f90_a9d37c6618e5f0d50b5d4552aef4dd9f5_cgraph}
\end{center}
\end{figure}
