\hypertarget{interfacedc__trace_1_1datadump}{}\section{dc\+\_\+trace\+:\+:datadump Interface Reference}
\label{interfacedc__trace_1_1datadump}\index{dc\+\_\+trace\+::datadump@{dc\+\_\+trace\+::datadump}}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacedc__trace_1_1datadump_ae7508c026e3148f663afa245b1cd4ab2}{datad1dump} (header, d, strlen, multi)
\item 
subroutine \hyperlink{interfacedc__trace_1_1datadump_a22b2baf1ea1f01ee6413f65d56570e1c}{datad2dump} (header, d, strlen, multi)
\item 
subroutine \hyperlink{interfacedc__trace_1_1datadump_a49f9192c31103d8ba0cd5f30cf5206ae}{datad3dump} (header, d, strlen, multi)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 205 of file dc\+\_\+trace.\+f90.



\subsection{Member Function/\+Subroutine Documentation}
\mbox{\Hypertarget{interfacedc__trace_1_1datadump_ae7508c026e3148f663afa245b1cd4ab2}\label{interfacedc__trace_1_1datadump_ae7508c026e3148f663afa245b1cd4ab2}} 
\index{dc\+\_\+trace\+::datadump@{dc\+\_\+trace\+::datadump}!datad1dump@{datad1dump}}
\index{datad1dump@{datad1dump}!dc\+\_\+trace\+::datadump@{dc\+\_\+trace\+::datadump}}
\subsubsection{\texorpdfstring{datad1dump()}{datad1dump()}}
{\footnotesize\ttfamily subroutine dc\+\_\+trace\+::datadump\+::datad1dump (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{header,  }\item[{real(dp), dimension(\+:), intent(in)}]{d,  }\item[{integer, intent(in), optional}]{strlen,  }\item[{integer, dimension(\+:), intent(in), optional}]{multi }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 552 of file dc\+\_\+trace.\+f90.


\begin{DoxyCode}
552     \textcolor{comment}{!}
553     \textcolor{comment}{!== 1 次元データ出力}
554     \textcolor{comment}{!}
555     \textcolor{comment}{! デバッグメッセージとして、多次元データ d (倍精度実数型)}
556     \textcolor{comment}{! を出力します。 文字型変数 header は出力時の頭文字として利用されます。}
557     \textcolor{comment}{! 整数型配列 strlen を与える事で、一行の文字数を指定できます}
558     \textcolor{comment}{! (デフォルトの文字数は dc\_types#STRING で指定されています)。}
559     \textcolor{comment}{! 整数型配列 multi(:) を与えることで、}
560     \textcolor{comment}{! header の後ろに次元添字をつける事が可能です。}
561     \textcolor{comment}{!}
562     \textcolor{comment}{! 利用例に関しては dc\_trace の Example を参照して下さい。}
563     \textcolor{comment}{!}
564     \textcolor{comment}{!--}
565     \textcolor{comment}{!== 開発者向け解説}
566     \textcolor{comment}{!}
567     \textcolor{comment}{! このサブルーチンを用いても、このモジュール内で内部的に保持される}
568     \textcolor{comment}{! 整数型変数 level の値は変化しません。}
569     \textcolor{comment}{!}
570     \textcolor{comment}{!++}
571     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{,      only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
572     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{,     only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
573     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}          :: header  \textcolor{comment}{! データの名称}
574     \textcolor{keywordtype}{real(DP)},     \textcolor{keywordtype}{intent(in)}          :: d(:)    \textcolor{comment}{! 倍精度実数１次元データ}
575     \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: strlen  \textcolor{comment}{! 一行の文字数}
576     \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: multi(:)\textcolor{comment}{! 上位の次元添字}
577     \textcolor{keywordtype}{integer}          :: i, j
578     \textcolor{keywordtype}{character(STRING)}:: unit    \textcolor{comment}{! データ文字列}
579     \textcolor{keywordtype}{character(STRING)}:: unitbuf \textcolor{comment}{! データ文字列バッファ}
580     \textcolor{keywordtype}{integer}          :: ucur    \textcolor{comment}{! unit に書かれた文字数}
581     \textcolor{keywordtype}{character(STRING)}:: cbuf    \textcolor{comment}{! read/write 文のバッファ}
582     \textcolor{keywordtype}{integer}          :: stat    \textcolor{comment}{! ステータス}
583     \textcolor{keywordtype}{logical}  :: first  \textcolor{comment}{! 1つ目のデータかどうか}
584     \textcolor{keywordtype}{integer}  :: begini \textcolor{comment}{! 1つ目のデータの添字}
585     \textcolor{keywordtype}{integer}  :: endi   \textcolor{comment}{! 最後のデータの添字}
586     \textcolor{keywordtype}{character(STRING)}:: cmulti \textcolor{comment}{! 次元添字用文字列}
587     \textcolor{keywordtype}{character(STRING)}:: cout   \textcolor{comment}{! 出力する文字列}
588     \textcolor{keywordtype}{character(STRING)}:: meshead\_tmp
589     \textcolor{keywordtype}{integer}          :: meshead\_len
590   \textcolor{keywordflow}{continue}
591     \textcolor{keywordflow}{if} ( dbg < 0 ) \textcolor{keywordflow}{return}
592     \textcolor{comment}{! 初期化}
593     unit    = \textcolor{stringliteral}{''}
594     unitbuf = \textcolor{stringliteral}{''}
595     ucur    = 0
596     stat    = 0
597     first = .true.
598     cmulti = \textcolor{stringliteral}{''}
599     \textcolor{comment}{! デバッグメッセージヘッダの作成。}
600     \textcolor{keywordflow}{if} (level < 1) \textcolor{keywordflow}{then}
601       meshead\_tmp = \textcolor{stringliteral}{''}
602       meshead\_len = 0
603     \textcolor{keywordflow}{else}
604       meshead\_tmp = meshead
605       meshead\_len = len(meshead)
606 \textcolor{keywordflow}{    endif}
607     \textcolor{comment}{! 次元添字用文字列を作成}
608     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(multi)) \textcolor{keywordflow}{then}
609       \textcolor{keywordflow}{do} j = 1, \textcolor{keyword}{size}(multi)
610         cmulti = trim(cmulti) // \textcolor{stringliteral}{', '} // trim(  \hyperlink{interfacedc__string_1_1tochar}{tochar}( multi(j) )  )
611 \textcolor{keywordflow}{      enddo}
612 \textcolor{keywordflow}{    endif}
613     i = 1
614     dim\_1\_loop : \textcolor{keywordflow}{do}
615       \textcolor{keywordflow}{if} (first) begini = i
616 \textcolor{keyword}{      end}i = i
617       \textcolor{keyword}{write}(cbuf, \textcolor{stringliteral}{"(g40.20)"}) d(i)
618       \textcolor{keywordflow}{if} (.not. first) cbuf = \textcolor{stringliteral}{', '} // adjustl(cbuf)
619       unitbuf = unit
620       \textcolor{keyword}{call }\hyperlink{dcstringsprintf_8f90_a2cd5d7358ae4c2f53624aced7d4e3ffc}{append}(unit, ucur, trim(adjustl(cbuf)), stat, strlen)
621       \textcolor{keywordflow}{if} ( stat /= 0 .or. i == \textcolor{keyword}{size}( d(:) ) ) \textcolor{keywordflow}{then}
622         \textcolor{comment}{! 一回目は、文字数オーバーでもそのまま出力。}
623         \textcolor{keywordflow}{if} (first) \textcolor{keywordflow}{then}
624           cout = header // \textcolor{stringliteral}{'('} &
625             &   // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(begini)) &
626             &   // trim(cmulti) &
627             &   // \textcolor{stringliteral}{')='} // trim(unit)
628           \textcolor{comment}{! 二回目以降は、オーバーしたものは次回へ}
629         \textcolor{keywordflow}{elseif} (stat /= 0 .and. begini == endi-1) \textcolor{keywordflow}{then}
630           cout = header // \textcolor{stringliteral}{'('} &
631             &   // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(begini)) &
632             &   // trim(cmulti) &
633             &   // \textcolor{stringliteral}{')='}// trim(unitbuf)
634           \textcolor{comment}{! 1つ巻戻す}
635           i = i - 1
636         \textcolor{keywordflow}{elseif} (stat /= 0 .and. begini /= endi-1) \textcolor{keywordflow}{then}
637           cout = header // \textcolor{stringliteral}{'('} &
638             &   // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(begini)) // \textcolor{stringliteral}{'-'} &
639             &   // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(endi-1)) &
640             &   // trim(cmulti) &
641             &   // \textcolor{stringliteral}{')='} // trim(unitbuf)
642           \textcolor{comment}{! 1つ巻戻す}
643           i = i - 1
644           \textcolor{comment}{! i が size(d) まで到達した場合もそのまま出力。}
645         \textcolor{keywordflow}{elseif} ( i == \textcolor{keyword}{size}( d(:) ) ) \textcolor{keywordflow}{then}
646           cout = header // \textcolor{stringliteral}{'('} &
647             &   // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(begini)) // \textcolor{stringliteral}{'-'} &
648             &   // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(endi))   &
649             &   // trim(cmulti) &
650             &   // \textcolor{stringliteral}{')='}// trim(unit)
651 \textcolor{keywordflow}{        endif}
652         \textcolor{keyword}{write}(dbg, \textcolor{stringliteral}{"(A, A, A, A)"}) & 
653           & trim(head), repeat( indent, \hyperlink{interfacedc__date__generic_1_1max}{max}(level-1, 0) ), &
654           & meshead\_tmp(1:meshead\_len), trim(cout)
655         \textcolor{comment}{! unit, unitbuf をクリア}
656         unit    = \textcolor{stringliteral}{''}
657         unitbuf = \textcolor{stringliteral}{''}
658         ucur    = 0
659         first = .true.
660       \textcolor{keywordflow}{else}
661         first = .false.
662 \textcolor{keywordflow}{      endif}
663       \textcolor{keywordflow}{if} (i == \textcolor{keyword}{size}( d(:) ) ) \textcolor{keywordflow}{exit} dim\_1\_loop
664       i = i + 1
665 \textcolor{keywordflow}{    enddo} dim\_1\_loop
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__trace_1_1datadump_a22b2baf1ea1f01ee6413f65d56570e1c}\label{interfacedc__trace_1_1datadump_a22b2baf1ea1f01ee6413f65d56570e1c}} 
\index{dc\+\_\+trace\+::datadump@{dc\+\_\+trace\+::datadump}!datad2dump@{datad2dump}}
\index{datad2dump@{datad2dump}!dc\+\_\+trace\+::datadump@{dc\+\_\+trace\+::datadump}}
\subsubsection{\texorpdfstring{datad2dump()}{datad2dump()}}
{\footnotesize\ttfamily subroutine dc\+\_\+trace\+::datadump\+::datad2dump (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{header,  }\item[{real(dp), dimension(\+:,\+:), intent(in)}]{d,  }\item[{integer, intent(in), optional}]{strlen,  }\item[{integer, dimension(\+:), intent(in), optional}]{multi }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 668 of file dc\+\_\+trace.\+f90.


\begin{DoxyCode}
668     \textcolor{comment}{!}
669     \textcolor{comment}{!== 2 次元データ出力}
670     \textcolor{comment}{!}
671     \textcolor{comment}{! 詳しくは DataDump または DataD1Dump を参照ください。}
672     \textcolor{comment}{!}
673     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{,      only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
674     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}          :: header  \textcolor{comment}{! データの名称}
675     \textcolor{keywordtype}{real(DP)},     \textcolor{keywordtype}{intent(in)}          :: d(:,:)  \textcolor{comment}{! 倍精度実数２次元データ}
676     \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: strlen  \textcolor{comment}{! 一行の文字数}
677     \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: multi(:)\textcolor{comment}{! 上位の次元添字}
678     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable} :: total(:)
679     \textcolor{keywordtype}{integer}              :: j
680   \textcolor{keywordflow}{continue}
681     \textcolor{keywordflow}{if} ( dbg < 0 ) \textcolor{keywordflow}{return}
682     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(multi)) \textcolor{keywordflow}{then}
683       \textcolor{keyword}{allocate}( total(\textcolor{keyword}{size}(multi)+1) )
684       total(2:\textcolor{keyword}{size}(multi)+1) = multi(:)
685     \textcolor{keywordflow}{else}
686       \textcolor{keyword}{allocate}( total(1) )
687 \textcolor{keywordflow}{    endif}
688     \textcolor{keywordflow}{do} j = 1, \textcolor{keyword}{size}( d(:,:), 2 )
689       total(1) = j
690       \textcolor{keyword}{call }\hyperlink{interfacedc__trace_1_1datadump}{datadump}(header, d(:,j), strlen=strlen, multi=total(:))
691 \textcolor{keywordflow}{    enddo}
692     \textcolor{keyword}{deallocate}( total )
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__trace_1_1datadump_a49f9192c31103d8ba0cd5f30cf5206ae}\label{interfacedc__trace_1_1datadump_a49f9192c31103d8ba0cd5f30cf5206ae}} 
\index{dc\+\_\+trace\+::datadump@{dc\+\_\+trace\+::datadump}!datad3dump@{datad3dump}}
\index{datad3dump@{datad3dump}!dc\+\_\+trace\+::datadump@{dc\+\_\+trace\+::datadump}}
\subsubsection{\texorpdfstring{datad3dump()}{datad3dump()}}
{\footnotesize\ttfamily subroutine dc\+\_\+trace\+::datadump\+::datad3dump (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{header,  }\item[{real(dp), dimension(\+:,\+:,\+:), intent(in)}]{d,  }\item[{integer, intent(in), optional}]{strlen,  }\item[{integer, dimension(\+:), intent(in), optional}]{multi }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 695 of file dc\+\_\+trace.\+f90.


\begin{DoxyCode}
695     \textcolor{comment}{!}
696     \textcolor{comment}{!== 3 次元データ出力}
697     \textcolor{comment}{!}
698     \textcolor{comment}{! 詳しくは DataDump または DataD1Dump を参照ください。}
699     \textcolor{comment}{!}
700     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{,      only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
701     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}          :: header  \textcolor{comment}{! データの名称}
702     \textcolor{keywordtype}{real(DP)},     \textcolor{keywordtype}{intent(in)}          :: d(:,:,:)\textcolor{comment}{! 倍精度実数３次元データ}
703     \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: strlen  \textcolor{comment}{! 一行の文字数}
704     \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: multi(:)\textcolor{comment}{! 上位の次元添字}
705     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable} :: total(:)
706     \textcolor{keywordtype}{integer}              :: k
707   \textcolor{keywordflow}{continue}
708     \textcolor{keywordflow}{if} ( dbg < 0 ) \textcolor{keywordflow}{return}
709     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(multi)) \textcolor{keywordflow}{then}
710       \textcolor{keyword}{allocate}( total(\textcolor{keyword}{size}(multi)+1) )
711       total(2:\textcolor{keyword}{size}(multi)+1) = multi(:)
712     \textcolor{keywordflow}{else}
713       \textcolor{keyword}{allocate}( total(1) )
714 \textcolor{keywordflow}{    endif}
715     \textcolor{keywordflow}{do} k = 1, \textcolor{keyword}{size}( d(:,:,:), 3 )
716       total(1) = k
717       \textcolor{keyword}{call }\hyperlink{interfacedc__trace_1_1datadump}{datadump}(header, d(:,:,k), strlen=strlen, multi=total(:))
718 \textcolor{keywordflow}{    enddo}
719     \textcolor{keyword}{deallocate}( total )
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
dc\+\_\+utils/\hyperlink{dc__trace_8f90}{dc\+\_\+trace.\+f90}\end{DoxyCompactItemize}
