\hypertarget{historyautoaddvariable_8f90}{}\section{gtool/gtool\+\_\+historyauto/historyautoaddvariable.f90 File Reference}
\label{historyautoaddvariable_8f90}\index{gtool/gtool\+\_\+historyauto/historyautoaddvariable.\+f90@{gtool/gtool\+\_\+historyauto/historyautoaddvariable.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{historyautoaddvariable_8f90_af5a9e95567723e0c2d4b05da8ccc6714}{historyautoaddvariable1} (varname, dims, longname, units, xtype, time\+\_\+units, time\+\_\+average, file, origin, terminus, interval, slice\+\_\+start, slice\+\_\+end, slice\+\_\+stride, space\+\_\+average, newfile\+\_\+interval)
\item 
subroutine \hyperlink{historyautoaddvariable_8f90_ac9abbc23b8881c227fa7c6ea61724c27}{historyautoaddvariable2} (varname, dims, longname, units, xtype, time\+\_\+units, time\+\_\+average, file, origin, terminus, interval, slice\+\_\+start, slice\+\_\+end, slice\+\_\+stride, space\+\_\+average, newfile\+\_\+interval)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{historyautoaddvariable_8f90_af5a9e95567723e0c2d4b05da8ccc6714}\label{historyautoaddvariable_8f90_af5a9e95567723e0c2d4b05da8ccc6714}} 
\index{historyautoaddvariable.\+f90@{historyautoaddvariable.\+f90}!historyautoaddvariable1@{historyautoaddvariable1}}
\index{historyautoaddvariable1@{historyautoaddvariable1}!historyautoaddvariable.\+f90@{historyautoaddvariable.\+f90}}
\subsubsection{\texorpdfstring{historyautoaddvariable1()}{historyautoaddvariable1()}}
{\footnotesize\ttfamily subroutine historyautoaddvariable1 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{varname,  }\item[{character($\ast$), dimension(\+:), intent(in)}]{dims,  }\item[{character($\ast$), intent(in)}]{longname,  }\item[{character($\ast$), intent(in)}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype,  }\item[{character($\ast$), intent(in), optional}]{time\+\_\+units,  }\item[{logical, intent(in), optional}]{time\+\_\+average,  }\item[{character($\ast$), intent(in), optional}]{file,  }\item[{real(dp), intent(in), optional}]{origin,  }\item[{real(dp), intent(in), optional}]{terminus,  }\item[{real(dp), intent(in), optional}]{interval,  }\item[{integer, dimension(\+:), intent(in), optional}]{slice\+\_\+start,  }\item[{integer, dimension(\+:), intent(in), optional}]{slice\+\_\+end,  }\item[{integer, dimension(\+:), intent(in), optional}]{slice\+\_\+stride,  }\item[{logical, dimension(\+:), intent(in), optional}]{space\+\_\+average,  }\item[{integer, intent(in), optional}]{newfile\+\_\+interval }\end{DoxyParamCaption})}



Definition at line 36 of file historyautoaddvariable.\+f90.



References gtool\+\_\+historyauto\+\_\+internal\+::all\+\_\+output\+\_\+save, dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::cal\+\_\+save, gtool\+\_\+historyauto\+\_\+internal\+::data\+\_\+weights, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::flag\+\_\+allvarfixed, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+axes, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+history\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+weights, gtool\+\_\+historyauto\+\_\+internal\+::gthstnml, dc\+\_\+error\+::hst\+\_\+ealreadyregvarfix, dc\+\_\+error\+::hst\+\_\+eindivisible, dc\+\_\+error\+::hst\+\_\+emaxdimsdepended, dc\+\_\+error\+::hst\+\_\+evarinuse, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::interval\+\_\+unitsym\+\_\+vars, dc\+\_\+string\+::joinchar(), gtool\+\_\+historyauto\+\_\+internal\+::max\+\_\+dims\+\_\+depended\+\_\+by\+\_\+var, gtool\+\_\+historyauto\+\_\+internal\+::max\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::newfile\+\_\+inttime\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numvars, gtool\+\_\+historyauto\+\_\+internal\+::numwgts, gtool\+\_\+historyauto\+\_\+internal\+::origin\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::output\+\_\+valid\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::slice\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::space\+\_\+avr\+\_\+vars, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, gtool\+\_\+historyauto\+\_\+internal\+::tavr\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::terminus\+\_\+time\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::time\+\_\+unit\+\_\+bycreate, dc\+\_\+types\+::token, gtool\+\_\+historyauto\+\_\+internal\+::varname\+\_\+vars, gtool\+\_\+historyauto\+\_\+internal\+::version, gtool\+\_\+historyauto\+\_\+internal\+::weight\+\_\+vars, and gtool\+\_\+historyauto\+\_\+internal\+::wgtsuf.


\begin{DoxyCode}
36     \textcolor{comment}{!}
37     \textcolor{comment}{! データ出力するための変数登録を行います.}
38     \textcolor{comment}{!}
39     \textcolor{comment}{! HistoryAutoAllVarFix を呼ぶ前にこのサブルーチンを使用してください.}
40     \textcolor{comment}{!}
41     \textcolor{comment}{! * 時間平均について}
42     \textcolor{comment}{!}
43     \textcolor{comment}{!   gtool\_historyauto を用いた出力では,}
44     \textcolor{comment}{!   以下のいづれかの条件を満たす場合に出力データを}
45     \textcolor{comment}{!   時間方向に平均化して出力します.}
46     \textcolor{comment}{!}
47     \textcolor{comment}{!   1. HistoryAutoCreate の引数 *namelist\_filename* に}
48     \textcolor{comment}{!      指定された NAMELIST ファイル内において}
49     \textcolor{comment}{!      NAMELIST 変数群 "NAMELIST#gtool\_historyauto\_nml" 内の}
50     \textcolor{comment}{!      変数の一つである 論理型変数 TimeAverage に .true. が}
51     \textcolor{comment}{!      与えられている.}
52     \textcolor{comment}{!}
53     \textcolor{comment}{!   2. HistoryAutoAddVariable の引数 *time\_average* に}
54     \textcolor{comment}{!      .true. を与えている.}
55     \textcolor{comment}{!}
56     \textcolor{comment}{!   3. HistoryAutoCreate の引数 *time\_average* に}
57     \textcolor{comment}{!      .true. を与えている.}
58     \textcolor{comment}{!}
59     \textcolor{comment}{!   時間平均を行わない場合には, HistoryAutoPut の引数}
60     \textcolor{comment}{!   *time* に与えられた時刻と出力のタイミングが合致しない場合,}
61     \textcolor{comment}{!   HistoryAutoPut の *value* もしくは *array* に与えられた値は}
62     \textcolor{comment}{!   全て破棄されます. 一方で上記の条件を満たす場合には,}
63     \textcolor{comment}{!   本来破棄されていた値を gtool\_historyauto モジュール内部}
64     \textcolor{comment}{!   にいったん保管し, それらを出力のタイミングで平均化して}
65     \textcolor{comment}{!   出力します. 平均化は出力時から次の出力時の間の}
66     \textcolor{comment}{!   データを用いて行われます. 時間間隔が一定でない場合、}
67     \textcolor{comment}{!   重み付けをして出力されます. 重み付けは以下のように}
68     \textcolor{comment}{!   行われます.}
69     \textcolor{comment}{!}
70     \textcolor{comment}{!     sum( <data> * <weight> ) / sum ( <weight> )}
71     \textcolor{comment}{!}
72     \textcolor{comment}{!   <data>   :: *array* または *value* に与えられたデータ}
73     \textcolor{comment}{!   <weight> :: 前回 HistoryAutoPut が呼ばれた際の時刻と今回の時刻との差}
74     \textcolor{comment}{!   sum      :: 前回出力が行われた時刻から *interval* 経過するまでの値の和}
75     \textcolor{comment}{!}
76     \textcolor{comment}{!}
77     \textcolor{comment}{! Register variables for history data output}
78     \textcolor{comment}{!}
79     \textcolor{comment}{! Use this subroutine before "HistoryAutoAllVarFix" is called.}
80     \textcolor{comment}{!}
81 
82     \textcolor{comment}{! モジュール引用 ; USE statements}
83     \textcolor{comment}{!}
84 
85     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_ad719685d8938bd2a1e7aa36f0f57210d}{version}, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
86       & \hyperlink{namespacegtool__historyauto__internal_a697cf55887ae9c62958e7061f3241bfc}{max\_dims\_depended\_by\_var}, \hyperlink{namespacegtool__historyauto__internal_accaf1cc0cff23d81ec3e5931b11bcedc}{max\_vars}, &
87       & \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}, &
88       & \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}, \hyperlink{namespacegtool__historyauto__internal_a6f4962bc3ba6447d7cc53c1b88c9bd4e}{gthst\_vars}, \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}, 
      \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, &
89       & \hyperlink{namespacegtool__historyauto__internal_af834195df8f6f700789260981e4609cd}{all\_output\_save}, \hyperlink{namespacegtool__historyauto__internal_ae891f791f06836fb1d42b7185e6d3afa}{flag\_allvarfixed}, \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf}, 
      \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate}, &
90       & \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}, \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}, &
91       & \hyperlink{namespacegtool__historyauto__internal_a3387552625cfe65b04a0e419f94a79d7}{newfile\_inttime\_vars}, \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}, &
92       & \hyperlink{namespacegtool__historyauto__internal_af39402e77409e39aa414ee50daa50e12}{output\_valid\_vars}, \hyperlink{namespacegtool__historyauto__internal_aa25f721e1d915ff874fdc0262862594c}{tavr\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_a9fe6d83d81115f85455814c9b04c93fa}{terminus\_time\_vars}, \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}, &
93       & \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}, \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}, \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}, 
      \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}, &
94       & \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}, \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save}
95     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__generic}{gtool\_history\_nmlinfo\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfosetvalidname}{hstnmlinfosetvalidname}, &
96       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}, \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinforedefine}{hstnmlinforedefine}, 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}, &
97       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoadd}{hstnmlinfoadd}, \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoinquire}{hstnmlinfoinquire}, 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfooutputvalid}{hstnmlinfooutputvalid}, &
98       & \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoassocgthist}{hstnmlinfoassocgthist}
99     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1historyvarinfocreate}{historyvarinfocreate}, 
      \hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}, &
100       & \hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}
101     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
102     \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_acdb0596bb00d1cb72a80403c42e04ea3}{hst\_evarinuse}, &
103       & \hyperlink{namespacedc__error_a85eeda94a0091ae227485c033688443e}{hst\_ealreadyregvarfix}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_ac472d6c01dcad1c2d01c3d7f7c22f1fc}{hst\_emaxdimsdepended}, &
104       & \hyperlink{namespacedc__error_ac7680b3fb29d00025075325b85cf1dec}{hst\_eindivisible}
105     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
106     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1strinclude}{strinclude}, \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}, \hyperlink{interfacedc__string_1_1tochar}{tochar}
107     \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar}{dc\_calendar}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}, 
      \hyperlink{interfacedc__calendar__generic_1_1dccalparseunit}{dccalparseunit}
108     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}, \textcolor{keyword}{operator}(/), \hyperlink{interfacedc__scaledsec_1_1mod}{mod}, 
      \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
109       & \textcolor{keyword}{operator}(-), \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}
110     \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}
111     \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_emaxvars, nf90\_max\_dims
112     \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}
113 
114     \textcolor{comment}{! 宣言文 ; Declaration statements}
115     \textcolor{comment}{!}
116     \textcolor{keywordtype}{implicit none}
117     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
118                               \textcolor{comment}{! 変数名. Variable name}
119     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: dims(:)
120                               \textcolor{comment}{! 変数が依存する次元の名前.}
121                               \textcolor{comment}{! 時間の次元は配列の最後に指定すること.}
122                               \textcolor{comment}{!}
123                               \textcolor{comment}{! Names of dependency dimensions of a variable.}
124                               \textcolor{comment}{! Dimension of time must be specified}
125                               \textcolor{comment}{! to last of an array.}
126     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: longname
127                               \textcolor{comment}{! 変数の記述的名称.}
128                               \textcolor{comment}{!}
129                               \textcolor{comment}{! Descriptive name of a variable}
130     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: \hyperlink{structdc__units_1_1units}{units}
131                               \textcolor{comment}{! 変数の単位.}
132                               \textcolor{comment}{!}
133                               \textcolor{comment}{! Units of a variable}
134     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: xtype
135                               \textcolor{comment}{!}
136                               \textcolor{comment}{! 変数のデータ型}
137                               \textcolor{comment}{!}
138                               \textcolor{comment}{! デフォルトは float (単精度実数型) であ}
139                               \textcolor{comment}{! る. 有効なのは, double (倍精度実数型),}
140                               \textcolor{comment}{! int (整数型) である. 指定しない 場合や,}
141                               \textcolor{comment}{! 無効な型を指定した場合には, float (単}
142                               \textcolor{comment}{! 精度実数型) となる.}
143                               \textcolor{comment}{!}
144                               \textcolor{comment}{! Data types of dimensions specified}
145                               \textcolor{comment}{! with "dims".}
146                               \textcolor{comment}{!}
147                               \textcolor{comment}{! Default value is "float" (single precision).}
148                               \textcolor{comment}{! Other valid values are}
149                               \textcolor{comment}{! "double" (double precision),}
150                               \textcolor{comment}{! "int" (integer).}
151                               \textcolor{comment}{! If no value or invalid value is specified,}
152                               \textcolor{comment}{! "float" is applied.}
153                               \textcolor{comment}{!}
154     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: time\_units
155                               \textcolor{comment}{! 時刻次元の単位.}
156                               \textcolor{comment}{! Units of time dimension.}
157     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: time\_average
158                               \textcolor{comment}{!}
159                               \textcolor{comment}{! 出力データを時間平均する場合には}
160                               \textcolor{comment}{! .true. を与えます. デフォルトは}
161                               \textcolor{comment}{! .false. です.}
162                               \textcolor{comment}{!}
163                               \textcolor{comment}{! If output data is averaged, specify}
164                               \textcolor{comment}{! ".true.". Default is ".false.".}
165                               \textcolor{comment}{!}
166     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: file
167                               \textcolor{comment}{! 出力ファイル名.}
168                               \textcolor{comment}{! Output file name.}
169 
170     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: origin
171                               \textcolor{comment}{! 出力開始時刻.}
172                               \textcolor{comment}{!}
173                               \textcolor{comment}{! 省略した場合, 自動的に 0.0 [sec] が}
174                               \textcolor{comment}{! 設定されます.}
175                               \textcolor{comment}{!}
176                               \textcolor{comment}{! Start time of output.}
177                               \textcolor{comment}{!}
178                               \textcolor{comment}{! If this argument is omitted,}
179                               \textcolor{comment}{! 0.0 [sec] is specified}
180                               \textcolor{comment}{! automatically.}
181                               \textcolor{comment}{!}
182     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: terminus
183                               \textcolor{comment}{! 出力終了時刻.}
184                               \textcolor{comment}{!}
185                               \textcolor{comment}{! 省略した場合, 数値モデルの実行が終了するまで}
186                               \textcolor{comment}{! 出力を行います.}
187                               \textcolor{comment}{!}
188                               \textcolor{comment}{! End time of output.}
189                               \textcolor{comment}{!}
190                               \textcolor{comment}{! If this argument is omitted,}
191                               \textcolor{comment}{! output is continued until a numerical model}
192                               \textcolor{comment}{! is finished.}
193                               \textcolor{comment}{!}
194     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: interval
195                               \textcolor{comment}{! 出力時間間隔.}
196                               \textcolor{comment}{!}
197                               \textcolor{comment}{! 省略した場合,}
198                               \textcolor{comment}{! 自動的に 1.0 [sec] が設定されます.}
199                               \textcolor{comment}{!}
200                               \textcolor{comment}{! Interval of output time.}
201                               \textcolor{comment}{!}
202                               \textcolor{comment}{! If this argument is omitted,}
203                               \textcolor{comment}{! a value of 1.0 [sec] is specified}
204                               \textcolor{comment}{! automatically.}
205                               \textcolor{comment}{!}
206     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: slice\_start(:)
207                               \textcolor{comment}{! 空間方向の開始点.}
208                               \textcolor{comment}{!}
209                               \textcolor{comment}{! 省略した場合, 座標データの開始点が設定されます.}
210                               \textcolor{comment}{!}
211                               \textcolor{comment}{! Start points of spaces.}
212                               \textcolor{comment}{!}
213                               \textcolor{comment}{! If this argument is omitted,}
214                               \textcolor{comment}{! start points of dimensions are set.}
215                               \textcolor{comment}{!}
216     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: slice\_end(:)
217                               \textcolor{comment}{! 空間方向の終了点.}
218                               \textcolor{comment}{!}
219                               \textcolor{comment}{! 省略した場合, 座標データの終了点が設定されます.}
220                               \textcolor{comment}{!}
221                               \textcolor{comment}{! End points of spaces.}
222                               \textcolor{comment}{!}
223                               \textcolor{comment}{! If this argument is omitted,}
224                               \textcolor{comment}{! End points of dimensions are set.}
225                               \textcolor{comment}{!}
226     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: slice\_stride(:)
227                               \textcolor{comment}{! 空間方向の刻み幅.}
228                               \textcolor{comment}{!}
229                               \textcolor{comment}{! 省略した場合, 1 が設定されます.}
230                               \textcolor{comment}{!}
231                               \textcolor{comment}{! Strides of spaces}
232                               \textcolor{comment}{!}
233                               \textcolor{comment}{! If this argument is omitted,}
234                               \textcolor{comment}{! 1 is set.}
235                               \textcolor{comment}{!}
236     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: space\_average(:)
237                               \textcolor{comment}{! 平均化のフラグ.}
238                               \textcolor{comment}{!}
239                               \textcolor{comment}{! .true. が指定される座標に対して平均化を}
240                               \textcolor{comment}{! 行います.}
241                               \textcolor{comment}{! 省略した場合, .false. が設定されます.}
242                               \textcolor{comment}{!}
243                               \textcolor{comment}{! Flag of average.}
244                               \textcolor{comment}{!}
245                               \textcolor{comment}{! Axes specified .true. are averaged.}
246                               \textcolor{comment}{! If this argument is omitted,}
247                               \textcolor{comment}{! .false. is set.}
248                               \textcolor{comment}{!}
249     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: newfile\_interval
250                               \textcolor{comment}{! ファイル分割時間間隔.}
251                               \textcolor{comment}{!}
252                               \textcolor{comment}{! 省略した場合,}
253                               \textcolor{comment}{! 時間方向へのファイル分割を行いません.}
254                               \textcolor{comment}{!}
255                               \textcolor{comment}{! Interval of time of separation of a file.}
256                               \textcolor{comment}{!}
257                               \textcolor{comment}{! If this argument is omitted,}
258                               \textcolor{comment}{! a files is not separated in time direction.}
259                               \textcolor{comment}{!}
260 
261     \textcolor{comment}{! 作業変数}
262     \textcolor{comment}{! Work variables}
263     \textcolor{comment}{!}
264     \textcolor{keywordtype}{character(TOKEN)}:: interval\_unit\_work
265                               \textcolor{comment}{! データの出力間隔の単位.}
266                               \textcolor{comment}{! Unit for interval of history data output}
267     \textcolor{keywordtype}{character(TOKEN)}:: origin\_unit\_work
268                               \textcolor{comment}{! 出力開始時刻の単位.}
269                               \textcolor{comment}{! Unit of start time of output.}
270     \textcolor{keywordtype}{character(TOKEN)}:: terminus\_unit\_work
271                               \textcolor{comment}{! 出力終了時刻の単位.}
272                               \textcolor{comment}{! Unit of end time of output.}
273     \textcolor{keywordtype}{character(TOKEN)}:: newfile\_intunit\_work
274                               \textcolor{comment}{! ファイル分割時間間隔の単位.}
275                               \textcolor{comment}{! Unit of interval of time of separation of a file.}
276 
277     \textcolor{keywordtype}{real(DP)}:: interval\_value
278                               \textcolor{comment}{! データの出力間隔の数値.}
279                               \textcolor{comment}{! Numerical value for interval of history data output}
280     \textcolor{keywordtype}{real(DP)}:: origin\_value
281                               \textcolor{comment}{! データの出力開始時刻の数値.}
282                               \textcolor{comment}{! Numerical value for start time of history data output}
283     \textcolor{keywordtype}{real(DP)}:: terminus\_value
284                               \textcolor{comment}{! 出力終了時刻の数値.}
285                               \textcolor{comment}{! Numerical value for end time of output.}
286     \textcolor{keywordtype}{integer}:: newfile\_intvalue
287                               \textcolor{comment}{! ファイル分割時間間隔.}
288                               \textcolor{comment}{! Interval of time of separation of a file.}
289     \textcolor{keywordtype}{character(TOKEN)}:: time\_name
290                               \textcolor{comment}{! 時刻次元の名称.}
291                               \textcolor{comment}{! Name of time dimension}
292     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: dims\_work(:)
293                               \textcolor{comment}{! 変数が依存する次元の名前.}
294                               \textcolor{comment}{! Names of dependency dimensions of a variable.}
295     \textcolor{keywordtype}{character(TOKEN)}:: precision
296                               \textcolor{comment}{! データの精度.}
297                               \textcolor{comment}{! Precision of history data}
298     \textcolor{keywordtype}{logical}:: time\_average\_work
299                               \textcolor{comment}{! 出力データの時間平均フラグ.}
300                               \textcolor{comment}{! Flag for time average of output data}
301     \textcolor{keywordtype}{logical}:: space\_average\_work(1:\hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}-1)
302     \textcolor{keywordtype}{integer}:: slice\_start\_work(1:\hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}-1)
303                               \textcolor{comment}{! 空間方向の開始点.}
304                               \textcolor{comment}{! Start points of spaces.}
305     \textcolor{keywordtype}{integer}:: slice\_end\_work(1:\hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}-1)
306                               \textcolor{comment}{! 空間方向の終了点.}
307                               \textcolor{comment}{! End points of spaces.}
308     \textcolor{keywordtype}{integer}:: slice\_stride\_work(1:\hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}-1)
309                               \textcolor{comment}{! 空間方向の刻み幅.}
310                               \textcolor{comment}{! Strides of spaces}
311 
312     \textcolor{keywordtype}{logical}:: define\_mode, varname\_not\_found
313     \textcolor{keywordtype}{integer}:: cause\_i, stat, i, j, k, cnt, cnt2, dim\_size
314     \textcolor{keywordtype}{character(TOKEN)}, \textcolor{keywordtype}{pointer}:: dims\_noavr(:) =>null(), dims\_avr(:) =>null()
315     \textcolor{keywordtype}{character(STRING)}:: longname\_avrmsg
316     \textcolor{keywordtype}{character(STRING)}:: name, cause\_c
317     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoAddVariable1"}
318   \textcolor{keywordflow}{continue}
319     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname), \hyperlink{namespacegtool__historyauto__internal_ad719685d8938bd2a1e7aa36f0f57210d}{version} = 
      \hyperlink{namespacegtool__historyauto__internal_ad719685d8938bd2a1e7aa36f0f57210d}{version})
320     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
321     cause\_c = \textcolor{stringliteral}{""}
322     cause\_i = 0
323 
324     \textcolor{comment}{! 初期設定チェック}
325     \textcolor{comment}{! Check initialization}
326     \textcolor{comment}{!}
327     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
328       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
329       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
330       \textcolor{keywordflow}{goto} 999
331 \textcolor{keywordflow}{    end if}
332 
333     \textcolor{comment}{! 既に HistoryAutoAllVarFix が呼ばれていたらエラー}
334     \textcolor{comment}{! Error is occurred if "HistoryAutoAllVarFix" is called already}
335     \textcolor{comment}{!}
336     \textcolor{keywordflow}{if} ( \hyperlink{namespacegtool__historyauto__internal_ae891f791f06836fb1d42b7185e6d3afa}{flag\_allvarfixed} ) \textcolor{keywordflow}{then}
337       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
338         & \textcolor{stringliteral}{'"HistoryAutoAddVariable" (varname = %c) must be called before "HistoryAutoAllVarFix"'}, &
339         & c1 = trim(varname) )
340       stat = \hyperlink{namespacedc__error_a85eeda94a0091ae227485c033688443e}{hst\_ealreadyregvarfix}
341       cause\_c = \textcolor{stringliteral}{'HistoryAutoAllVarFix'}
342       \textcolor{keywordflow}{goto} 999
343 \textcolor{keywordflow}{    end if}
344 
345     \textcolor{comment}{! 重複のチェック}
346     \textcolor{comment}{! Check duplication}
347     \textcolor{comment}{!}
348     \textcolor{keywordflow}{do} i = 1, \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars}
349       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}( &
350         & varinfo = \hyperlink{namespacegtool__historyauto__internal_a6f4962bc3ba6447d7cc53c1b88c9bd4e}{gthst\_vars}(i), &  \textcolor{comment}{! (in)}
351         & name = name )               \textcolor{comment}{! (out)}
352       \textcolor{keywordflow}{if} ( trim(varname) == trim(name) ) \textcolor{keywordflow}{then}
353         stat = \hyperlink{namespacedc__error_acdb0596bb00d1cb72a80403c42e04ea3}{hst\_evarinuse}
354         cause\_c = varname
355         \textcolor{keywordflow}{goto} 999
356 \textcolor{keywordflow}{      end if}
357 \textcolor{keywordflow}{    end do}
358 
359     \textcolor{comment}{! 変数の数の限界チェック}
360     \textcolor{comment}{! Check limit of number of variables}
361     \textcolor{comment}{!}
362     \textcolor{keywordflow}{if} ( \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1 > \hyperlink{namespacegtool__historyauto__internal_accaf1cc0cff23d81ec3e5931b11bcedc}{max\_vars} ) \textcolor{keywordflow}{then}
363       stat = nf90\_emaxvars
364       \textcolor{keywordflow}{goto} 999
365 \textcolor{keywordflow}{    end if}
366 
367     \textcolor{comment}{! 時刻の次元に関する修正}
368     \textcolor{comment}{! Correction for time dimension}
369     \textcolor{comment}{!}
370     \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
371       & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(\hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}), & \textcolor{comment}{! (in)}
372       & name = time\_name )            \textcolor{comment}{! (out)}
373 
374     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims) > 0 ) \textcolor{keywordflow}{then}
375       \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__string_1_1strinclude}{strinclude}( dims, time\_name ) ) \textcolor{keywordflow}{then}
376         \textcolor{keywordflow}{if} ( trim( dims(\textcolor{keyword}{size}(dims)) ) == trim( time\_name ) ) \textcolor{keywordflow}{then}
377           \textcolor{keyword}{allocate}( dims\_work(\textcolor{keyword}{size}(dims)) )
378           dims\_work = dims
379         \textcolor{keywordflow}{else}
380           \textcolor{keyword}{allocate}( dims\_work(\textcolor{keyword}{size}(dims)) )
381           cnt = 1
382           \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(dims)
383             \textcolor{keywordflow}{if} ( trim( dims(i) ) /= trim( time\_name ) ) \textcolor{keywordflow}{then}
384               dims\_work( cnt ) = dims( i )
385               cnt = cnt + 1
386 \textcolor{keywordflow}{            end if}
387 \textcolor{keywordflow}{          end do}
388           dims\_work(\textcolor{keyword}{size}(dims)) = time\_name
389 
390           \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
391             & \textcolor{stringliteral}{'last entity of "dims=<%c>" must be time dimension (varname=<%c>). '} // &
392             & \textcolor{stringliteral}{' "dims" are resequenced forcibly => <%c>'}, &
393             & c1 = trim( \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}(dims, \textcolor{stringliteral}{','}) ), c2 = trim( varname ), &
394             & c3 = trim( \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}(dims\_work, \textcolor{stringliteral}{','}) ) )
395 
396 \textcolor{keywordflow}{        end if}
397       \textcolor{keywordflow}{else}
398         \textcolor{keyword}{allocate}( dims\_work(\textcolor{keyword}{size}(dims)+1) )
399         dims\_work(1:\textcolor{keyword}{size}(dims)) = dims
400         dims\_work(\textcolor{keyword}{size}(dims)+1) = time\_name
401         \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
402           & \textcolor{stringliteral}{'time dimension is not found in "dims=<%c>" (varname=<%c>). '} // &
403           & \textcolor{stringliteral}{' time dimension "%c" is appended to "dims" forcibly.'}, &
404           & c1 = trim( \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}(dims, \textcolor{stringliteral}{','}) ), c2 = trim( varname ), &
405           & c3 = trim( time\_name ) )
406 \textcolor{keywordflow}{      end if}
407     \textcolor{keywordflow}{else}
408       \textcolor{keyword}{allocate}( dims\_work(1) )
409       dims\_work(1) = time\_name
410       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
411         & \textcolor{stringliteral}{'time dimension is not found (varname=<%c>). '} // &
412         & \textcolor{stringliteral}{' time dimension "%c" is appended to "dims" forcibly.'}, &
413         & c1 = trim( varname ), &
414         & c2 = trim( time\_name ) )
415 \textcolor{keywordflow}{    end if}
416 
417     \textcolor{comment}{! 依存する次元の数の限界チェック}
418     \textcolor{comment}{! Check limit of number of depended dimensions}
419     \textcolor{comment}{!}
420     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}( dims\_work ) - 1 > \hyperlink{namespacegtool__historyauto__internal_a697cf55887ae9c62958e7061f3241bfc}{max\_dims\_depended\_by\_var} ) \textcolor{keywordflow}{then}
421       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'W'}, subname, &
422         & \textcolor{stringliteral}{'number of dimensions'} // &
423         & \textcolor{stringliteral}{' on which one variable depends must not be greater than %d (varname=<%c>, dims=<%c>). '}, &
424         & i = (/ 7 + 1 /), &
425         & c1 = trim( varname ), c2 = trim( \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}(dims\_work, \textcolor{stringliteral}{','}) ) )
426       stat = \hyperlink{namespacedc__error_ac472d6c01dcad1c2d01c3d7f7c22f1fc}{hst\_emaxdimsdepended}
427       cause\_i = \textcolor{keyword}{size}( dims\_work )
428       cause\_c = varname
429 \textcolor{keywordflow}{    end if}
430 
431     \textcolor{comment}{! 全ての変数を出力する際には, ここで登録}
432     \textcolor{comment}{! Register here if all variables are output}
433     \textcolor{comment}{!}
434     \textcolor{keywordflow}{if} ( \hyperlink{namespacegtool__historyauto__internal_af834195df8f6f700789260981e4609cd}{all\_output\_save} ) \textcolor{keywordflow}{then}
435       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoinquire}{hstnmlinfoinquire}( &
436         & \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} = \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, name = varname, &  \textcolor{comment}{! (in)}
437         & err = varname\_not\_found )               \textcolor{comment}{! (out) optional}
438       \textcolor{keywordflow}{if} ( varname\_not\_found ) \textcolor{keywordflow}{then}
439         define\_mode = \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} )
440         \textcolor{keywordflow}{if} ( .not. define\_mode ) \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinforedefine}{hstnmlinforedefine}( 
      \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} ) \textcolor{comment}{! (inout)}
441 
442         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoinquire}{hstnmlinfoinquire}( &
443           & \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} = \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, &                   \textcolor{comment}{! (in)}
444           & interval\_unit   = interval\_unit\_work, &  \textcolor{comment}{! (out) optional}
445           & origin\_unit     = origin\_unit\_work  , &  \textcolor{comment}{! (out) optional}
446           & terminus\_unit   = terminus\_unit\_work, &  \textcolor{comment}{! (out) optional}
447           & newfile\_intunit = newfile\_intunit\_work ) \textcolor{comment}{! (out) optional}
448 
449         \textcolor{comment}{! 時刻の単位を設定}
450         \textcolor{comment}{! Configure unit of time}
451         \textcolor{comment}{!}
452         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( interval ) ) \textcolor{keywordflow}{then}
453           interval\_unit\_work = \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate}
454           \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(time\_units) ) interval\_unit\_work = time\_units
455 \textcolor{keywordflow}{        end if}
456         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( origin ) ) \textcolor{keywordflow}{then}
457           origin\_unit\_work   = \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate}
458           \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(time\_units) ) origin\_unit\_work   = time\_units
459 \textcolor{keywordflow}{        end if}
460         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( terminus ) ) \textcolor{keywordflow}{then}
461           terminus\_unit\_work = \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate}
462           \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(time\_units) ) terminus\_unit\_work = time\_units
463 \textcolor{keywordflow}{        end if}
464         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( newfile\_interval ) ) \textcolor{keywordflow}{then}
465           newfile\_intunit\_work = \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate}
466           \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(time\_units) ) newfile\_intunit\_work = time\_units
467 \textcolor{keywordflow}{        end if}
468 
469         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoadd}{hstnmlinfoadd}( &
470           & \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}       = \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, &                \textcolor{comment}{! (inout)}
471           & name           = varname, &                 \textcolor{comment}{! (in) optional}
472           & file           = file, &                    \textcolor{comment}{! (in) optional}
473           & precision      = xtype, &                   \textcolor{comment}{! (in) optional}
474           & interval\_value = interval, &                \textcolor{comment}{! (in) optional}
475           & interval\_unit  = interval\_unit\_work, &      \textcolor{comment}{! (in) optional}
476           & origin\_value   = origin, &                  \textcolor{comment}{! (in) optional}
477           & origin\_unit    = origin\_unit\_work, &        \textcolor{comment}{! (in) optional}
478           & terminus\_value = terminus, &                \textcolor{comment}{! (in) optional}
479           & terminus\_unit  = terminus\_unit\_work, &      \textcolor{comment}{! (in) optional}
480           & slice\_start    = slice\_start, &             \textcolor{comment}{! (in) optional}
481           & slice\_end      = slice\_end, &               \textcolor{comment}{! (in) optional}
482           & slice\_stride   = slice\_stride, &            \textcolor{comment}{! (in) optional}
483           & time\_average   = time\_average, &            \textcolor{comment}{! (in) optional}
484           & space\_average  = space\_average, &           \textcolor{comment}{! (in) optional}
485           & newfile\_intvalue = newfile\_interval, &      \textcolor{comment}{! (in) optional}
486           & newfile\_intunit = newfile\_intunit\_work )    \textcolor{comment}{! (in) optional}
487         \textcolor{keywordflow}{if} ( .not. define\_mode ) \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( 
      \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} ) \textcolor{comment}{! (inout)}
488 \textcolor{keywordflow}{      end if}
489 \textcolor{keywordflow}{    end if}
490 
491     \textcolor{comment}{! 平均化に伴う次元の縮退を反映した変数情報の作り直し}
492     \textcolor{comment}{! Remake information of variables that reflects reduction of dimensions}
493     \textcolor{comment}{!   correspond to average}
494     \textcolor{comment}{!}
495     \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoinquire}{hstnmlinfoinquire}( &
496       & \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} = \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, name = varname, &  \textcolor{comment}{! (in)}
497       & precision = precision, &                \textcolor{comment}{! (out) optional}
498       & time\_average = time\_average\_work, &     \textcolor{comment}{! (out) optional}
499       & space\_average = space\_average\_work, &   \textcolor{comment}{! (out) optional}
500       & slice\_start = slice\_start\_work, &       \textcolor{comment}{! (out)}
501       & slice\_end = slice\_end\_work, &           \textcolor{comment}{! (out)}
502       & slice\_stride = slice\_stride\_work, &     \textcolor{comment}{! (out)}
503       & err = varname\_not\_found )               \textcolor{comment}{! (out) optional}
504     \textcolor{keywordflow}{if} ( varname\_not\_found ) \textcolor{keywordflow}{then}
505       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoinquire}{hstnmlinfoinquire}( &
506         & \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} = \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, name = \textcolor{stringliteral}{''}, &       \textcolor{comment}{! (in)}
507         & precision = precision, &                \textcolor{comment}{! (out) optional}
508         & time\_average = time\_average\_work, &     \textcolor{comment}{! (out) optional}
509         & space\_average = space\_average\_work, &   \textcolor{comment}{! (out) optional}
510         & slice\_start = slice\_start\_work, &       \textcolor{comment}{! (out)}
511         & slice\_end = slice\_end\_work, &           \textcolor{comment}{! (out)}
512         & slice\_stride = slice\_stride\_work )      \textcolor{comment}{! (out)}
513 \textcolor{keywordflow}{    end if}
514 
515     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % avr ) ) &
516       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % avr( \textcolor{keyword}{size}( dims\_work ) - 1 ) 
      )
517 
518     \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % avr = .false.
519     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}( dims\_work ) - 1
520       \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
521         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
522           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
523           & name = name )            \textcolor{comment}{! (out)}
524         \textcolor{keywordflow}{if} ( trim(dims\_work(i)) == trim(name) ) \textcolor{keywordflow}{then}
525           \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % avr( i ) = space\_average\_work( j )
526           \textcolor{keywordflow}{exit}
527 \textcolor{keywordflow}{        end if}
528 \textcolor{keywordflow}{      end do}
529 \textcolor{keywordflow}{    end do}
530 
531     \textcolor{keyword}{allocate}( dims\_noavr( \textcolor{keyword}{size}(dims\_work) - count(\hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}(
      \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % avr) ) )
532     \textcolor{keywordflow}{if} ( count(\hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % avr) < 1 ) \textcolor{keywordflow}{then}
533       dims\_noavr = dims\_work
534       longname\_avrmsg = \textcolor{stringliteral}{''}
535     \textcolor{keywordflow}{else}
536       \textcolor{keyword}{allocate}( dims\_avr( count(\hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % avr) ) )
537       cnt = 1 ; cnt2 = 1
538       \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}( dims\_work ) - 1
539         \textcolor{keywordflow}{if} ( .not. \hyperlink{namespacegtool__historyauto__internal_a34b79875d0a188614f436e0660288b56}{space\_avr\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % avr(i) ) \textcolor{keywordflow}{then}
540           dims\_noavr( cnt ) = dims\_work( i )
541           cnt = cnt + 1
542         \textcolor{keywordflow}{else}
543           dims\_avr( cnt2 ) = dims\_work( i )
544           cnt2 = cnt2 + 1
545 \textcolor{keywordflow}{        end if}
546 \textcolor{keywordflow}{      end do}
547       dims\_noavr( cnt ) = dims\_work( \textcolor{keyword}{size} ( dims\_work ) )
548 
549       longname\_avrmsg = \textcolor{stringliteral}{' averaged in '} // trim( \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}( dims\_avr, \textcolor{stringliteral}{','} ) ) // \textcolor{stringliteral}{'-direction'}
550       \textcolor{keyword}{deallocate}( dims\_avr )
551 \textcolor{keywordflow}{    end if}
552 
553     \textcolor{comment}{! HistoryPut の際のデータの切り出し情報作成}
554     \textcolor{comment}{! Create information of slices of data for "HistoryPut"}
555     \textcolor{comment}{!}
556     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % st ) ) &
557       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % st( nf90\_max\_dims ) )
558     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % ed ) ) &
559       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % ed( nf90\_max\_dims ) )
560     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % sd ) ) &
561       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % sd( nf90\_max\_dims ) )
562     \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % st = 1
563     \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % ed = 1
564     \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % sd = 1
565 
566     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims\_work) > 1 ) \textcolor{keywordflow}{then}
567       slice\_subscript\_search: \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}( dims\_work ) - 1
568         \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
569           \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
570             & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
571             & name = name, &           \textcolor{comment}{! (out)}
572             & \textcolor{keyword}{size} = dim\_size )        \textcolor{comment}{! (out)}
573           \textcolor{keywordflow}{if} ( slice\_end\_work(j) < 1 ) slice\_end\_work(j) = dim\_size
574           \textcolor{keywordflow}{if} ( trim(dims\_work(i)) == trim(name) ) \textcolor{keywordflow}{then}
575             \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % st( i ) = slice\_start\_work( j )
576             \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % ed( i ) = slice\_end\_work( j )
577             \hyperlink{namespacegtool__historyauto__internal_a4aa17640fe852d239cd4650e39dd4e1e}{slice\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % sd( i ) = slice\_stride\_work( j )
578             cycle slice\_subscript\_search
579 \textcolor{keywordflow}{          end if}
580 \textcolor{keywordflow}{        end do}
581 \textcolor{keywordflow}{      end do} slice\_subscript\_search
582 \textcolor{keywordflow}{    end if}
583 
584 
585     \textcolor{comment}{! HistoryPut の際の座標重み情報作成}
586     \textcolor{comment}{! Create information of axes weight for "HistoryPut"}
587     \textcolor{comment}{!}
588                     
589     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt1      ) ) &
590       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt1( 1 ) )
591     \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt1 = 1.0\_dp
592 
593     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims\_work) >= 1 ) \textcolor{keywordflow}{then}
594       \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
595         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
596           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
597           & name = name, &           \textcolor{comment}{! (out)}
598           & \textcolor{keyword}{size} = dim\_size )        \textcolor{comment}{! (out)}
599         \textcolor{keywordflow}{if} ( trim(dims\_work(1)) == trim(name) ) \textcolor{keywordflow}{then}
600           \textcolor{keyword}{deallocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt1 )
601           \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt1( dim\_size ) )
602           \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt1 = 1.0\_dp
603           \textcolor{keywordflow}{do} k = 1, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}
604             \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}( &
605               & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(k), &  \textcolor{comment}{! (in)}
606               & name    = name )               \textcolor{comment}{! (out)}
607             \textcolor{keywordflow}{if} ( trim(dims\_work(1)) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} == trim(name) ) \textcolor{keywordflow}{then}
608               \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt1 = \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}( k ) % a\_axis
609               \textcolor{keywordflow}{exit}
610 \textcolor{keywordflow}{            end if}
611 \textcolor{keywordflow}{          end do}
612           \textcolor{keywordflow}{exit}
613 \textcolor{keywordflow}{        end if}
614 \textcolor{keywordflow}{      end do}
615 \textcolor{keywordflow}{    end if}
616 
617                     
618 
619     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt2      ) ) &
620       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt2( 1 ) )
621     \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt2 = 1.0\_dp
622 
623     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims\_work) >= 2 ) \textcolor{keywordflow}{then}
624       \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
625         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
626           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
627           & name = name, &           \textcolor{comment}{! (out)}
628           & \textcolor{keyword}{size} = dim\_size )        \textcolor{comment}{! (out)}
629         \textcolor{keywordflow}{if} ( trim(dims\_work(2)) == trim(name) ) \textcolor{keywordflow}{then}
630           \textcolor{keyword}{deallocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt2 )
631           \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt2( dim\_size ) )
632           \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt2 = 1.0\_dp
633           \textcolor{keywordflow}{do} k = 1, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}
634             \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}( &
635               & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(k), &  \textcolor{comment}{! (in)}
636               & name    = name )               \textcolor{comment}{! (out)}
637             \textcolor{keywordflow}{if} ( trim(dims\_work(2)) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} == trim(name) ) \textcolor{keywordflow}{then}
638               \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt2 = \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}( k ) % a\_axis
639               \textcolor{keywordflow}{exit}
640 \textcolor{keywordflow}{            end if}
641 \textcolor{keywordflow}{          end do}
642           \textcolor{keywordflow}{exit}
643 \textcolor{keywordflow}{        end if}
644 \textcolor{keywordflow}{      end do}
645 \textcolor{keywordflow}{    end if}
646 
647                     
648 
649     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt3      ) ) &
650       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt3( 1 ) )
651     \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt3 = 1.0\_dp
652 
653     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims\_work) >= 3 ) \textcolor{keywordflow}{then}
654       \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
655         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
656           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
657           & name = name, &           \textcolor{comment}{! (out)}
658           & \textcolor{keyword}{size} = dim\_size )        \textcolor{comment}{! (out)}
659         \textcolor{keywordflow}{if} ( trim(dims\_work(3)) == trim(name) ) \textcolor{keywordflow}{then}
660           \textcolor{keyword}{deallocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt3 )
661           \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt3( dim\_size ) )
662           \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt3 = 1.0\_dp
663           \textcolor{keywordflow}{do} k = 1, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}
664             \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}( &
665               & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(k), &  \textcolor{comment}{! (in)}
666               & name    = name )               \textcolor{comment}{! (out)}
667             \textcolor{keywordflow}{if} ( trim(dims\_work(3)) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} == trim(name) ) \textcolor{keywordflow}{then}
668               \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt3 = \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}( k ) % a\_axis
669               \textcolor{keywordflow}{exit}
670 \textcolor{keywordflow}{            end if}
671 \textcolor{keywordflow}{          end do}
672           \textcolor{keywordflow}{exit}
673 \textcolor{keywordflow}{        end if}
674 \textcolor{keywordflow}{      end do}
675 \textcolor{keywordflow}{    end if}
676 
677                     
678 
679     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt4      ) ) &
680       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt4( 1 ) )
681     \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt4 = 1.0\_dp
682 
683     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims\_work) >= 4 ) \textcolor{keywordflow}{then}
684       \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
685         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
686           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
687           & name = name, &           \textcolor{comment}{! (out)}
688           & \textcolor{keyword}{size} = dim\_size )        \textcolor{comment}{! (out)}
689         \textcolor{keywordflow}{if} ( trim(dims\_work(4)) == trim(name) ) \textcolor{keywordflow}{then}
690           \textcolor{keyword}{deallocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt4 )
691           \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt4( dim\_size ) )
692           \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt4 = 1.0\_dp
693           \textcolor{keywordflow}{do} k = 1, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}
694             \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}( &
695               & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(k), &  \textcolor{comment}{! (in)}
696               & name    = name )               \textcolor{comment}{! (out)}
697             \textcolor{keywordflow}{if} ( trim(dims\_work(4)) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} == trim(name) ) \textcolor{keywordflow}{then}
698               \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt4 = \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}( k ) % a\_axis
699               \textcolor{keywordflow}{exit}
700 \textcolor{keywordflow}{            end if}
701 \textcolor{keywordflow}{          end do}
702           \textcolor{keywordflow}{exit}
703 \textcolor{keywordflow}{        end if}
704 \textcolor{keywordflow}{      end do}
705 \textcolor{keywordflow}{    end if}
706 
707                     
708 
709     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt5      ) ) &
710       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt5( 1 ) )
711     \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt5 = 1.0\_dp
712 
713     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims\_work) >= 5 ) \textcolor{keywordflow}{then}
714       \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
715         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
716           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
717           & name = name, &           \textcolor{comment}{! (out)}
718           & \textcolor{keyword}{size} = dim\_size )        \textcolor{comment}{! (out)}
719         \textcolor{keywordflow}{if} ( trim(dims\_work(5)) == trim(name) ) \textcolor{keywordflow}{then}
720           \textcolor{keyword}{deallocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt5 )
721           \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt5( dim\_size ) )
722           \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt5 = 1.0\_dp
723           \textcolor{keywordflow}{do} k = 1, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}
724             \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}( &
725               & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(k), &  \textcolor{comment}{! (in)}
726               & name    = name )               \textcolor{comment}{! (out)}
727             \textcolor{keywordflow}{if} ( trim(dims\_work(5)) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} == trim(name) ) \textcolor{keywordflow}{then}
728               \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt5 = \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}( k ) % a\_axis
729               \textcolor{keywordflow}{exit}
730 \textcolor{keywordflow}{            end if}
731 \textcolor{keywordflow}{          end do}
732           \textcolor{keywordflow}{exit}
733 \textcolor{keywordflow}{        end if}
734 \textcolor{keywordflow}{      end do}
735 \textcolor{keywordflow}{    end if}
736 
737                     
738 
739     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt6      ) ) &
740       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt6( 1 ) )
741     \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt6 = 1.0\_dp
742 
743     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims\_work) >= 6 ) \textcolor{keywordflow}{then}
744       \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
745         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
746           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
747           & name = name, &           \textcolor{comment}{! (out)}
748           & \textcolor{keyword}{size} = dim\_size )        \textcolor{comment}{! (out)}
749         \textcolor{keywordflow}{if} ( trim(dims\_work(6)) == trim(name) ) \textcolor{keywordflow}{then}
750           \textcolor{keyword}{deallocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt6 )
751           \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt6( dim\_size ) )
752           \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt6 = 1.0\_dp
753           \textcolor{keywordflow}{do} k = 1, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}
754             \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}( &
755               & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(k), &  \textcolor{comment}{! (in)}
756               & name    = name )               \textcolor{comment}{! (out)}
757             \textcolor{keywordflow}{if} ( trim(dims\_work(6)) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} == trim(name) ) \textcolor{keywordflow}{then}
758               \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt6 = \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}( k ) % a\_axis
759               \textcolor{keywordflow}{exit}
760 \textcolor{keywordflow}{            end if}
761 \textcolor{keywordflow}{          end do}
762           \textcolor{keywordflow}{exit}
763 \textcolor{keywordflow}{        end if}
764 \textcolor{keywordflow}{      end do}
765 \textcolor{keywordflow}{    end if}
766 
767                     
768 
769     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt7      ) ) &
770       &          \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt7( 1 ) )
771     \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt7 = 1.0\_dp
772 
773     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(dims\_work) >= 7 ) \textcolor{keywordflow}{then}
774       \textcolor{keywordflow}{do} j = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims} - 1
775         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
776           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(j), &  \textcolor{comment}{! (in)}
777           & name = name, &           \textcolor{comment}{! (out)}
778           & \textcolor{keyword}{size} = dim\_size )        \textcolor{comment}{! (out)}
779         \textcolor{keywordflow}{if} ( trim(dims\_work(7)) == trim(name) ) \textcolor{keywordflow}{then}
780           \textcolor{keyword}{deallocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt7 )
781           \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt7( dim\_size ) )
782           \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt7 = 1.0\_dp
783           \textcolor{keywordflow}{do} k = 1, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}
784             \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfoinquire}{historyvarinfoinquire}( &
785               & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(k), &  \textcolor{comment}{! (in)}
786               & name    = name )               \textcolor{comment}{! (out)}
787             \textcolor{keywordflow}{if} ( trim(dims\_work(7)) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} == trim(name) ) \textcolor{keywordflow}{then}
788               \hyperlink{namespacegtool__historyauto__internal_a06ec540d19db7efce796bc6938f81896}{weight\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % wgt7 = \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}( k ) % a\_axis
789               \textcolor{keywordflow}{exit}
790 \textcolor{keywordflow}{            end if}
791 \textcolor{keywordflow}{          end do}
792           \textcolor{keywordflow}{exit}
793 \textcolor{keywordflow}{        end if}
794 \textcolor{keywordflow}{      end do}
795 \textcolor{keywordflow}{    end if}
796 
797                     
798 
799     \textcolor{comment}{! 変数名の有効性を設定}
800     \textcolor{comment}{! Set validation of the variable name}
801     \textcolor{comment}{!}
802     \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfosetvalidname}{hstnmlinfosetvalidname}( &
803       & \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} = \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, name = varname ) \textcolor{comment}{! (in)}
804 
805     \textcolor{comment}{! 変数情報の登録}
806     \textcolor{comment}{! Register information of variable}
807     \textcolor{comment}{!}
808     \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfocreate}{historyvarinfocreate}( &
809       & varinfo = \hyperlink{namespacegtool__historyauto__internal_a6f4962bc3ba6447d7cc53c1b88c9bd4e}{gthst\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1), &              \textcolor{comment}{! (out)}
810       & name = varname, dims = dims\_noavr, &              \textcolor{comment}{! (in)}
811       & longname = trim(longname) // longname\_avrmsg , &  \textcolor{comment}{! (in)}
812       & \hyperlink{structdc__units_1_1units}{units} = \hyperlink{structdc__units_1_1units}{units}, xtype = precision, &               \textcolor{comment}{! (in)}
813       & time\_average = time\_average\_work )                \textcolor{comment}{! (in) optional}
814     \hyperlink{namespacegtool__historyauto__internal_a310d8344095b79e8492908ddcebde8fd}{varname\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) = varname
815     \hyperlink{namespacegtool__historyauto__internal_aa25f721e1d915ff874fdc0262862594c}{tavr\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) = time\_average\_work
816     \textcolor{keyword}{deallocate}( dims\_noavr )
817     \textcolor{keyword}{deallocate}( dims\_work )
818 
819     \textcolor{comment}{! 出力の有効かどうかを確認する}
820     \textcolor{comment}{! Confirm whether the output is effective}
821     \textcolor{comment}{!}
822     \hyperlink{namespacegtool__historyauto__internal_af39402e77409e39aa414ee50daa50e12}{output\_valid\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) = 
      \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfooutputvalid}{hstnmlinfooutputvalid}( \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, varname )
823 
824     \textcolor{comment}{! 出力のタイミングを測るための情報の取得}
825     \textcolor{comment}{! Get information for measurement of output timing}
826     \textcolor{comment}{!}
827     \textcolor{keywordflow}{if} ( \hyperlink{namespacegtool__historyauto__internal_af39402e77409e39aa414ee50daa50e12}{output\_valid\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) ) \textcolor{keywordflow}{then}
828 
829       \textcolor{comment}{! NAMELIST から読み込まれた情報の取得}
830       \textcolor{comment}{! Get information loaded from NAMELIST}
831       \textcolor{comment}{!}
832       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoinquire}{hstnmlinfoinquire}( &
833         & \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} = \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, &                    \textcolor{comment}{! (in)}
834         & name = varname, &                         \textcolor{comment}{! (in)}
835         & interval\_value   = interval\_value, &      \textcolor{comment}{! (out)}
836         & interval\_unit    = interval\_unit\_work, &  \textcolor{comment}{! (out)}
837         & origin\_value     = origin\_value, &        \textcolor{comment}{! (out)}
838         & origin\_unit      = origin\_unit\_work, &    \textcolor{comment}{! (out)}
839         & terminus\_value   = terminus\_value, &      \textcolor{comment}{! (out)}
840         & terminus\_unit    = terminus\_unit\_work, &  \textcolor{comment}{! (out)}
841         & newfile\_intvalue = newfile\_intvalue, &    \textcolor{comment}{! (out)}
842         & newfile\_intunit  = newfile\_intunit\_work ) \textcolor{comment}{! (out)}
843 
844       \textcolor{comment}{! 出力間隔ステップ数を算出する.}
845       \textcolor{comment}{! Calculate number of step of interval of output}
846       \textcolor{comment}{!}
847       \hyperlink{namespacegtool__historyauto__internal_a632ce982118e69400ac90698adace1e6}{interval\_time\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) = &
848         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( interval\_value, interval\_unit\_work, \textcolor{stringliteral}{'sec'}, 
      \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save} )
849 
850       \textcolor{keyword}{call }\hyperlink{interfacedc__calendar__generic_1_1dccalparseunit}{dccalparseunit}( interval\_unit\_work, & \textcolor{comment}{! (in)}
851         & \hyperlink{namespacegtool__historyauto__internal_aeb9ac548a4ebedfafc5c2eb706c74339}{interval\_unitsym\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) )   \textcolor{comment}{! (out)}
852 
853 \textcolor{comment}{!!$      call DCDiffTimeCreate( &}
854 \textcolor{comment}{!!$        & interval\_time\_vars(numvars + 1), &   ! (out)}
855 \textcolor{comment}{!!$        & interval\_value, interval\_unit\_work ) ! (in)}
856 
857       \textcolor{comment}{! ファイルを作成するステップ数を算出する.}
858       \textcolor{comment}{! Calculate number of step of interval of output}
859       \textcolor{comment}{!}
860       \hyperlink{namespacegtool__historyauto__internal_abf3e748f6c50b54af3d75deb049c4b3e}{origin\_time\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) = &
861         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( origin\_value, origin\_unit\_work, \textcolor{stringliteral}{'sec'}, 
      \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save} )
862 
863 \textcolor{comment}{!!$      call DCDiffTimeCreate( &}
864 \textcolor{comment}{!!$        & origin\_time\_vars(numvars + 1), & ! (out)}
865 \textcolor{comment}{!!$        & origin\_value, origin\_unit\_work ) ! (in)}
866 
867       \textcolor{comment}{! ファイルをクローズするステップ数を算出する.}
868       \textcolor{comment}{! Calculate number of step of closure of file}
869       \textcolor{comment}{!}
870       \hyperlink{namespacegtool__historyauto__internal_a9fe6d83d81115f85455814c9b04c93fa}{terminus\_time\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) = &
871         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( terminus\_value, terminus\_unit\_work, \textcolor{stringliteral}{'sec'}, 
      \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save} )
872 
873 \textcolor{comment}{!!$      call DCDiffTimeCreate( &}
874 \textcolor{comment}{!!$        & terminus\_time\_vars(numvars + 1), &   ! (out)}
875 \textcolor{comment}{!!$        & terminus\_value, terminus\_unit\_work ) ! (in)}
876 
877       \textcolor{comment}{! ファイルを新規に作り直すステップ数の算出}
878       \textcolor{comment}{! Calculate number of step of remake of file}
879       \textcolor{comment}{!}
880       \hyperlink{namespacegtool__historyauto__internal_a3387552625cfe65b04a0e419f94a79d7}{newfile\_inttime\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) = &
881         & \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( \textcolor{keywordtype}{real( newfile\_intvalue, DP )}, newfile\_intunit\_work, \textcolor{stringliteral}{'sec'}, 
      \hyperlink{namespacegtool__historyauto__internal_abb3028b474fbd886d4ab3d82d25fbe2f}{cal\_save} )
882 
883 \textcolor{comment}{!!$      call DCDiffTimeCreate( &}
884 \textcolor{comment}{!!$        & newfile\_inttime\_vars(numvars + 1), &     ! (out)}
885 \textcolor{comment}{!!$        & newfile\_intvalue, newfile\_intunit\_work ) ! (in)}
886 
887 \textcolor{keywordflow}{    end if}
888 
889     \textcolor{comment}{! GT\_HISTORY 変数の取得}
890     \textcolor{comment}{! Get "GT\_HISTORY" variable}
891     \textcolor{comment}{!}
892     \textcolor{keywordflow}{if} ( \hyperlink{namespacegtool__historyauto__internal_af39402e77409e39aa414ee50daa50e12}{output\_valid\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) ) \textcolor{keywordflow}{then}
893       define\_mode = \hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodefinemode}{hstnmlinfodefinemode}( \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} )
894       \textcolor{keywordflow}{if} ( define\_mode ) \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoenddefine}{hstnmlinfoenddefine}( \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} ) \textcolor{comment}{! (inout)}
895       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfoassocgthist}{hstnmlinfoassocgthist}( &
896         & \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} = \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml}, name = varname, &               \textcolor{comment}{! (in)}
897         & history = \hyperlink{namespacegtool__historyauto__internal_a23eb96add87a87f752d605b593113352}{gthst\_history\_vars}(\hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1) % gthist ) \textcolor{comment}{! (out)}
898 
899       \textcolor{keywordflow}{if} ( define\_mode ) \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinforedefine}{hstnmlinforedefine}( \hyperlink{namespacegtool__historyauto__internal_a08a505d0576b7a6390e6f7a715ccc2b4}{gthstnml} ) \textcolor{comment}{! (inout)}
900 \textcolor{keywordflow}{    end if}
901 
902     \textcolor{comment}{! 登録変数の数を更新}
903     \textcolor{comment}{! Update number of registered variables}
904     \textcolor{comment}{!}
905     \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} = \hyperlink{namespacegtool__historyauto__internal_af2a97d3aefbba8947148f51c961f147c}{numvars} + 1
906 
907 999 \textcolor{keywordflow}{continue}
908     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c, cause\_i = cause\_i)
909     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{'stat=%d'}, i = (/stat/) )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{historyautoaddvariable_8f90_af5a9e95567723e0c2d4b05da8ccc6714_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoaddvariable_8f90_ac9abbc23b8881c227fa7c6ea61724c27}\label{historyautoaddvariable_8f90_ac9abbc23b8881c227fa7c6ea61724c27}} 
\index{historyautoaddvariable.\+f90@{historyautoaddvariable.\+f90}!historyautoaddvariable2@{historyautoaddvariable2}}
\index{historyautoaddvariable2@{historyautoaddvariable2}!historyautoaddvariable.\+f90@{historyautoaddvariable.\+f90}}
\subsubsection{\texorpdfstring{historyautoaddvariable2()}{historyautoaddvariable2()}}
{\footnotesize\ttfamily subroutine historyautoaddvariable2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{varname,  }\item[{character($\ast$), dimension(\+:), intent(in)}]{dims,  }\item[{character($\ast$), intent(in)}]{longname,  }\item[{character($\ast$), intent(in)}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype,  }\item[{character($\ast$), intent(in), optional}]{time\+\_\+units,  }\item[{logical, intent(in), optional}]{time\+\_\+average,  }\item[{character($\ast$), intent(in), optional}]{file,  }\item[{type(dc\+\_\+difftime), intent(in)}]{origin,  }\item[{type(dc\+\_\+difftime), intent(in)}]{terminus,  }\item[{type(dc\+\_\+difftime), intent(in), optional}]{interval,  }\item[{integer, dimension(\+:), intent(in), optional}]{slice\+\_\+start,  }\item[{integer, dimension(\+:), intent(in), optional}]{slice\+\_\+end,  }\item[{integer, dimension(\+:), intent(in), optional}]{slice\+\_\+stride,  }\item[{logical, dimension(\+:), intent(in), optional}]{space\+\_\+average,  }\item[{integer, intent(in), optional}]{newfile\+\_\+interval }\end{DoxyParamCaption})}



Definition at line 922 of file historyautoaddvariable.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::numdims, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, gtool\+\_\+historyauto\+\_\+internal\+::time\+\_\+unit\+\_\+bycreate, dc\+\_\+types\+::token, and gtool\+\_\+historyauto\+\_\+internal\+::version.


\begin{DoxyCode}
922     \textcolor{comment}{!}
923     \textcolor{comment}{! データ出力するための変数登録を行います.}
924     \textcolor{comment}{!}
925     \textcolor{comment}{! HistoryAutoAllVarFix を呼ぶ前にこのサブルーチンを使用してください.}
926     \textcolor{comment}{!}
927     \textcolor{comment}{! Register variables for history data output}
928     \textcolor{comment}{!}
929     \textcolor{comment}{! Use this subroutine before "HistoryAutoAllVarFix" is called.}
930     \textcolor{comment}{!}
931 
932     \textcolor{comment}{! モジュール引用 ; USE statements}
933     \textcolor{comment}{!}
934 
935     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__generic}{gtool\_historyauto\_generic}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__historyauto__generic_1_1historyautoaddvariable}{historyautoaddvariable}
936     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_ad719685d8938bd2a1e7aa36f0f57210d}{version}, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, &
937       & \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate}
938     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
939     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
940     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}
941     \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}
942     \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}
943 
944     \textcolor{comment}{! 宣言文 ; Declaration statements}
945     \textcolor{comment}{!}
946     \textcolor{keywordtype}{implicit none}
947     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: varname
948                               \textcolor{comment}{! 変数名. Variable name}
949     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: dims(:)
950                               \textcolor{comment}{! 変数が依存する次元の名前.}
951                               \textcolor{comment}{! 時間の次元は配列の最後に指定すること.}
952                               \textcolor{comment}{!}
953                               \textcolor{comment}{! Names of dependency dimensions of a variable.}
954                               \textcolor{comment}{! Dimension of time must be specified}
955                               \textcolor{comment}{! to last of an array.}
956     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: longname
957                               \textcolor{comment}{! 変数の記述的名称.}
958                               \textcolor{comment}{!}
959                               \textcolor{comment}{! Descriptive name of a variable}
960     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: \hyperlink{structdc__units_1_1units}{units}
961                               \textcolor{comment}{! 変数の単位.}
962                               \textcolor{comment}{!}
963                               \textcolor{comment}{! Units of a variable}
964     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: origin
965                               \textcolor{comment}{! 出力開始時刻.}
966                               \textcolor{comment}{!}
967                               \textcolor{comment}{! Start time of output.}
968                               \textcolor{comment}{!}
969     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}:: terminus
970                               \textcolor{comment}{! 出力終了時刻.}
971                               \textcolor{comment}{!}
972                               \textcolor{comment}{! End time of output.}
973                               \textcolor{comment}{!}
974     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: interval
975                               \textcolor{comment}{! 出力時間間隔.}
976                               \textcolor{comment}{!}
977                               \textcolor{comment}{! 省略した場合,}
978                               \textcolor{comment}{! 自動的に 1.0 [sec] が設定されます.}
979                               \textcolor{comment}{!}
980                               \textcolor{comment}{! Interval of output time.}
981                               \textcolor{comment}{!}
982                               \textcolor{comment}{! If this argument is omitted,}
983                               \textcolor{comment}{! a value of 1.0 [sec] is specified}
984                               \textcolor{comment}{! automatically.}
985                               \textcolor{comment}{!}
986     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: xtype
987                               \textcolor{comment}{!}
988                               \textcolor{comment}{! 変数のデータ型}
989                               \textcolor{comment}{!}
990                               \textcolor{comment}{! デフォルトは float (単精度実数型) であ}
991                               \textcolor{comment}{! る. 有効なのは, double (倍精度実数型),}
992                               \textcolor{comment}{! int (整数型) である. 指定しない 場合や,}
993                               \textcolor{comment}{! 無効な型を指定した場合には, float (単}
994                               \textcolor{comment}{! 精度実数型) となる.}
995                               \textcolor{comment}{!}
996                               \textcolor{comment}{! Data types of dimensions specified}
997                               \textcolor{comment}{! with "dims".}
998                               \textcolor{comment}{!}
999                               \textcolor{comment}{! Default value is "float" (single precision).}
1000                               \textcolor{comment}{! Other valid values are}
1001                               \textcolor{comment}{! "double" (double precision),}
1002                               \textcolor{comment}{! "int" (integer).}
1003                               \textcolor{comment}{! If no value or invalid value is specified,}
1004                               \textcolor{comment}{! "float" is applied.}
1005                               \textcolor{comment}{!}
1006     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: time\_units
1007                               \textcolor{comment}{! 時刻次元の単位.}
1008                               \textcolor{comment}{! Units of time dimension.}
1009     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: time\_average
1010                               \textcolor{comment}{!}
1011                               \textcolor{comment}{! 出力データを時間平均する場合には}
1012                               \textcolor{comment}{! .true. を与えます. デフォルトは}
1013                               \textcolor{comment}{! .false. です.}
1014                               \textcolor{comment}{!}
1015                               \textcolor{comment}{! If output data is averaged, specify}
1016                               \textcolor{comment}{! ".true.". Default is ".false.".}
1017                               \textcolor{comment}{!}
1018     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: file
1019                               \textcolor{comment}{! 出力ファイル名.}
1020                               \textcolor{comment}{! Output file name.}
1021 
1022     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: slice\_start(:)
1023                               \textcolor{comment}{! 空間方向の開始点.}
1024                               \textcolor{comment}{!}
1025                               \textcolor{comment}{! 省略した場合, 座標データの開始点が設定されます.}
1026                               \textcolor{comment}{!}
1027                               \textcolor{comment}{! Start points of spaces.}
1028                               \textcolor{comment}{!}
1029                               \textcolor{comment}{! If this argument is omitted,}
1030                               \textcolor{comment}{! start points of dimensions are set.}
1031                               \textcolor{comment}{!}
1032     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: slice\_end(:)
1033                               \textcolor{comment}{! 空間方向の終了点.}
1034                               \textcolor{comment}{!}
1035                               \textcolor{comment}{! 省略した場合, 座標データの終了点が設定されます.}
1036                               \textcolor{comment}{!}
1037                               \textcolor{comment}{! End points of spaces.}
1038                               \textcolor{comment}{!}
1039                               \textcolor{comment}{! If this argument is omitted,}
1040                               \textcolor{comment}{! End points of dimensions are set.}
1041                               \textcolor{comment}{!}
1042     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: slice\_stride(:)
1043                               \textcolor{comment}{! 空間方向の刻み幅.}
1044                               \textcolor{comment}{!}
1045                               \textcolor{comment}{! 省略した場合, 1 が設定されます.}
1046                               \textcolor{comment}{!}
1047                               \textcolor{comment}{! Strides of spaces}
1048                               \textcolor{comment}{!}
1049                               \textcolor{comment}{! If this argument is omitted,}
1050                               \textcolor{comment}{! 1 is set.}
1051                               \textcolor{comment}{!}
1052     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: space\_average(:)
1053                               \textcolor{comment}{! 平均化のフラグ.}
1054                               \textcolor{comment}{!}
1055                               \textcolor{comment}{! .true. が指定される座標に対して平均化を}
1056                               \textcolor{comment}{! 行います.}
1057                               \textcolor{comment}{! 省略した場合, .false. が設定されます.}
1058                               \textcolor{comment}{!}
1059                               \textcolor{comment}{! Flag of average.}
1060                               \textcolor{comment}{!}
1061                               \textcolor{comment}{! Axes specified .true. are averaged.}
1062                               \textcolor{comment}{! If this argument is omitted,}
1063                               \textcolor{comment}{! .false. is set.}
1064                               \textcolor{comment}{!}
1065     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: newfile\_interval
1066                               \textcolor{comment}{! ファイル分割時間間隔.}
1067                               \textcolor{comment}{!}
1068                               \textcolor{comment}{! 省略した場合,}
1069                               \textcolor{comment}{! 時間方向へのファイル分割を行いません.}
1070                               \textcolor{comment}{!}
1071                               \textcolor{comment}{! Interval of time of separation of a file.}
1072                               \textcolor{comment}{!}
1073                               \textcolor{comment}{! If this argument is omitted,}
1074                               \textcolor{comment}{! a files is not separated in time direction.}
1075                               \textcolor{comment}{!}
1076 
1077     \textcolor{comment}{! 作業変数}
1078     \textcolor{comment}{! Work variables}
1079     \textcolor{comment}{!}
1080     \textcolor{keywordtype}{real(DP)}:: interval\_value
1081                               \textcolor{comment}{! データの出力間隔の数値.}
1082                               \textcolor{comment}{! Numerical value for interval of history data output}
1083     \textcolor{keywordtype}{real(DP)}:: origin\_value
1084                               \textcolor{comment}{! データの出力開始時刻の数値.}
1085                               \textcolor{comment}{! Numerical value for start time of history data output}
1086     \textcolor{keywordtype}{real(DP)}:: terminus\_value
1087                               \textcolor{comment}{! 出力終了時刻の数値.}
1088                               \textcolor{comment}{! Numerical value for end time of output.}
1089     \textcolor{keywordtype}{integer}:: stat
1090     \textcolor{keywordtype}{character(STRING)}:: cause\_c
1091     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoAddVariable2"}
1092   \textcolor{keywordflow}{continue}
1093     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'varname=%c'}, c1 = trim(varname), \hyperlink{namespacegtool__historyauto__internal_ad719685d8938bd2a1e7aa36f0f57210d}{version} = 
      \hyperlink{namespacegtool__historyauto__internal_ad719685d8938bd2a1e7aa36f0f57210d}{version})
1094     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
1095     cause\_c = \textcolor{stringliteral}{""}
1096 
1097     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(time\_units) ) \textcolor{keywordflow}{then}
1098       origin\_value = \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}( origin, time\_units )
1099     \textcolor{keywordflow}{else}
1100       origin\_value = \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}( origin, \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate} )
1101 \textcolor{keywordflow}{    end if}
1102 
1103     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(time\_units) ) \textcolor{keywordflow}{then}
1104       terminus\_value = \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}( terminus, time\_units )
1105     \textcolor{keywordflow}{else}
1106       terminus\_value = \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}( terminus, \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate} )
1107 \textcolor{keywordflow}{    end if}
1108 
1109     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(interval) ) \textcolor{keywordflow}{then}
1110       \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(time\_units) ) \textcolor{keywordflow}{then}
1111         interval\_value = \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}( interval, time\_units )
1112       \textcolor{keywordflow}{else}
1113         interval\_value = \hyperlink{interfacedc__date__generic_1_1evalbyunit}{evalbyunit}( interval, \hyperlink{namespacegtool__historyauto__internal_a6d2a47bd91b9ef5d9e721d386de12629}{time\_unit\_bycreate} )
1114 \textcolor{keywordflow}{      end if}
1115     \textcolor{keywordflow}{else}
1116       interval\_value = 1.0
1117 \textcolor{keywordflow}{    end if}
1118 
1119     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'origin=%f, terminus=%f, interval=%f'}, &
1120       & d = (/ origin\_value, terminus\_value, interval\_value /) )
1121 
1122     \textcolor{keyword}{call }\hyperlink{interfacegtool__historyauto__generic_1_1historyautoaddvariable}{historyautoaddvariable}( &
1123       & varname, dims, longname, \hyperlink{structdc__units_1_1units}{units}, &       \textcolor{comment}{! (in)}
1124       & xtype, time\_units, time\_average, &      \textcolor{comment}{! (in) optional}
1125       & file, &                                 \textcolor{comment}{! (in) optional}
1126       & origin = origin\_value, &                \textcolor{comment}{! (in) optional}
1127       & terminus = terminus\_value, &            \textcolor{comment}{! (in) optional}
1128       & interval = interval\_value, &            \textcolor{comment}{! (in) optional}
1129       & slice\_start = slice\_start, &            \textcolor{comment}{! (in) optional}
1130       & slice\_end = slice\_end, &                \textcolor{comment}{! (in) optional}
1131       & slice\_stride = slice\_stride, &          \textcolor{comment}{! (in) optional}
1132       & space\_average = space\_average, &        \textcolor{comment}{! (in) optional}
1133       & newfile\_interval = newfile\_interval )   \textcolor{comment}{! (in) optional}
1134 
1135 999 \textcolor{keywordflow}{continue}
1136     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c)
1137     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname, \textcolor{stringliteral}{'stat=%d'}, i = (/stat/) )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{historyautoaddvariable_8f90_ac9abbc23b8881c227fa7c6ea61724c27_cgraph}
\end{center}
\end{figure}
