\hypertarget{historyautoaddweight_8f90}{}\section{gtool/gtool\+\_\+historyauto/historyautoaddweight.f90 File Reference}
\label{historyautoaddweight_8f90}\index{gtool/gtool\+\_\+historyauto/historyautoaddweight.\+f90@{gtool/gtool\+\_\+historyauto/historyautoaddweight.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{historyautoaddweight_8f90_ad164bae91aaec4bb0398e2523ecac4ac}{historyautoaddweightreal} (dim, weight, units, xtype)
\item 
subroutine \hyperlink{historyautoaddweight_8f90_aa97f63e33c555853d2200a45b4c20562}{historyautoaddweightdouble} (dim, weight, units, xtype)
\item 
subroutine \hyperlink{historyautoaddweight_8f90_aedfabd57476a5f3194d23aca786ac5fd}{historyautoaddweightint} (dim, weight, units, xtype)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{historyautoaddweight_8f90_aa97f63e33c555853d2200a45b4c20562}\label{historyautoaddweight_8f90_aa97f63e33c555853d2200a45b4c20562}} 
\index{historyautoaddweight.\+f90@{historyautoaddweight.\+f90}!historyautoaddweightdouble@{historyautoaddweightdouble}}
\index{historyautoaddweightdouble@{historyautoaddweightdouble}!historyautoaddweight.\+f90@{historyautoaddweight.\+f90}}
\subsubsection{\texorpdfstring{historyautoaddweightdouble()}{historyautoaddweightdouble()}}
{\footnotesize\ttfamily subroutine historyautoaddweightdouble (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{dim,  }\item[{real(dp), dimension(\+:), intent(in)}]{weight,  }\item[{character($\ast$), intent(in), optional}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype }\end{DoxyParamCaption})}



Definition at line 164 of file historyautoaddweight.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::data\+\_\+weights, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+axes, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+weights, dc\+\_\+error\+::hst\+\_\+enoaxisname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numwgts, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, and gtool\+\_\+historyauto\+\_\+internal\+::wgtsuf.


\begin{DoxyCode}
164     \textcolor{comment}{!}
165     \textcolor{comment}{! 座標の重みデータを設定します. }
166     \textcolor{comment}{!}
167     \textcolor{comment}{! Set weights of axes. }
168     \textcolor{comment}{!}
169 
170     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}, &
171       & \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf}, \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}, \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}, 
      \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}
172     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyaxisaddattr}{historyaxisaddattr}, &
173       &                    \hyperlink{interfacegtool__history__generic_1_1historyvarinfocreate}{historyvarinfocreate}
174     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
175     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, &
176       & \hyperlink{namespacedc__error_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, \hyperlink{namespacedc__error_a5ef24ac85c92d6dd3ba8971818c392f2}{hst\_enoaxisname}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
177     \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}
178 
179     \textcolor{keywordtype}{implicit none}
180     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: dim
181                               \textcolor{comment}{! 座標重みを設定する座標の名称. }
182                               \textcolor{comment}{!}
183                               \textcolor{comment}{! ただし, ここで指定するもの}
184                               \textcolor{comment}{! は, HistoryAutoCreate の *dims*}
185                               \textcolor{comment}{! 既に指定されていなければなりません.}
186                               \textcolor{comment}{!}
187                               \textcolor{comment}{! Name of axis to which "weight" are set. }
188                               \textcolor{comment}{!}
189                               \textcolor{comment}{! Note that this value must be set }
190                               \textcolor{comment}{! as "dims" of "HistoryAutoCreate". }
191                               \textcolor{comment}{!}
192     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: weight(:)
193                               \textcolor{comment}{! 座標重みデータ. }
194                               \textcolor{comment}{!}
195                               \textcolor{comment}{! データ型は整数, 単精度実数型, }
196                               \textcolor{comment}{! 倍精度実数型のどれでもかまいません. }
197                               \textcolor{comment}{! ただし, ファイルへ出力される際には, }
198                               \textcolor{comment}{! xtype もしくは座標データの型へと}
199                               \textcolor{comment}{! 変換されます. }
200                               \textcolor{comment}{! }
201                               \textcolor{comment}{! Weight of axis. }
202                               \textcolor{comment}{! }
203                               \textcolor{comment}{! Integer, single or double precision are }
204                               \textcolor{comment}{! acceptable as data type. }
205                               \textcolor{comment}{! Note that when this is output to a file, }
206                               \textcolor{comment}{! data type is converted into "xtype" or }
207                               \textcolor{comment}{! type of the axis. }
208                               \textcolor{comment}{! }
209     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{structdc__units_1_1units}{units}
210                               \textcolor{comment}{! 座標重みの単位. }
211                               \textcolor{comment}{! 省略した場合には, 座標の単位が}
212                               \textcolor{comment}{! 使用されます. }
213                               \textcolor{comment}{!}
214                               \textcolor{comment}{! Units of axis weight.}
215                               \textcolor{comment}{! If this argument is omitted, }
216                               \textcolor{comment}{! unit of the dimension is used. }
217                               \textcolor{comment}{!}
218     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{optional}:: xtype
219                               \textcolor{comment}{! 座標重みのデータ型. }
220                               \textcolor{comment}{! 省略した場合には, 座標のデータ型が}
221                               \textcolor{comment}{! 使用されます. }
222                               \textcolor{comment}{! }
223                               \textcolor{comment}{! Data type of weight of the dimension. }
224                               \textcolor{comment}{! If this argument is omitted, }
225                               \textcolor{comment}{! data type of the dimension is used. }
226                               \textcolor{comment}{! }
227 
228     \textcolor{keywordtype}{character(STRING)}:: name, longname
229     \textcolor{keywordtype}{character(TOKEN)}:: dim\_units, dim\_xtype
230     \textcolor{keywordtype}{integer}:: dim\_size
231     \textcolor{keywordtype}{integer}:: stat, i
232     \textcolor{keywordtype}{character(STRING)}:: cause\_c
233     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoAddWeightDouble"}
234   \textcolor{keywordflow}{continue}
235     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'dim=<%c>'}, c1=trim(dim) )
236     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
237     cause\_c = \textcolor{stringliteral}{""}
238 
239     \textcolor{comment}{! 初期設定チェック}
240     \textcolor{comment}{! Check initialization}
241     \textcolor{comment}{!}
242     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
243       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
244       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
245       \textcolor{keywordflow}{goto} 999
246 \textcolor{keywordflow}{    end if}
247 
248     \textcolor{keywordflow}{do} i = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}
249       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
250         & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(i), &  \textcolor{comment}{! (in)}
251         & name = name, &           \textcolor{comment}{! (out)}
252         & \textcolor{keyword}{size} = dim\_size, &       \textcolor{comment}{! (out)}
253         & longname = longname, &   \textcolor{comment}{! (out)}
254         & \hyperlink{structdc__units_1_1units}{units} = dim\_units, &     \textcolor{comment}{! (out)}
255         & xtype = dim\_xtype )      \textcolor{comment}{! (out)}
256       \textcolor{keywordflow}{if} ( trim(dim) == trim(name) ) \textcolor{keywordflow}{then}
257         \textcolor{keywordflow}{if} ( dim\_size /= \textcolor{keyword}{size}(weight) ) \textcolor{keywordflow}{then}
258           stat = \hyperlink{namespacedc__error_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}
259           cause\_c = \textcolor{stringliteral}{'weight'}
260 \textcolor{keywordflow}{        end if}
261         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(\hyperlink{structdc__units_1_1units}{units}) ) dim\_units = \hyperlink{structdc__units_1_1units}{units}
262         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(xtype) ) dim\_xtype = xtype
263         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfocreate}{historyvarinfocreate}( &
264           & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1), &          \textcolor{comment}{! (out)}
265           & name = trim(dim) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf}, dims = (/ dim /), &  \textcolor{comment}{! (in)}
266           & longname = \textcolor{stringliteral}{'weight for integration or average in '} // &
267           &            trim(longname), &                     \textcolor{comment}{! (in)}
268           & \hyperlink{structdc__units_1_1units}{units} = dim\_units, xtype = dim\_xtype )           \textcolor{comment}{! (in)}
269 
270         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisaddattr}{historyaxisaddattr}( &
271           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(i), &        \textcolor{comment}{! (inout)}
272           & attrname = \textcolor{stringliteral}{'gt\_calc\_weight'}, & \textcolor{comment}{! (in)}
273           & \textcolor{keywordtype}{value} = trim(dim) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} )  \textcolor{comment}{! (in)}
274 
275         \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1) % a\_axis( dim\_size ) )
276         \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1) % a\_axis = weight
277 
278         \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} = \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1
279         \textcolor{keywordflow}{goto} 999
280 \textcolor{keywordflow}{      end if}
281 \textcolor{keywordflow}{    end do}
282 
283     stat = \hyperlink{namespacedc__error_a5ef24ac85c92d6dd3ba8971818c392f2}{hst\_enoaxisname}
284     cause\_c = dim
285     
286 999 \textcolor{keywordflow}{continue}
287     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c)
288     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{historyautoaddweight_8f90_aa97f63e33c555853d2200a45b4c20562_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoaddweight_8f90_aedfabd57476a5f3194d23aca786ac5fd}\label{historyautoaddweight_8f90_aedfabd57476a5f3194d23aca786ac5fd}} 
\index{historyautoaddweight.\+f90@{historyautoaddweight.\+f90}!historyautoaddweightint@{historyautoaddweightint}}
\index{historyautoaddweightint@{historyautoaddweightint}!historyautoaddweight.\+f90@{historyautoaddweight.\+f90}}
\subsubsection{\texorpdfstring{historyautoaddweightint()}{historyautoaddweightint()}}
{\footnotesize\ttfamily subroutine historyautoaddweightint (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{dim,  }\item[{integer, dimension(\+:), intent(in)}]{weight,  }\item[{character($\ast$), intent(in), optional}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype }\end{DoxyParamCaption})}



Definition at line 296 of file historyautoaddweight.\+f90.



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::data\+\_\+weights, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+axes, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+weights, dc\+\_\+error\+::hst\+\_\+enoaxisname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numwgts, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, and gtool\+\_\+historyauto\+\_\+internal\+::wgtsuf.


\begin{DoxyCode}
296     \textcolor{comment}{!}
297     \textcolor{comment}{! 座標の重みデータを設定します. }
298     \textcolor{comment}{!}
299     \textcolor{comment}{! Set weights of axes. }
300     \textcolor{comment}{!}
301 
302     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}, &
303       & \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf}, \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}, \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}, 
      \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}
304     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyaxisaddattr}{historyaxisaddattr}, &
305       &                    \hyperlink{interfacegtool__history__generic_1_1historyvarinfocreate}{historyvarinfocreate}
306     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
307     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, &
308       & \hyperlink{namespacedc__error_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, \hyperlink{namespacedc__error_a5ef24ac85c92d6dd3ba8971818c392f2}{hst\_enoaxisname}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
309     \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}
310 
311     \textcolor{keywordtype}{implicit none}
312     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: dim
313                               \textcolor{comment}{! 座標重みを設定する座標の名称. }
314                               \textcolor{comment}{!}
315                               \textcolor{comment}{! ただし, ここで指定するもの}
316                               \textcolor{comment}{! は, HistoryAutoCreate の *dims*}
317                               \textcolor{comment}{! 既に指定されていなければなりません.}
318                               \textcolor{comment}{!}
319                               \textcolor{comment}{! Name of axis to which "weight" are set. }
320                               \textcolor{comment}{!}
321                               \textcolor{comment}{! Note that this value must be set }
322                               \textcolor{comment}{! as "dims" of "HistoryAutoCreate". }
323                               \textcolor{comment}{!}
324     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: weight(:)
325                               \textcolor{comment}{! 座標重みデータ. }
326                               \textcolor{comment}{!}
327                               \textcolor{comment}{! データ型は整数, 単精度実数型, }
328                               \textcolor{comment}{! 倍精度実数型のどれでもかまいません. }
329                               \textcolor{comment}{! ただし, ファイルへ出力される際には, }
330                               \textcolor{comment}{! xtype もしくは座標データの型へと}
331                               \textcolor{comment}{! 変換されます. }
332                               \textcolor{comment}{! }
333                               \textcolor{comment}{! Weight of axis. }
334                               \textcolor{comment}{! }
335                               \textcolor{comment}{! Integer, single or double precision are }
336                               \textcolor{comment}{! acceptable as data type. }
337                               \textcolor{comment}{! Note that when this is output to a file, }
338                               \textcolor{comment}{! data type is converted into "xtype" or }
339                               \textcolor{comment}{! type of the axis. }
340                               \textcolor{comment}{! }
341     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{structdc__units_1_1units}{units}
342                               \textcolor{comment}{! 座標重みの単位. }
343                               \textcolor{comment}{! 省略した場合には, 座標の単位が}
344                               \textcolor{comment}{! 使用されます. }
345                               \textcolor{comment}{!}
346                               \textcolor{comment}{! Units of axis weight.}
347                               \textcolor{comment}{! If this argument is omitted, }
348                               \textcolor{comment}{! unit of the dimension is used. }
349                               \textcolor{comment}{!}
350     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{optional}:: xtype
351                               \textcolor{comment}{! 座標重みのデータ型. }
352                               \textcolor{comment}{! 省略した場合には, 座標のデータ型が}
353                               \textcolor{comment}{! 使用されます. }
354                               \textcolor{comment}{! }
355                               \textcolor{comment}{! Data type of weight of the dimension. }
356                               \textcolor{comment}{! If this argument is omitted, }
357                               \textcolor{comment}{! data type of the dimension is used. }
358                               \textcolor{comment}{! }
359 
360     \textcolor{keywordtype}{character(STRING)}:: name, longname
361     \textcolor{keywordtype}{character(TOKEN)}:: dim\_units, dim\_xtype
362     \textcolor{keywordtype}{integer}:: dim\_size
363     \textcolor{keywordtype}{integer}:: stat, i
364     \textcolor{keywordtype}{character(STRING)}:: cause\_c
365     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoAddWeightInt"}
366   \textcolor{keywordflow}{continue}
367     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'dim=<%c>'}, c1=trim(dim) )
368     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
369     cause\_c = \textcolor{stringliteral}{""}
370 
371     \textcolor{comment}{! 初期設定チェック}
372     \textcolor{comment}{! Check initialization}
373     \textcolor{comment}{!}
374     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
375       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
376       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
377       \textcolor{keywordflow}{goto} 999
378 \textcolor{keywordflow}{    end if}
379 
380     \textcolor{keywordflow}{do} i = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}
381       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
382         & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(i), &  \textcolor{comment}{! (in)}
383         & name = name, &           \textcolor{comment}{! (out)}
384         & \textcolor{keyword}{size} = dim\_size, &       \textcolor{comment}{! (out)}
385         & longname = longname, &   \textcolor{comment}{! (out)}
386         & \hyperlink{structdc__units_1_1units}{units} = dim\_units, &     \textcolor{comment}{! (out)}
387         & xtype = dim\_xtype )      \textcolor{comment}{! (out)}
388       \textcolor{keywordflow}{if} ( trim(dim) == trim(name) ) \textcolor{keywordflow}{then}
389         \textcolor{keywordflow}{if} ( dim\_size /= \textcolor{keyword}{size}(weight) ) \textcolor{keywordflow}{then}
390           stat = \hyperlink{namespacedc__error_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}
391           cause\_c = \textcolor{stringliteral}{'weight'}
392 \textcolor{keywordflow}{        end if}
393         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(\hyperlink{structdc__units_1_1units}{units}) ) dim\_units = \hyperlink{structdc__units_1_1units}{units}
394         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(xtype) ) dim\_xtype = xtype
395         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfocreate}{historyvarinfocreate}( &
396           & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1), &          \textcolor{comment}{! (out)}
397           & name = trim(dim) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf}, dims = (/ dim /), &  \textcolor{comment}{! (in)}
398           & longname = \textcolor{stringliteral}{'weight for integration or average in '} // &
399           &            trim(longname), &                     \textcolor{comment}{! (in)}
400           & \hyperlink{structdc__units_1_1units}{units} = dim\_units, xtype = dim\_xtype )           \textcolor{comment}{! (in)}
401 
402         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisaddattr}{historyaxisaddattr}( &
403           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(i), &        \textcolor{comment}{! (inout)}
404           & attrname = \textcolor{stringliteral}{'gt\_calc\_weight'}, & \textcolor{comment}{! (in)}
405           & \textcolor{keywordtype}{value} = trim(dim) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} )  \textcolor{comment}{! (in)}
406 
407         \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1) % a\_axis( dim\_size ) )
408         \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1) % a\_axis = weight
409 
410         \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} = \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1
411         \textcolor{keywordflow}{goto} 999
412 \textcolor{keywordflow}{      end if}
413 \textcolor{keywordflow}{    end do}
414 
415     stat = \hyperlink{namespacedc__error_a5ef24ac85c92d6dd3ba8971818c392f2}{hst\_enoaxisname}
416     cause\_c = dim
417     
418 999 \textcolor{keywordflow}{continue}
419     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c)
420     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{historyautoaddweight_8f90_aedfabd57476a5f3194d23aca786ac5fd_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyautoaddweight_8f90_ad164bae91aaec4bb0398e2523ecac4ac}\label{historyautoaddweight_8f90_ad164bae91aaec4bb0398e2523ecac4ac}} 
\index{historyautoaddweight.\+f90@{historyautoaddweight.\+f90}!historyautoaddweightreal@{historyautoaddweightreal}}
\index{historyautoaddweightreal@{historyautoaddweightreal}!historyautoaddweight.\+f90@{historyautoaddweight.\+f90}}
\subsubsection{\texorpdfstring{historyautoaddweightreal()}{historyautoaddweightreal()}}
{\footnotesize\ttfamily subroutine historyautoaddweightreal (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{dim,  }\item[{real, dimension(\+:), intent(in)}]{weight,  }\item[{character($\ast$), intent(in), optional}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype }\end{DoxyParamCaption})}



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



References dc\+\_\+trace\+::beginsub(), gtool\+\_\+historyauto\+\_\+internal\+::data\+\_\+weights, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::gt\+\_\+eargsizemismatch, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+axes, gtool\+\_\+historyauto\+\_\+internal\+::gthst\+\_\+weights, dc\+\_\+error\+::hst\+\_\+enoaxisname, gtool\+\_\+historyauto\+\_\+internal\+::initialized, gtool\+\_\+historyauto\+\_\+internal\+::numdims, gtool\+\_\+historyauto\+\_\+internal\+::numwgts, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, and gtool\+\_\+historyauto\+\_\+internal\+::wgtsuf.


\begin{DoxyCode}
32     \textcolor{comment}{!}
33     \textcolor{comment}{! 座標の重みデータを設定します. }
34     \textcolor{comment}{!}
35     \textcolor{comment}{! Set weights of axes. }
36     \textcolor{comment}{!}
37 
38     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__historyauto__internal}{gtool\_historyauto\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized}, 
      \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}, \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts}, &
39       & \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf}, \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}, \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}, 
      \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}
40     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}, 
      \hyperlink{interfacegtool__history__generic_1_1historyaxisaddattr}{historyaxisaddattr}, &
41       &                    \hyperlink{interfacegtool__history__generic_1_1historyvarinfocreate}{historyvarinfocreate}
42     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
43     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, &
44       & \hyperlink{namespacedc__error_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}, \hyperlink{namespacedc__error_a5ef24ac85c92d6dd3ba8971818c392f2}{hst\_enoaxisname}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
45     \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}
46 
47     \textcolor{keywordtype}{implicit none}
48     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: dim
49                               \textcolor{comment}{! 座標重みを設定する座標の名称. }
50                               \textcolor{comment}{!}
51                               \textcolor{comment}{! ただし, ここで指定するもの}
52                               \textcolor{comment}{! は, HistoryAutoCreate の *dims*}
53                               \textcolor{comment}{! 既に指定されていなければなりません.}
54                               \textcolor{comment}{!}
55                               \textcolor{comment}{! Name of axis to which "weight" are set. }
56                               \textcolor{comment}{!}
57                               \textcolor{comment}{! Note that this value must be set }
58                               \textcolor{comment}{! as "dims" of "HistoryAutoCreate". }
59                               \textcolor{comment}{!}
60     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: weight(:)
61                               \textcolor{comment}{! 座標重みデータ. }
62                               \textcolor{comment}{!}
63                               \textcolor{comment}{! データ型は整数, 単精度実数型, }
64                               \textcolor{comment}{! 倍精度実数型のどれでもかまいません. }
65                               \textcolor{comment}{! ただし, ファイルへ出力される際には, }
66                               \textcolor{comment}{! xtype もしくは座標データの型へと}
67                               \textcolor{comment}{! 変換されます. }
68                               \textcolor{comment}{! }
69                               \textcolor{comment}{! Weight of axis. }
70                               \textcolor{comment}{! }
71                               \textcolor{comment}{! Integer, single or double precision are }
72                               \textcolor{comment}{! acceptable as data type. }
73                               \textcolor{comment}{! Note that when this is output to a file, }
74                               \textcolor{comment}{! data type is converted into "xtype" or }
75                               \textcolor{comment}{! type of the axis. }
76                               \textcolor{comment}{! }
77     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{structdc__units_1_1units}{units}
78                               \textcolor{comment}{! 座標重みの単位. }
79                               \textcolor{comment}{! 省略した場合には, 座標の単位が}
80                               \textcolor{comment}{! 使用されます. }
81                               \textcolor{comment}{!}
82                               \textcolor{comment}{! Units of axis weight.}
83                               \textcolor{comment}{! If this argument is omitted, }
84                               \textcolor{comment}{! unit of the dimension is used. }
85                               \textcolor{comment}{!}
86     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{optional}:: xtype
87                               \textcolor{comment}{! 座標重みのデータ型. }
88                               \textcolor{comment}{! 省略した場合には, 座標のデータ型が}
89                               \textcolor{comment}{! 使用されます. }
90                               \textcolor{comment}{! }
91                               \textcolor{comment}{! Data type of weight of the dimension. }
92                               \textcolor{comment}{! If this argument is omitted, }
93                               \textcolor{comment}{! data type of the dimension is used. }
94                               \textcolor{comment}{! }
95 
96     \textcolor{keywordtype}{character(STRING)}:: name, longname
97     \textcolor{keywordtype}{character(TOKEN)}:: dim\_units, dim\_xtype
98     \textcolor{keywordtype}{integer}:: dim\_size
99     \textcolor{keywordtype}{integer}:: stat, i
100     \textcolor{keywordtype}{character(STRING)}:: cause\_c
101     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryAutoAddWeightReal"}
102   \textcolor{keywordflow}{continue}
103     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname, \textcolor{stringliteral}{'dim=<%c>'}, c1=trim(dim) )
104     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
105     cause\_c = \textcolor{stringliteral}{""}
106 
107     \textcolor{comment}{! 初期設定チェック}
108     \textcolor{comment}{! Check initialization}
109     \textcolor{comment}{!}
110     \textcolor{keywordflow}{if} ( .not. \hyperlink{interfacegtool__history__generic_1_1initialized}{initialized} ) \textcolor{keywordflow}{then}
111       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
112       cause\_c = \textcolor{stringliteral}{'gtool\_historyauto'}
113       \textcolor{keywordflow}{goto} 999
114 \textcolor{keywordflow}{    end if}
115 
116     \textcolor{keywordflow}{do} i = 1, \hyperlink{namespacegtool__historyauto__internal_a01aef0b641b5a9d9a74b18908aa47edb}{numdims}
117       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisinquire}{historyaxisinquire}( &
118         & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(i), &  \textcolor{comment}{! (in)}
119         & name = name, &           \textcolor{comment}{! (out)}
120         & \textcolor{keyword}{size} = dim\_size, &       \textcolor{comment}{! (out)}
121         & longname = longname, &   \textcolor{comment}{! (out)}
122         & \hyperlink{structdc__units_1_1units}{units} = dim\_units, &     \textcolor{comment}{! (out)}
123         & xtype = dim\_xtype )      \textcolor{comment}{! (out)}
124       \textcolor{keywordflow}{if} ( trim(dim) == trim(name) ) \textcolor{keywordflow}{then}
125         \textcolor{keywordflow}{if} ( dim\_size /= \textcolor{keyword}{size}(weight) ) \textcolor{keywordflow}{then}
126           stat = \hyperlink{namespacedc__error_aa11b8065198295505e35eb5a1e1436a4}{gt\_eargsizemismatch}
127           cause\_c = \textcolor{stringliteral}{'weight'}
128 \textcolor{keywordflow}{        end if}
129         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(\hyperlink{structdc__units_1_1units}{units}) ) dim\_units = \hyperlink{structdc__units_1_1units}{units}
130         \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(xtype) ) dim\_xtype = xtype
131         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfocreate}{historyvarinfocreate}( &
132           & varinfo = \hyperlink{namespacegtool__historyauto__internal_ab912d1857aa08f0ed0328bd6cd19270a}{gthst\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1), &          \textcolor{comment}{! (out)}
133           & name = trim(dim) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf}, dims = (/ dim /), &  \textcolor{comment}{! (in)}
134           & longname = \textcolor{stringliteral}{'weight for integration or average in '} // &
135           &            trim(longname), &                     \textcolor{comment}{! (in)}
136           & \hyperlink{structdc__units_1_1units}{units} = dim\_units, xtype = dim\_xtype )           \textcolor{comment}{! (in)}
137 
138         \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyaxisaddattr}{historyaxisaddattr}( &
139           & axis = \hyperlink{namespacegtool__historyauto__internal_ada7a49a17970ad9d96e320bb53420325}{gthst\_axes}(i), &        \textcolor{comment}{! (inout)}
140           & attrname = \textcolor{stringliteral}{'gt\_calc\_weight'}, & \textcolor{comment}{! (in)}
141           & \textcolor{keywordtype}{value} = trim(dim) // \hyperlink{namespacegtool__historyauto__internal_a6727d46b782ecdf84b054c46c601faff}{wgtsuf} )  \textcolor{comment}{! (in)}
142 
143         \textcolor{keyword}{allocate}( \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1) % a\_axis( dim\_size ) )
144         \hyperlink{namespacegtool__historyauto__internal_ab4a4d914908bc4d226c6e00f22ab681a}{data\_weights}(\hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1) % a\_axis = weight
145 
146         \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} = \hyperlink{namespacegtool__historyauto__internal_ac0846e320d7181ab21f8ef8d482a6a26}{numwgts} + 1
147         \textcolor{keywordflow}{goto} 999
148 \textcolor{keywordflow}{      end if}
149 \textcolor{keywordflow}{    end do}
150 
151     stat = \hyperlink{namespacedc__error_a5ef24ac85c92d6dd3ba8971818c392f2}{hst\_enoaxisname}
152     cause\_c = dim
153     
154 999 \textcolor{keywordflow}{continue}
155     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, cause\_c = cause\_c)
156     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{historyautoaddweight_8f90_ad164bae91aaec4bb0398e2523ecac4ac_cgraph}
\end{center}
\end{figure}
