\hypertarget{namespaceua__mpi__module__spectrum}{}\doxysection{ua\+\_\+mpi\+\_\+module\+\_\+spectrum Module Reference}
\label{namespaceua__mpi__module__spectrum}\index{ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}}
\doxysubsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
real(8) function, dimension(0\+:nm,-\/nm\+:nm, size(ua\+\_\+strfunc, 2)), public \mbox{\hyperlink{namespaceua__mpi__module__spectrum_a8b8ebd0b6a3645dc435447d5a93af6ac}{nma\+\_\+energyfromstreamfunc\+\_\+ua}} (ua\+\_\+\+Strfunc)
\item 
real(8) function, dimension(0\+:nm, size(ua\+\_\+strfunc, 2)), public \mbox{\hyperlink{namespaceua__mpi__module__spectrum_aea9aa121f578244f45f313874fbed0b1}{na\+\_\+energyfromstreamfunc\+\_\+ua}} (ua\+\_\+\+Strfunc)
\item 
real(8) function, dimension(0\+:nm,-\/nm\+:nm, size(ua\+\_\+strfunc, 2)), public \mbox{\hyperlink{namespaceua__mpi__module__spectrum_a1302b25d38f9ed99c6e1b6199db91056}{nma\+\_\+enstrophyfromstreamfunc\+\_\+ua}} (ua\+\_\+\+Strfunc)
\item 
real(8) function, dimension(0\+:nm, size(ua\+\_\+strfunc, 2)), public \mbox{\hyperlink{namespaceua__mpi__module__spectrum_a9bc2351d8fa136eec74b3c4eaeb031fa}{na\+\_\+enstrophyfromstreamfunc\+\_\+ua}} (ua\+\_\+\+Strfunc)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
real(8), public \mbox{\hyperlink{namespaceua__mpi__module__spectrum_aa0e061f3e289130166efea2a391a3400}{ua\+\_\+spectrum\+\_\+vmiss}} = -\/999.\+000
\end{DoxyCompactItemize}


\doxysubsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespaceua__mpi__module__spectrum_aea9aa121f578244f45f313874fbed0b1}\label{namespaceua__mpi__module__spectrum_aea9aa121f578244f45f313874fbed0b1}} 
\index{ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}!na\_energyfromstreamfunc\_ua@{na\_energyfromstreamfunc\_ua}}
\index{na\_energyfromstreamfunc\_ua@{na\_energyfromstreamfunc\_ua}!ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}}
\doxysubsubsection{\texorpdfstring{na\_energyfromstreamfunc\_ua()}{na\_energyfromstreamfunc\_ua()}}
{\footnotesize\ttfamily real(8) function, dimension(0\+:nm,size(ua\+\_\+strfunc,2)), public ua\+\_\+mpi\+\_\+module\+\_\+spectrum\+::na\+\_\+energyfromstreamfunc\+\_\+ua (\begin{DoxyParamCaption}\item[{real(8), dimension(\+:,\+:), intent(in)}]{ua\+\_\+\+Strfunc }\end{DoxyParamCaption})}



Definition at line 126 of file ua\+\_\+mpi\+\_\+module\+\_\+spectrum.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{126       \textcolor{comment}{!}}
\DoxyCodeLine{127       \textcolor{comment}{! 流線関数のスペクトルデータから各全波数のエネルギー成分(スペクトル)を}}
\DoxyCodeLine{128       \textcolor{comment}{! 計算する(1 層用).}}
\DoxyCodeLine{129       \textcolor{comment}{!}}
\DoxyCodeLine{130       \textcolor{comment}{!  * 全波数 n の流線関数のスペクトル成分ψ(n,m) から}}
\DoxyCodeLine{131       \textcolor{comment}{!    エネルギースペクトルはΣ[m=-\/nm]\string^nm(1/2)n(n+1)|ψ(n,m)|\string^2}}
\DoxyCodeLine{132       \textcolor{comment}{!    と計算される.}}
\DoxyCodeLine{133       \textcolor{comment}{!}}
\DoxyCodeLine{134       \textcolor{comment}{!  * 全てのエネルギースペクトル成分の和に 4πをかけたものが}}
\DoxyCodeLine{135       \textcolor{comment}{!    球面上での全エネルギーに等しい.}}
\DoxyCodeLine{136       \textcolor{comment}{!}}
\DoxyCodeLine{137 }
\DoxyCodeLine{138 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{intent(in)}      :: ua\_Strfunc(:,:)}
\DoxyCodeLine{139       \textcolor{comment}{!(in) 流線関数(スペクトルデータ)}}
\DoxyCodeLine{140 }
\DoxyCodeLine{141 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{dimension(0:nm,size(ua\_Strfunc,2))} :: na\_EnergyFromStreamfunc\_ua}
\DoxyCodeLine{142       \textcolor{comment}{!(out) エネルギースペクトル (水平全波数 n 空間)}}
\DoxyCodeLine{143 }
\DoxyCodeLine{144 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{dimension(0:nm,size(ua\_Strfunc,2))} :: na\_Work \textcolor{comment}{! 作業領域}}
\DoxyCodeLine{145 }
\DoxyCodeLine{146       \textcolor{keywordtype}{integer} :: l, n, m, nm\_ary(2)}
\DoxyCodeLine{147 \textcolor{keywordtype}{      real}(8) :: factor}
\DoxyCodeLine{148 }
\DoxyCodeLine{149       \textcolor{keywordtype}{integer} :: ierr}
\DoxyCodeLine{150 }
\DoxyCodeLine{151       na\_work = 0.0d0}
\DoxyCodeLine{152       \textcolor{keywordflow}{do} l=1,nmc}
\DoxyCodeLine{153          nm\_ary = nm\_l(l+nms-\/1)}
\DoxyCodeLine{154          n = nm\_ary(1) ; m = abs(nm\_ary(2))}
\DoxyCodeLine{155          \textcolor{keywordflow}{if} ( n .ge. 0 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{156             \textcolor{keywordflow}{if} ( m == 0 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{157                factor = 1.0d0}
\DoxyCodeLine{158             \textcolor{keywordflow}{else}}
\DoxyCodeLine{159                factor = 2.0d0}
\DoxyCodeLine{160 \textcolor{keywordflow}{            endif}}
\DoxyCodeLine{161             na\_work(n,:) = na\_work(n,:) \&}
\DoxyCodeLine{162                  + factor * 0.5 * n*(n+1) * ua\_strfunc(l,:)**2}
\DoxyCodeLine{163 \textcolor{keywordflow}{         endif}}
\DoxyCodeLine{164 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{165 }
\DoxyCodeLine{166       \textcolor{keyword}{CALL }mpi\_allreduce(na\_work,na\_energyfromstreamfunc\_ua,\&}
\DoxyCodeLine{167                          (int(nm)+1)*\textcolor{keyword}{size}(ua\_strfunc,2), \&}
\DoxyCodeLine{168                          mpi\_real8,mpi\_sum,mpi\_comm\_w,ierr)}
\DoxyCodeLine{169 }

\end{DoxyCode}


References ua\+\_\+mpi\+\_\+module\+\_\+base\+::mpi\+\_\+comm\+\_\+w, w\+\_\+mpi\+\_\+module\+\_\+base\+::nm, ua\+\_\+mpi\+\_\+module\+\_\+base\+::nmc, and ua\+\_\+mpi\+\_\+module\+\_\+base\+::nms.

\mbox{\Hypertarget{namespaceua__mpi__module__spectrum_a9bc2351d8fa136eec74b3c4eaeb031fa}\label{namespaceua__mpi__module__spectrum_a9bc2351d8fa136eec74b3c4eaeb031fa}} 
\index{ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}!na\_enstrophyfromstreamfunc\_ua@{na\_enstrophyfromstreamfunc\_ua}}
\index{na\_enstrophyfromstreamfunc\_ua@{na\_enstrophyfromstreamfunc\_ua}!ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}}
\doxysubsubsection{\texorpdfstring{na\_enstrophyfromstreamfunc\_ua()}{na\_enstrophyfromstreamfunc\_ua()}}
{\footnotesize\ttfamily real(8) function, dimension(0\+:nm,size(ua\+\_\+strfunc,2)), public ua\+\_\+mpi\+\_\+module\+\_\+spectrum\+::na\+\_\+enstrophyfromstreamfunc\+\_\+ua (\begin{DoxyParamCaption}\item[{real(8), dimension(\+:,\+:), intent(in)}]{ua\+\_\+\+Strfunc }\end{DoxyParamCaption})}



Definition at line 232 of file ua\+\_\+mpi\+\_\+module\+\_\+spectrum.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{232       \textcolor{comment}{!}}
\DoxyCodeLine{233       \textcolor{comment}{! 流線関数のスペクトルデータから各全波数のエネルギー成分(スペクトル)を}}
\DoxyCodeLine{234       \textcolor{comment}{! 計算する(1 層用)}}
\DoxyCodeLine{235       \textcolor{comment}{!}}
\DoxyCodeLine{236       \textcolor{comment}{! * 全波数 n の流線関数のスペクトル成分ψ(n,m) からエンストロフィー}}
\DoxyCodeLine{237       \textcolor{comment}{!   スペクトルはΣ[m=-\/nm]\string^nm(1/2)n\string^2(n+1)\string^2|ψ(n,m)|\string^2 と計算される.}}
\DoxyCodeLine{238       \textcolor{comment}{!}}
\DoxyCodeLine{239       \textcolor{comment}{! * 全てのエネルギースペクトル成分の和に 4π/R\string^2 をかけたものが}}
\DoxyCodeLine{240       \textcolor{comment}{!   球面上での全エンストフィーに等しい.}}
\DoxyCodeLine{241       \textcolor{comment}{!}}
\DoxyCodeLine{242 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{intent(in)}      :: ua\_Strfunc(:,:)}
\DoxyCodeLine{243       \textcolor{comment}{!(in) 流線関数(スペクトルデータ)}}
\DoxyCodeLine{244 }
\DoxyCodeLine{245 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{dimension(0:nm,size(ua\_Strfunc,2))} :: na\_EnstrophyFromStreamfunc\_ua}
\DoxyCodeLine{246       \textcolor{comment}{!(out) エンストロフィースペクトル(水平全波数 n 空間)}}
\DoxyCodeLine{247 }
\DoxyCodeLine{248 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{dimension(0:nm,size(ua\_Strfunc,2))}     :: na\_Work \textcolor{comment}{! 作業領域}}
\DoxyCodeLine{249 }
\DoxyCodeLine{250       \textcolor{keywordtype}{integer} :: l, n, m, nm\_ary(2)}
\DoxyCodeLine{251 \textcolor{keywordtype}{      real}(8) :: factor}
\DoxyCodeLine{252 }
\DoxyCodeLine{253       \textcolor{keywordtype}{integer} :: ierr}
\DoxyCodeLine{254 }
\DoxyCodeLine{255       na\_work = 0.0d0}
\DoxyCodeLine{256       \textcolor{keywordflow}{do} l=1,nmc}
\DoxyCodeLine{257          nm\_ary = nm\_l(l+nms-\/1)}
\DoxyCodeLine{258          n = nm\_ary(1) ; m = abs(nm\_ary(2))}
\DoxyCodeLine{259          \textcolor{keywordflow}{if} ( n .ge. 0 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{260             \textcolor{keywordflow}{if} ( m == 0 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{261                factor = 1.0d0}
\DoxyCodeLine{262             \textcolor{keywordflow}{else}}
\DoxyCodeLine{263                factor = 2.0d0}
\DoxyCodeLine{264 \textcolor{keywordflow}{            endif}}
\DoxyCodeLine{265             na\_work(n,:) = na\_work(n,:) \&}
\DoxyCodeLine{266                  + factor * 0.5 * n**2 * (n+1)**2 * ua\_strfunc(l,:)**2}
\DoxyCodeLine{267 \textcolor{keywordflow}{         endif}}
\DoxyCodeLine{268 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{269 }
\DoxyCodeLine{270       \textcolor{keyword}{CALL }mpi\_allreduce(na\_work,na\_enstrophyfromstreamfunc\_ua,\&}
\DoxyCodeLine{271                          (int(nm)+1)*\textcolor{keyword}{size}(ua\_strfunc,2), \&}
\DoxyCodeLine{272                          mpi\_real8,mpi\_sum,mpi\_comm\_w,ierr)}
\DoxyCodeLine{273 }

\end{DoxyCode}


References ua\+\_\+mpi\+\_\+module\+\_\+base\+::mpi\+\_\+comm\+\_\+w, w\+\_\+mpi\+\_\+module\+\_\+base\+::nm, ua\+\_\+mpi\+\_\+module\+\_\+base\+::nmc, and ua\+\_\+mpi\+\_\+module\+\_\+base\+::nms.

\mbox{\Hypertarget{namespaceua__mpi__module__spectrum_a8b8ebd0b6a3645dc435447d5a93af6ac}\label{namespaceua__mpi__module__spectrum_a8b8ebd0b6a3645dc435447d5a93af6ac}} 
\index{ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}!nma\_energyfromstreamfunc\_ua@{nma\_energyfromstreamfunc\_ua}}
\index{nma\_energyfromstreamfunc\_ua@{nma\_energyfromstreamfunc\_ua}!ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}}
\doxysubsubsection{\texorpdfstring{nma\_energyfromstreamfunc\_ua()}{nma\_energyfromstreamfunc\_ua()}}
{\footnotesize\ttfamily real(8) function, dimension(0\+:nm,-\/nm\+:nm,size(ua\+\_\+strfunc,2)), public ua\+\_\+mpi\+\_\+module\+\_\+spectrum\+::nma\+\_\+energyfromstreamfunc\+\_\+ua (\begin{DoxyParamCaption}\item[{real(8), dimension(\+:,\+:), intent(in)}]{ua\+\_\+\+Strfunc }\end{DoxyParamCaption})}



Definition at line 65 of file ua\+\_\+mpi\+\_\+module\+\_\+spectrum.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{65       \textcolor{comment}{!}}
\DoxyCodeLine{66       \textcolor{comment}{! 流線関数のスペクトルデータからエネルギーの球面調和函数成分}}
\DoxyCodeLine{67       \textcolor{comment}{! (スペクトル)を計算する(1 層用).}}
\DoxyCodeLine{68       \textcolor{comment}{!}}
\DoxyCodeLine{69       \textcolor{comment}{!  * 全波数 n, 帯状波数 m の流線関数のスペクトル成分ψ(n,m) から}}
\DoxyCodeLine{70       \textcolor{comment}{!    エネルギースペクトルは (1/2)n(n+1)|ψ(n,m)|\string^2 と計算される.}}
\DoxyCodeLine{71       \textcolor{comment}{!}}
\DoxyCodeLine{72       \textcolor{comment}{!  * 全てのエネルギースペクトル成分の和に4πをかけたものが球面上での}}
\DoxyCodeLine{73       \textcolor{comment}{!    全エネルギーに等しい.}}
\DoxyCodeLine{74       \textcolor{comment}{!}}
\DoxyCodeLine{75       \textcolor{comment}{!  * スペクトルの (n,m) 成分は全波数 n, 東西波数 m の実部成分,}}
\DoxyCodeLine{76       \textcolor{comment}{!    (n,-\/m) 成分は全波数 n, 東西波数 m の虚部成分が格納されている.}}
\DoxyCodeLine{77       \textcolor{comment}{!}}
\DoxyCodeLine{78       \textcolor{comment}{!  * データの存在しない全波数 n, 帯状波数 m の配列には欠損値が格納される.}}
\DoxyCodeLine{79       \textcolor{comment}{!    欠損値の値はモジュール変数 ua\_spectrum\_VMiss によって設定できる}}
\DoxyCodeLine{80       \textcolor{comment}{!    (初期値は -\/999.0)}}
\DoxyCodeLine{81       \textcolor{comment}{!}}
\DoxyCodeLine{82 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{intent(in)}   :: ua\_Strfunc(:,:)}
\DoxyCodeLine{83       \textcolor{comment}{!(in) 流線関数(スペクトルデータ)}}
\DoxyCodeLine{84 }
\DoxyCodeLine{85 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{dimension(0:nm,-\/nm:nm,size(ua\_Strfunc,2))} \&}
\DoxyCodeLine{86            :: nma\_EnergyFromStreamfunc\_ua}
\DoxyCodeLine{87       \textcolor{comment}{!(out) エネルギースペクトル(水平全波数 n, 帯状波数 m 空間)}}
\DoxyCodeLine{88 }
\DoxyCodeLine{89 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{dimension(0:nm,-\/nm:nm,size(ua\_Strfunc,2))} :: nma\_work \textcolor{comment}{! 作業領域}}
\DoxyCodeLine{90 }
\DoxyCodeLine{91       \textcolor{keywordtype}{integer} :: l, n, m, nm\_ary(2)}
\DoxyCodeLine{92 }
\DoxyCodeLine{93       \textcolor{keywordtype}{integer} :: ierr}
\DoxyCodeLine{94 }
\DoxyCodeLine{95       nma\_work = 0.0d0}
\DoxyCodeLine{96       \textcolor{keywordflow}{do} l=1,nmc}
\DoxyCodeLine{97          nm\_ary = nm\_l(l+nms-\/1)}
\DoxyCodeLine{98          n = nm\_ary(1) ; m = abs(nm\_ary(2))}
\DoxyCodeLine{99          \textcolor{keywordflow}{if} ( n .ge. 0 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{100             \textcolor{keywordflow}{if} ( m == 0 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{101                nma\_work(n,0,:) = nma\_work(n,0,:) \&}
\DoxyCodeLine{102                     +  0.5 * n*(n+1) * ua\_strfunc(l,:)**2}
\DoxyCodeLine{103             \textcolor{keywordflow}{else}}
\DoxyCodeLine{104                nma\_work(n,m,:) = nma\_work(n,m,:) \&}
\DoxyCodeLine{105                     +  0.5 * n*(n+1) * ua\_strfunc(l,:)**2}
\DoxyCodeLine{106                nma\_work(n,-\/m,:) = nma\_work(n,-\/m,:) \&}
\DoxyCodeLine{107                     +  0.5 * n*(n+1) * ua\_strfunc(l,:)**2}
\DoxyCodeLine{108 \textcolor{keywordflow}{            endif}}
\DoxyCodeLine{109 \textcolor{keywordflow}{         endif}}
\DoxyCodeLine{110 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{111 }
\DoxyCodeLine{112       \textcolor{keyword}{CALL }mpi\_allreduce(nma\_work,nma\_energyfromstreamfunc\_ua,\&}
\DoxyCodeLine{113                          (int(nm)+1)*(2*int(nm)+1)*\textcolor{keyword}{size}(ua\_strfunc,2), \&}
\DoxyCodeLine{114                          mpi\_real8,mpi\_sum,mpi\_comm\_w,ierr)}
\DoxyCodeLine{115 }
\DoxyCodeLine{116       \textcolor{keywordflow}{do} m=1,int(nm)}
\DoxyCodeLine{117          \textcolor{keywordflow}{do} n=0,m-\/1}
\DoxyCodeLine{118             nma\_energyfromstreamfunc\_ua(n,m,:)  = ua\_spectrum\_vmiss}
\DoxyCodeLine{119             nma\_energyfromstreamfunc\_ua(n,-\/m,:) = ua\_spectrum\_vmiss}
\DoxyCodeLine{120 \textcolor{keywordflow}{         enddo}}
\DoxyCodeLine{121 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{122 }

\end{DoxyCode}


References ua\+\_\+mpi\+\_\+module\+\_\+base\+::mpi\+\_\+comm\+\_\+w, w\+\_\+mpi\+\_\+module\+\_\+base\+::nm, ua\+\_\+mpi\+\_\+module\+\_\+base\+::nmc, ua\+\_\+mpi\+\_\+module\+\_\+base\+::nms, and ua\+\_\+spectrum\+\_\+vmiss.

\mbox{\Hypertarget{namespaceua__mpi__module__spectrum_a1302b25d38f9ed99c6e1b6199db91056}\label{namespaceua__mpi__module__spectrum_a1302b25d38f9ed99c6e1b6199db91056}} 
\index{ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}!nma\_enstrophyfromstreamfunc\_ua@{nma\_enstrophyfromstreamfunc\_ua}}
\index{nma\_enstrophyfromstreamfunc\_ua@{nma\_enstrophyfromstreamfunc\_ua}!ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}}
\doxysubsubsection{\texorpdfstring{nma\_enstrophyfromstreamfunc\_ua()}{nma\_enstrophyfromstreamfunc\_ua()}}
{\footnotesize\ttfamily real(8) function, dimension(0\+:nm,-\/nm\+:nm,size(ua\+\_\+strfunc,2)), public ua\+\_\+mpi\+\_\+module\+\_\+spectrum\+::nma\+\_\+enstrophyfromstreamfunc\+\_\+ua (\begin{DoxyParamCaption}\item[{real(8), dimension(\+:,\+:), intent(in)}]{ua\+\_\+\+Strfunc }\end{DoxyParamCaption})}



Definition at line 174 of file ua\+\_\+mpi\+\_\+module\+\_\+spectrum.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{174       \textcolor{comment}{!}}
\DoxyCodeLine{175       \textcolor{comment}{! 流線関数のスペクトルデータからエンストロフィーの球面調和函数成分}}
\DoxyCodeLine{176       \textcolor{comment}{! (スペクトル)を計算する(1 層用).}}
\DoxyCodeLine{177       \textcolor{comment}{!}}
\DoxyCodeLine{178       \textcolor{comment}{! * 全波数 n, 帯状波数 m の流線関数のスペクトル成分ψ(n,m) から}}
\DoxyCodeLine{179       \textcolor{comment}{!    エンストロフィースペクトルは (1/2)n\string^2(n+1)\string^2|ψ(n,m)|\string^2 と計算される.}}
\DoxyCodeLine{180       \textcolor{comment}{!}}
\DoxyCodeLine{181       \textcolor{comment}{! * 全てのエンストロフィースペクトル成分の和に4π/R\string^2をかけたものが}}
\DoxyCodeLine{182       \textcolor{comment}{!   球面上での全エンストロフィーに等しい. ここで R は球面の半径である.}}
\DoxyCodeLine{183       \textcolor{comment}{!}}
\DoxyCodeLine{184       \textcolor{comment}{! * データの存在しない全波数 n, 帯状波数 m の配列には欠損値が格納される.}}
\DoxyCodeLine{185       \textcolor{comment}{!   欠損値の値はモジュール変数 ua\_spectrum\_VMiss によって設定できる}}
\DoxyCodeLine{186       \textcolor{comment}{!   (初期値は -\/999.0)}}
\DoxyCodeLine{187       \textcolor{comment}{!}}
\DoxyCodeLine{188 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{intent(in)}   :: ua\_Strfunc(:,:)}
\DoxyCodeLine{189       \textcolor{comment}{!(in) 流線関数(スペクトルデータ)}}
\DoxyCodeLine{190 }
\DoxyCodeLine{191 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{dimension(0:nm,-\/nm:nm,size(ua\_Strfunc,2))} \&}
\DoxyCodeLine{192            :: nma\_EnstrophyFromStreamfunc\_ua}
\DoxyCodeLine{193       \textcolor{comment}{! エンストロフィースペクトル (水平全波数 n, 帯状波数 m 空間)}}
\DoxyCodeLine{194 }
\DoxyCodeLine{195 \textcolor{keywordtype}{      real}(8), \textcolor{keywordtype}{dimension(0:nm,-\/nm:nm,size(ua\_Strfunc,2))} :: nma\_Work \textcolor{comment}{! 作業領域}}
\DoxyCodeLine{196 }
\DoxyCodeLine{197       \textcolor{keywordtype}{integer} :: l, n, m, nm\_ary(2)}
\DoxyCodeLine{198 }
\DoxyCodeLine{199       \textcolor{keywordtype}{integer} :: ierr}
\DoxyCodeLine{200 }
\DoxyCodeLine{201       nma\_work = 0.0d0}
\DoxyCodeLine{202       \textcolor{keywordflow}{do} l=1,nmc}
\DoxyCodeLine{203          nm\_ary = nm\_l(l+nms-\/1)}
\DoxyCodeLine{204          n = nm\_ary(1) ; m = abs(nm\_ary(2))}
\DoxyCodeLine{205          \textcolor{keywordflow}{if} ( n .ge. 0 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{206             \textcolor{keywordflow}{if} ( m == 0 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{207                nma\_work(n,0,:) = nma\_work(n,0,:) \&}
\DoxyCodeLine{208                     +  0.5 * n**2 * (n+1)**2 * ua\_strfunc(l,:)**2}
\DoxyCodeLine{209             \textcolor{keywordflow}{else}}
\DoxyCodeLine{210                nma\_work(n,m,:) = nma\_work(n,m,:) \&}
\DoxyCodeLine{211                     +  0.5 * n**2 * (n+1)**2 * ua\_strfunc(l,:)**2}
\DoxyCodeLine{212                nma\_work(n,-\/m,:) = nma\_work(n,-\/m,:) \&}
\DoxyCodeLine{213                     +  0.5 * n**2 * (n+1)**2 * ua\_strfunc(l,:)**2}
\DoxyCodeLine{214 \textcolor{keywordflow}{            endif}}
\DoxyCodeLine{215 \textcolor{keywordflow}{         endif}}
\DoxyCodeLine{216 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{217 }
\DoxyCodeLine{218       \textcolor{keyword}{CALL }mpi\_allreduce(nma\_work,nma\_enstrophyfromstreamfunc\_ua,\&}
\DoxyCodeLine{219                          (int(nm)+1)*(2*int(nm)+1)*\textcolor{keyword}{size}(ua\_strfunc,2), \&}
\DoxyCodeLine{220                          mpi\_real8,mpi\_sum,mpi\_comm\_w,ierr)}
\DoxyCodeLine{221 }
\DoxyCodeLine{222       \textcolor{keywordflow}{do} m=1,int(nm)}
\DoxyCodeLine{223          \textcolor{keywordflow}{do} n=0,m-\/1}
\DoxyCodeLine{224             nma\_enstrophyfromstreamfunc\_ua(n,m,:)  = ua\_spectrum\_vmiss}
\DoxyCodeLine{225             nma\_enstrophyfromstreamfunc\_ua(n,-\/m,:) = ua\_spectrum\_vmiss}
\DoxyCodeLine{226 \textcolor{keywordflow}{         enddo}}
\DoxyCodeLine{227 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{228 }

\end{DoxyCode}


References ua\+\_\+mpi\+\_\+module\+\_\+base\+::mpi\+\_\+comm\+\_\+w, w\+\_\+mpi\+\_\+module\+\_\+base\+::nm, ua\+\_\+mpi\+\_\+module\+\_\+base\+::nmc, ua\+\_\+mpi\+\_\+module\+\_\+base\+::nms, and ua\+\_\+spectrum\+\_\+vmiss.



\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{namespaceua__mpi__module__spectrum_aa0e061f3e289130166efea2a391a3400}\label{namespaceua__mpi__module__spectrum_aa0e061f3e289130166efea2a391a3400}} 
\index{ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}!ua\_spectrum\_vmiss@{ua\_spectrum\_vmiss}}
\index{ua\_spectrum\_vmiss@{ua\_spectrum\_vmiss}!ua\_mpi\_module\_spectrum@{ua\_mpi\_module\_spectrum}}
\doxysubsubsection{\texorpdfstring{ua\_spectrum\_vmiss}{ua\_spectrum\_vmiss}}
{\footnotesize\ttfamily real(8), public ua\+\_\+mpi\+\_\+module\+\_\+spectrum\+::ua\+\_\+spectrum\+\_\+vmiss = -\/999.\+000}



Definition at line 59 of file ua\+\_\+mpi\+\_\+module\+\_\+spectrum.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{59 \textcolor{keywordtype}{  real}(8) :: ua\_spectrum\_VMiss = -\/999.000    \textcolor{comment}{! 欠損値初期値}}

\end{DoxyCode}


Referenced by nma\+\_\+energyfromstreamfunc\+\_\+ua(), and nma\+\_\+enstrophyfromstreamfunc\+\_\+ua().

